Name | medberg JSON |
Version |
0.0.1
JSON |
| download |
home_page | |
Summary | Download files from the Cencora secure file transfer site |
upload_time | 2024-03-16 14:13:55 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.10 |
license | |
keywords |
amerisource
cencora
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Purpose
This Python package can be used to download files from the Cencora (formerly
Amerisource) secure file transfer site for ingest into clinical data systems.
Downloads are performed from the web-based secure site located at
https://secure.amerisourcebergen.com/. FTP is not supported. (There are many
easier ways to automate FTP-based downloads.)
# Requirements
- Python 3.10 or newer
# Installation
Use [pip](https://pip.pypa.io/en/stable/) to install the medberg package.
```bash
pip install medberg
```
# Usage
Import the SecureSite class from the medberg module.
```python
from medberg import SecureSite
```
Initialize a connection to the secure site by providing a username and password.
```python
con = SecureSite(username='yourname', password='yourpassword')
```
A list of files is automatically downloaded at connection time. Filenames are stored as
a list in the `files` variable.
```python
print(con.files)
# ['039A_012345678_0101.TXT', '077AXM0123456780101.TXT', ...]
```
Any individual file can be downloaded using the `get_file` method.
```python
con.get_file('039A_012345678_0101.TXT', save_dir='C:\\Users\\yourname\\Downloads\\')
```
The file is saved in the path specified by `save_dir`. If this is left blank, it will
default to the current working directory. The local filepath will be returned as a
pathlib Path.
# Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what
you would like to change.
# License
This software is licensed under the [MIT License](https://choosealicense.com/licenses/mit/).
# Disclaimer
This package and its authors are not afiliated, associated, authorized, or endorsed by
Cencora, Inc. All names and brands are properties of their respective owners.
Raw data
{
"_id": null,
"home_page": "",
"name": "medberg",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "amerisource,cencora",
"author": "",
"author_email": "Eddie Cosma <eddie.cosma@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/de/4c/0cb1d5c5698e4ea0ed5d229c2268aa127b9d498331e5f5556b87c9c2eb5d/medberg-0.0.1.tar.gz",
"platform": null,
"description": "# Purpose\n\nThis Python package can be used to download files from the Cencora (formerly\nAmerisource) secure file transfer site for ingest into clinical data systems.\n\nDownloads are performed from the web-based secure site located at\nhttps://secure.amerisourcebergen.com/. FTP is not supported. (There are many\neasier ways to automate FTP-based downloads.)\n\n# Requirements\n\n- Python 3.10 or newer\n\n# Installation\n\nUse [pip](https://pip.pypa.io/en/stable/) to install the medberg package.\n\n```bash\npip install medberg\n```\n\n# Usage\n\nImport the SecureSite class from the medberg module.\n\n```python\nfrom medberg import SecureSite\n```\n\nInitialize a connection to the secure site by providing a username and password.\n```python\ncon = SecureSite(username='yourname', password='yourpassword')\n```\n\nA list of files is automatically downloaded at connection time. Filenames are stored as\na list in the `files` variable.\n\n```python\nprint(con.files)\n# ['039A_012345678_0101.TXT', '077AXM0123456780101.TXT', ...]\n```\n\nAny individual file can be downloaded using the `get_file` method.\n\n```python\ncon.get_file('039A_012345678_0101.TXT', save_dir='C:\\\\Users\\\\yourname\\\\Downloads\\\\')\n```\n\nThe file is saved in the path specified by `save_dir`. If this is left blank, it will\ndefault to the current working directory. The local filepath will be returned as a\npathlib Path.\n\n# Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what\nyou would like to change.\n\n# License\n\nThis software is licensed under the [MIT License](https://choosealicense.com/licenses/mit/).\n\n# Disclaimer\n\nThis package and its authors are not afiliated, associated, authorized, or endorsed by\nCencora, Inc. All names and brands are properties of their respective owners.\n",
"bugtrack_url": null,
"license": "",
"summary": "Download files from the Cencora secure file transfer site",
"version": "0.0.1",
"project_urls": {
"Homepage": "https://github.com/eddie-cosma/medberg",
"Issues": "https://github.com/eddie-cosma/medberg/issuess"
},
"split_keywords": [
"amerisource",
"cencora"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f683e3cf9977d1ccbad4187e7411266adb3c851be9d4aa0d5c452c07cd12fcc1",
"md5": "eea756803d22169f559b560b5887690e",
"sha256": "602607c6a0198d11327bae3fb5907ec005062c64c8c3a73c2e23e5bfe8e1ab4c"
},
"downloads": -1,
"filename": "medberg-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eea756803d22169f559b560b5887690e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 4374,
"upload_time": "2024-03-16T14:13:18",
"upload_time_iso_8601": "2024-03-16T14:13:18.942425Z",
"url": "https://files.pythonhosted.org/packages/f6/83/e3cf9977d1ccbad4187e7411266adb3c851be9d4aa0d5c452c07cd12fcc1/medberg-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "de4c0cb1d5c5698e4ea0ed5d229c2268aa127b9d498331e5f5556b87c9c2eb5d",
"md5": "7d01ebc25096eb1315e73a71ea2811c3",
"sha256": "c9e9f198c4b1a98f212bbc911aed158b21e4f530f3b7d143bd88ab4f944cde02"
},
"downloads": -1,
"filename": "medberg-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "7d01ebc25096eb1315e73a71ea2811c3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 3974,
"upload_time": "2024-03-16T14:13:55",
"upload_time_iso_8601": "2024-03-16T14:13:55.182696Z",
"url": "https://files.pythonhosted.org/packages/de/4c/0cb1d5c5698e4ea0ed5d229c2268aa127b9d498331e5f5556b87c9c2eb5d/medberg-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-16 14:13:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "eddie-cosma",
"github_project": "medberg",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "medberg"
}