Skip to main content

Local Python SDK

The python project uses the locally fern generated Python SDK and runs tests against the Metriport API.

Setup

  1. Create a .env file with your environment variables:
API_KEY=<your_base64_encoded_api_key>
FACILITY_ID=<your_facility_id>
PATIENT_ID=<your_patient_id>
BASE_URL=http://localhost:8080

The API_KEY should be base64 encoded in the format: <random_key>:<customer_id>

  1. Install dependencies:
poetry lock
poetry install

Regenerating the Python SDK

To update the generated Python SDK locally for testing, run

fern generate --group test

You will be prompted to sign in.

Running the Tests

Note: Make sure the Metriport API server is running locally (see main README for setup instructions).

Run all tests:

poetry run pytest tests -v

Run a specific test:

poetry run pytest tests/test_create_patient.py -v

Editor Setup

Install the pylance and mypy plugins to get code completion in your editor.

Metadata

Release files for metriport 9.2.0

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

Source distribution (sdist)

Source distribution for metriport 9.2.0
File Size Uploaded Provenance
metriport-9.2.0.tar.gz 408.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for metriport 9.2.0
File Interpreter ABI Platform
metriport-9.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Release files / metriport-9.2.0.tar.gz

Download URL metriport-9.2.0.tar.gz
Size 408.3 kB
Tags Source
SHA-256 checksum
How to use checksums
65afe43362003a5b7070285702b5b438f16d85ed248c21e309d24e33e1ec1044
BLAKE2b-256 checksum
How to use checksums
d02d4c85e17dffdf99216a4ddca0e19eb6f01d1f1c912a13daeb1a43b7d62591
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / metriport-9.2.0-py3-none-any.whl

Download URL metriport-9.2.0-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9860aa57390f7bb7a5082410aad5ab853c34d78e0f9a3f2056ae85fcc67b6df2
BLAKE2b-256 checksum
How to use checksums
187403faa5f0b78894934cddbbceaa098198d9e3d19c0a4927a5df6b1d1986b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for metriport 9.2.0

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.

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