Skip to main content

amdp-python-sdk

Current version: 0.1.0a1

PyPI - Version PyPI - Python Version


Python SDK for the AMD Platform API Services.

Table of Contents

Installation

pip install amdp-python-sdk

Quick Start

from amdp_python_sdk import AMDP

# Connect with explicit credentials
sdk = AMDP.connect(
    client_id="your-client-id",
    client_secret="your-secret",
    user_service_hostname="https://amdp.cdc.gov/user-service",
    workflow_service_hostname="https://amdp.cdc.gov/workflow-service",
    sample_service_hostname="https://amdp.cdc.gov/sample-service"
)

# Upload samples with intuitive chaining
result = (
    sdk.workspace("My Workspace")
       .project("My Project")
       .upload_sample_sheet("samples.csv")
)

print(f"Uploaded {len(result.samples)} samples")

Alternatively, set environment variables and connect without parameters:

export AMDP_CLIENT_ID="your-client-id"
export AMDP_CLIENT_SECRET="your-secret"
export AMDP_USER_SERVICE_HOSTNAME="https://amdp.cdc.gov/user-service"
export AMDP_WORKFLOW_SERVICE_HOSTNAME="https://amdp.cdc.gov/workflow-service"
export AMDP_SAMPLE_SERVICE_HOSTNAME="https://amdp.cdc.gov/sample-service"
from amdp_python_sdk import AMDP

sdk = AMDP.connect()  # Reads credentials from environment

Getting Started

After connecting, you can interact with the platform immediately. For example, to retrieve the currently authenticated user:

from amdp_python_sdk import AMDP

sdk = AMDP.connect()

user = sdk.get_current_user()

print(f"User ID: {user.id}")
print(f"Active: {user.is_active}")
user.first_name and print(f"First Name: {user.first_name}")
user.last_name and print(f"Last Name: {user.last_name}")
user.email and print(f"Email: {user.email}")

License

amdp-python-sdk is distributed under the terms of the MIT license.

Metadata

Release files for amdp-python-sdk 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amdp-python-sdk 1.0.1
File Size Uploaded Provenance Actions
amdp_python_sdk-1.0.1.tar.gz 560.8 kB Without provenance Details for amdp_python_sdk-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for amdp-python-sdk 1.0.1
File Interpreter ABI Platform Actions
amdp_python_sdk-1.0.1-py3-none-any.whl Python 3 none any Details for amdp_python_sdk-1.0.1-py3-none-any.whl

Total release size: 1.4 MB

Release files / amdp_python_sdk-1.0.1.tar.gz

Download URL amdp_python_sdk-1.0.1.tar.gz
Size 560.8 kB
Tags Source
SHA-256 checksum
How to use checksums
abef71724d4fe9afb5f1ada9f334ae704c65f8a0bc5f3bf56348438b45c09405
BLAKE2b-256 checksum
How to use checksums
b9ae51395d41615e91014d1acab21970d6805636750a4a567cd6935372cf5c3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Release files / amdp_python_sdk-1.0.1-py3-none-any.whl

Download URL amdp_python_sdk-1.0.1-py3-none-any.whl
Size 799.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7a730f5ffa1c1909dc29a63332cf2502172a2418fe4f01dc6d2d0a542fa7a211
BLAKE2b-256 checksum
How to use checksums
2803bb39bfa9ee86d83e3e4928c18729b05222486937834ea48a616bdde60340
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Security for amdp-python-sdk 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page