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.2

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.2
File Size Uploaded Provenance Actions
amdp_python_sdk-1.0.2.tar.gz 560.9 kB Without provenance Details for amdp_python_sdk-1.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 1.4 MB

Release files / amdp_python_sdk-1.0.2.tar.gz

Download URL amdp_python_sdk-1.0.2.tar.gz
Size 560.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2103e11f4fca53531ccf44fc72f017b93f3aa5aa9fdc0d56635bbd8e4ddd020e
BLAKE2b-256 checksum
How to use checksums
d5c48a9452bcb8bd85a25e09988a387c8f8fcb4af19214bcabe0b78f89ccdd98
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.2-py3-none-any.whl

Download URL amdp_python_sdk-1.0.2-py3-none-any.whl
Size 799.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e1c781ff7ba5a758dc8ecbad793b2f6c6958b834b22891322baa03e14f01b166
BLAKE2b-256 checksum
How to use checksums
4bdb9e4621cf44c05d8f50833e72622119087f1bad981cf47f40d446fa87d7e3
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.2

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