Skip to main content

atlas-local-lib-py

Python library for managing MongoDB Atlas Local deployments. It wraps the atlas-local Rust library and requires a running Docker daemon.

Requirements

  • Python >= 3.10
  • Docker running locally

Installation

pip install atlas-local-lib-py

Usage

Create a deployment

from atlas_local import LocalDeployment

deployment = LocalDeployment.create(name="my-local-deployment")

print(deployment.container_id)
print(deployment.state)

When using a Voyage API key that needs a non-default gateway, pass the full HTTPS embeddings URL as embedding_provider_endpoint:

This option requires a non-empty voyage_api_key.

deployment = LocalDeployment.create(
    name="my-local-deployment",
    voyage_api_key="<key>",
    embedding_provider_endpoint="https://api.voyageai.com/v1/embeddings",
)

Use https://ai.mongodb.com/v1/embeddings for Atlas-issued production keys and https://api.voyageai.com/v1/embeddings for keys created directly with Voyage AI. For an Atlas staging key, provide its gateway, such as https://ai-stage.mongodb.com/v1/embeddings.

Get or create a deployment

Use get_or_create to reuse an existing deployment with matching options, or create a new one if it doesn't exist.

deployment = LocalDeployment.get_or_create(name="my-local-deployment")

Creation options such as voyage_api_key and embedding_provider_endpoint are also accepted by get_or_create. If a deployment with the same name already exists but was created with a different endpoint, get_or_create raises a ValueError instead of reusing it.

Get an existing deployment

deployment = LocalDeployment.get("my-local-deployment")

List deployments

for deployment in LocalDeployment.list():
    print(deployment.name, deployment.state)

Manage the deployment lifecycle

deployment.stop()
deployment.start()
deployment.pause()
deployment.unpause()
deployment.delete()

Each lifecycle method is also available as a static method that takes a container ID or name, for example LocalDeployment.stop_deployment("my-local-deployment").

Error handling

Operations raise exceptions rooted at atlas_local.AtlasLocalError, with more specific subclasses such as CreateDeploymentError, GetDeploymentError, DeleteDeploymentError, StartDeploymentError, StopDeploymentError, PauseDeploymentError, and UnpauseDeploymentError.

from atlas_local import AtlasLocalError, LocalDeployment

try:
    deployment = LocalDeployment.get("nonexistent-deployment")
except AtlasLocalError as error:
    print(f"Failed to get deployment: {error}")

Development

Build the extension in editable mode:

pip install maturin
maturin develop --extras test

Run the test suite:

pytest

Integration tests require a running Docker daemon and are opt-in:

pytest -m integration

Metadata

Release files for atlas-local-lib-py 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 atlas-local-lib-py 1.0.1
File Size Uploaded Provenance Actions
atlas_local_lib_py-1.0.1.tar.gz 87.3 kB With provenance Details for atlas_local_lib_py-1.0.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for atlas-local-lib-py 1.0.1
File Actions
atlas_local_lib_py-1.0.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for atlas_local_lib_py-1.0.1-cp310-abi3-win_amd64.whl
atlas_local_lib_py-1.0.1-cp310-abi3-manylinux_2_28_x86_64.whl CPython 3.10 abi3 Linux glibc 2.28+ x86-64 Details for atlas_local_lib_py-1.0.1-cp310-abi3-manylinux_2_28_x86_64.whl
atlas_local_lib_py-1.0.1-cp310-abi3-manylinux_2_28_aarch64.whl CPython 3.10 abi3 Linux glibc 2.28+ ARM64 Details for atlas_local_lib_py-1.0.1-cp310-abi3-manylinux_2_28_aarch64.whl
atlas_local_lib_py-1.0.1-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for atlas_local_lib_py-1.0.1-cp310-abi3-macosx_11_0_arm64.whl
atlas_local_lib_py-1.0.1-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for atlas_local_lib_py-1.0.1-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 7.3 MB

Release files / atlas_local_lib_py-1.0.1.tar.gz

Download URL atlas_local_lib_py-1.0.1.tar.gz
Size 87.3 kB
Tags Source
SHA-256 checksum
How to use checksums
71d8f08d45c0a3b9dd2c8818a9528e28ae1366e7c7f7f9a4aecef5ca6d65b227
BLAKE2b-256 checksum
How to use checksums
2ffb8afbfe86dc91c16e3209488f306ed57334a1ff20a97bef27032afb6c587b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / atlas_local_lib_py-1.0.1-cp310-abi3-win_amd64.whl

Download URL atlas_local_lib_py-1.0.1-cp310-abi3-win_amd64.whl
Size 1.3 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
0d299226398848bf24b7e65092f2d942ed22b865e7110cf6287f2a09e0cfe689
BLAKE2b-256 checksum
How to use checksums
6266f0e85ce803fac5ce20b2ee2c88378ce9345014c6b178fc2db7cc4b86dc91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / atlas_local_lib_py-1.0.1-cp310-abi3-manylinux_2_28_x86_64.whl

Download URL atlas_local_lib_py-1.0.1-cp310-abi3-manylinux_2_28_x86_64.whl
Size 1.6 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
56f92823e631d12124eda29c42c24a5ffd79867a804240c9b54e985f6d293c9d
BLAKE2b-256 checksum
How to use checksums
b3723d0ae05bb49edb348258d2ead63f730e9783180421babf29d5519c8e552e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / atlas_local_lib_py-1.0.1-cp310-abi3-manylinux_2_28_aarch64.whl

Download URL atlas_local_lib_py-1.0.1-cp310-abi3-manylinux_2_28_aarch64.whl
Size 1.6 MB
Tags CPython 3.10 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
0fbb845b886a04a05ed1469a6160c1daf78ce114154351e3f0a2ecad10a47c9d
BLAKE2b-256 checksum
How to use checksums
e20111f3f63ae97e2fecee2c8dd056c621cb641465184ca2cd173e8f753167b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / atlas_local_lib_py-1.0.1-cp310-abi3-macosx_11_0_arm64.whl

Download URL atlas_local_lib_py-1.0.1-cp310-abi3-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c5b3ac5b38fb923a65be10af9b05f39a4d65f5a23ae497bb26bac84fb2f68436
BLAKE2b-256 checksum
How to use checksums
77dde4e125ceb9063816a55544527933e2e7e72e21326443ce964f59a22a71cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / atlas_local_lib_py-1.0.1-cp310-abi3-macosx_10_12_x86_64.whl

Download URL atlas_local_lib_py-1.0.1-cp310-abi3-macosx_10_12_x86_64.whl
Size 1.4 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
aa66f1a440bd874d9d1aefb614ebb317dbb39100201680d4b1582d3efae63a34
BLAKE2b-256 checksum
How to use checksums
51ff4611d4e8b0d277eff45fae0e738af98d1b09f375c790c5179d2ef9901f9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for atlas-local-lib-py 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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for atlas_local_lib_py-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

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