amdp-python-sdk 1.0.0__py3-none-any.whl → 1.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2025-present U.N. Owen <void@some.where>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "1.0.0"
4
+ __version__ = "1.0.2"
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: amdp-python-sdk
3
+ Version: 1.0.2
4
+ Summary: SDK wrapper for AMD Platform API services.
5
+ License-Expression: MIT
6
+ License-File: LICENSE.txt
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Programming Language :: Python
9
+ Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.11
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: Implementation :: CPython
14
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
15
+ Requires-Python: <3.14,>=3.10
16
+ Requires-Dist: dependency-injector<5.0.0,>=4.41.0
17
+ Requires-Dist: pydantic-settings~=2.12.0
18
+ Requires-Dist: pydantic~=2.11.10
19
+ Requires-Dist: python-dateutil>=2.8.2
20
+ Requires-Dist: requests~=2.32.5
21
+ Requires-Dist: responses~=0.25.8
22
+ Requires-Dist: typing-extensions>=4.7.1
23
+ Requires-Dist: urllib3<3.0.0,>=2.1.0
24
+ Description-Content-Type: text/markdown
25
+
26
+ # amdp-python-sdk
27
+ **Current version:** `0.1.0a1`
28
+
29
+ [![PyPI - Version](https://img.shields.io/pypi/v/amdp-python-sdk.svg)](https://pypi.org/project/amdp-python-sdk)
30
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/amdp-python-sdk.svg)](https://pypi.org/project/amdp-python-sdk)
31
+
32
+ -----
33
+
34
+ Python SDK for the AMD Platform API Services.
35
+
36
+ ## Table of Contents
37
+
38
+ - [Installation](#installation)
39
+ - [Getting Started](#using-sdk)
40
+ - [License](#license)
41
+
42
+ ## Installation
43
+
44
+ ```bash
45
+ pip install amdp-python-sdk
46
+ ```
47
+
48
+ ## Quick Start
49
+
50
+ ```python
51
+ from amdp_python_sdk import AMDP
52
+
53
+ # Connect with explicit credentials
54
+ sdk = AMDP.connect(
55
+ client_id="your-client-id",
56
+ client_secret="your-secret",
57
+ user_service_hostname="https://amdp.cdc.gov/user-service",
58
+ workflow_service_hostname="https://amdp.cdc.gov/workflow-service",
59
+ sample_service_hostname="https://amdp.cdc.gov/sample-service"
60
+ )
61
+
62
+ # Upload samples with intuitive chaining
63
+ result = (
64
+ sdk.workspace("My Workspace")
65
+ .project("My Project")
66
+ .upload_sample_sheet("samples.csv")
67
+ )
68
+
69
+ print(f"Uploaded {len(result.samples)} samples")
70
+ ```
71
+
72
+ **Alternatively**, set environment variables and connect without parameters:
73
+
74
+ ```bash
75
+ export AMDP_CLIENT_ID="your-client-id"
76
+ export AMDP_CLIENT_SECRET="your-secret"
77
+ export AMDP_USER_SERVICE_HOSTNAME="https://amdp.cdc.gov/user-service"
78
+ export AMDP_WORKFLOW_SERVICE_HOSTNAME="https://amdp.cdc.gov/workflow-service"
79
+ export AMDP_SAMPLE_SERVICE_HOSTNAME="https://amdp.cdc.gov/sample-service"
80
+ ```
81
+
82
+ ```python
83
+ from amdp_python_sdk import AMDP
84
+
85
+ sdk = AMDP.connect() # Reads credentials from environment
86
+ ```
87
+
88
+ ## Getting Started
89
+
90
+ After connecting, you can interact with the platform immediately. For example, to retrieve the currently authenticated user:
91
+
92
+ ```python
93
+ from amdp_python_sdk import AMDP
94
+
95
+ sdk = AMDP.connect()
96
+
97
+ user = sdk.get_current_user()
98
+
99
+ print(f"User ID: {user.id}")
100
+ print(f"Active: {user.is_active}")
101
+ user.first_name and print(f"First Name: {user.first_name}")
102
+ user.last_name and print(f"Last Name: {user.last_name}")
103
+ user.email and print(f"Email: {user.email}")
104
+ ```
105
+
106
+ ## License
107
+
108
+ `amdp-python-sdk` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
@@ -1,4 +1,4 @@
1
- amdp_python_sdk/__about__.py,sha256=imJ_ZIYx971RP3jM9AEEFtEnYqVWAi9V-NIgbLKgQBM,122
1
+ amdp_python_sdk/__about__.py,sha256=qe9Ze7guCTth4kJWuUSRYp7NFhoEHbYi2LZb68OmJmk,122
2
2
  amdp_python_sdk/__init__.py,sha256=7VPL2ZGHe5acHuxY1bYf25SZ0NQ0Z_UuoOGAd2EeRD0,2367
3
3
  amdp_python_sdk/exceptions.py,sha256=64kNbTORO5g2qzhr2-UM5d18nw0izf-0FLlwHyAvN-E,11958
4
4
  amdp_python_sdk/interface.py,sha256=VfW0ebvfYOrXWGPXraL00iRraLT4MOxiWUskMoEZpjw,10804
@@ -456,7 +456,7 @@ oamd_workflow_openApi/models/workflow_run_status.py,sha256=uOnm_c5Li_FwTZmbJqsmN
456
456
  oamd_workflow_openApi/models/workflow_run_type.py,sha256=l7gGltqAi-Gc2ou6DwZ6WJFl3-9YBRaXdjdS17HnYgs,760
457
457
  oamd_workflow_openApi/models/workflow_view_dto.py,sha256=5pld54NLEFc20jM_2i_fyPwdpKFT48jRBixmhk7DJDo,11417
458
458
  oamd_workflow_openApi/models/workflow_view_dto_paged_response.py,sha256=kRJBE-dMYLOmxO5ksMK-7vtMYooTJnw6-IvcY3yQVBM,3823
459
- amdp_python_sdk-1.0.0.dist-info/METADATA,sha256=ge85Qn0-XdHGOPqBXhtK3wMSuata2z3_pjShj3HmMTo,6079
460
- amdp_python_sdk-1.0.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
461
- amdp_python_sdk-1.0.0.dist-info/licenses/LICENSE.txt,sha256=DtZ_DUYRl4TmNtc8Lu6zyJHvmqyCtCv_Mk7M62IYEkY,1107
462
- amdp_python_sdk-1.0.0.dist-info/RECORD,,
459
+ amdp_python_sdk-1.0.2.dist-info/METADATA,sha256=HgKXzXPXWZvgK-KAPiR_3wgXb5Zz2UOKJv6KqsWmJzY,3175
460
+ amdp_python_sdk-1.0.2.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
461
+ amdp_python_sdk-1.0.2.dist-info/licenses/LICENSE.txt,sha256=DtZ_DUYRl4TmNtc8Lu6zyJHvmqyCtCv_Mk7M62IYEkY,1107
462
+ amdp_python_sdk-1.0.2.dist-info/RECORD,,
@@ -1,197 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: amdp-python-sdk
3
- Version: 1.0.0
4
- Summary: SDK wrapper for AMD Platform API services.
5
- License-Expression: MIT
6
- License-File: LICENSE.txt
7
- Classifier: Development Status :: 4 - Beta
8
- Classifier: Programming Language :: Python
9
- Classifier: Programming Language :: Python :: 3.10
10
- Classifier: Programming Language :: Python :: 3.11
11
- Classifier: Programming Language :: Python :: 3.12
12
- Classifier: Programming Language :: Python :: 3.13
13
- Classifier: Programming Language :: Python :: Implementation :: CPython
14
- Classifier: Programming Language :: Python :: Implementation :: PyPy
15
- Requires-Python: <3.14,>=3.10
16
- Requires-Dist: pydantic-settings~=2.12.0
17
- Requires-Dist: pydantic~=2.11.10
18
- Requires-Dist: python-dateutil>=2.8.2
19
- Requires-Dist: requests~=2.32.5
20
- Requires-Dist: responses~=0.25.8
21
- Requires-Dist: typing-extensions>=4.7.1
22
- Requires-Dist: urllib3<3.0.0,>=2.1.0
23
- Description-Content-Type: text/markdown
24
-
25
- # amdp-python-sdk
26
- **Current version:** `0.1.0a1`
27
-
28
- [![GitHub release](https://img.shields.io/github/v/release/<OWNER>/<REPO>?include_prereleases)](https://github.com/cdcent/oamd-api-python-sdk/releases) [![PyPI - Version](https://img.shields.io/pypi/v/amdp-python-sdk.svg)](https://pypi.org/project/amdp-python-sdk)
29
- [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/amdp-python-sdk.svg)](https://pypi.org/project/amdp-python-sdk)
30
-
31
- -----
32
-
33
- Python SDK for the AMD Platform API Services.
34
-
35
- ## Table of Contents
36
-
37
- - [Installation](#installation)
38
- - [Getting Started](#using-sdk)
39
- - [Development Setup](#development-setup)
40
- - [License](#license)
41
- - [Regenerate the OpenAPI libraries](#regenerate-the-openapi-libraries)
42
- - [Testing](#testing)
43
- - [Build](#build)
44
- - [Changelog](#changelog)
45
-
46
- ## Installation
47
-
48
- ```bash
49
- pip install amdp-python-sdk
50
- ```
51
-
52
- ## Quick Start
53
-
54
- ```python
55
- from amdp_python_sdk import AMDP
56
-
57
- # Connect with explicit credentials
58
- sdk = AMDP.connect(
59
- client_id="your-client-id",
60
- client_secret="your-secret",
61
- user_service_hostname="https://amdp.cdc.gov/user-service",
62
- workflow_service_hostname="https://amdp.cdc.gov/workflow-service",
63
- sample_service_hostname="https://amdp.cdc.gov/sample-service"
64
- )
65
-
66
- # Upload samples with intuitive chaining
67
- result = (
68
- sdk.workspace("My Workspace")
69
- .project("My Project")
70
- .upload_sample_sheet("samples.csv")
71
- )
72
-
73
- print(f"Uploaded {len(result.samples)} samples")
74
- ```
75
-
76
- **Alternatively**, set environment variables and connect without parameters:
77
-
78
- ```bash
79
- export AMDP_CLIENT_ID="your-client-id"
80
- export AMDP_CLIENT_SECRET="your-secret"
81
- export AMDP_USER_SERVICE_HOSTNAME="https://amdp.cdc.gov/user-service"
82
- export AMDP_WORKFLOW_SERVICE_HOSTNAME="https://amdp.cdc.gov/workflow-service"
83
- export AMDP_SAMPLE_SERVICE_HOSTNAME="https://amdp.cdc.gov/sample-service"
84
- ```
85
-
86
- ```python
87
- from amdp_python_sdk import AMDP
88
-
89
- sdk = AMDP.connect() # Reads credentials from environment
90
- ```
91
-
92
- ## Getting Started
93
-
94
- See [using-sdk.md](./docs/using-sdk.md) and [usage_examples.py](./docs/usage_examples.py) for comprehensive usage information.
95
-
96
- ## Development Setup
97
-
98
- 1. Install Python 3.12 (minimum 3.10) in WSL
99
- ```bash
100
- sudo apt install python3.12 python-is-python3 -y
101
- ```
102
- 2. Install Hatch in WSL
103
- ```bash
104
- ## Install pipx first
105
- sudo apt install pipx -y
106
- pipx install hatch
107
- ```
108
- 3. Install Python and Pylance extensions in VS Code
109
- 4. In VS Code settings, select 'Extensions' on the left hand side, and then select 'Pylance'. Look for 'Python › Analysis: Type Checking Mode' and set the dropdown value to 'Strict'
110
-
111
- 5. Create and start Hatch virtual environment
112
- ```bash
113
- # will install all specified dependencies from the toml
114
- # Note the path given for the source command
115
- hatch shell local
116
- ```
117
- 6. In VS Code, set the "Python: Select Interpreter" setting and select "Enter interpreter path...", and use the path noted from step 4.
118
-
119
- 7. (Optional) Download VS Code extensions for Black Formatter, isort, and Flake8.
120
-
121
- ### Running Hatch-Static-Analysis scripts
122
- ```bash
123
- # list report of black and isort formatting
124
- hatch run hatch-static-analysis format-check
125
-
126
- # fix formatting with black and isort
127
- hatch run hatch-static-analysis format-fix
128
-
129
- # run flake8 linter script
130
- hatch run hatch-static-analysis lint-check
131
- ```
132
-
133
- ### Re-creating Hatch virtual environment from scratch
134
- At the project root, run:
135
- ```bash
136
- hatch env remove <envname>
137
- ```
138
-
139
- then run:
140
- ```bash
141
- hatch env create <envname>
142
- ```
143
-
144
- ## Regenerate the OpenAPI libraries
145
-
146
- If the API source code has been updated you can regenerate the openAPI based python libraries.
147
-
148
- With the API services running locally, first navigate to this repository then run:
149
- ```bash
150
- podman-compose up
151
- ```
152
- Each library will be regenerated in the `./generated` directory.
153
-
154
- ### Installation in Hatch Environments
155
-
156
- The generated packages (`oamd_sample_openApi`, `oamd_user_openApi`, `oamd_workflow_openApi`) are **automatically installed** when you use Hatch environments:
157
-
158
- - **Regular environments** (local, dev, test, etc.): The packages are installed automatically via the `{root:uri}` dependencies in `pyproject.toml`
159
- - **Test environments** (hatch-test): The packages are installed automatically via `post-install-commands` in `pyproject.toml`
160
-
161
- No manual installation is required when working with Hatch environments.
162
-
163
- ### Manual Installation (Outside Hatch)
164
-
165
- If you need to test the generated packages individually outside of Hatch environments, install them manually:
166
- ```bash
167
- pip install -e generated/samples
168
- pip install -e generated/users
169
- pip install -e generated/workflow
170
- ```
171
-
172
- ## Testing
173
-
174
- For instructions on using the **test_sdk_functions.py** script to test functions,
175
- please see [using-test-sdk-script.md](./docs/using-test-sdk-script.md).
176
-
177
-
178
- To run unit tests use the following hatch test command:
179
-
180
- ```bash
181
- hatch test
182
- ```
183
-
184
- ## Build
185
- To build use the hatch build command and the build files will be generated in ./dist.
186
-
187
- ```bash
188
- hatch build
189
- ```
190
-
191
- ## Changelog
192
-
193
- See [CHANGELOG.md](./CHANGELOG.md) for full details.
194
-
195
- ## License
196
-
197
- `amdp-python-sdk` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.