Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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)

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")

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atlas_local_lib_py-0.1.0a1.tar.gz (71.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

atlas_local_lib_py-0.1.0a1-cp310-abi3-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10+Windows x86-64

atlas_local_lib_py-0.1.0a1-cp310-abi3-manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

atlas_local_lib_py-0.1.0a1-cp310-abi3-manylinux_2_28_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

atlas_local_lib_py-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

atlas_local_lib_py-0.1.0a1-cp310-abi3-macosx_10_12_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file atlas_local_lib_py-0.1.0a1.tar.gz.

File metadata

  • Download URL: atlas_local_lib_py-0.1.0a1.tar.gz
  • Upload date:
  • Size: 71.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for atlas_local_lib_py-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 e564d24533e9dcbc65adb62f7db2eae18ff3336af4390d70bf56533321b798b0
MD5 051a06f58a567e3fe0a403acd7dba900
BLAKE2b-256 b70d6bb9f2ebcb1ac820a1aee01cbba229c8159788681cef6a1f543b0cc10089

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a1.tar.gz:

Publisher: release.yml on mongodb/atlas-local-lib-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atlas_local_lib_py-0.1.0a1-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for atlas_local_lib_py-0.1.0a1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b8ed072bc47414170e541bd3f4da5e0ef52d3dc536e8e07d47b96a123fa0d3ec
MD5 f959cedbc0306fced6e021f68c736e78
BLAKE2b-256 b9f4d3cc1adb4f42d86547ff9f1d96d864ae60afeec58053d37ec676c1c3a31f

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a1-cp310-abi3-win_amd64.whl:

Publisher: release.yml on mongodb/atlas-local-lib-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atlas_local_lib_py-0.1.0a1-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for atlas_local_lib_py-0.1.0a1-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e2c826611d99925912045863f91033e71be1c14608a1ca02e33599e3499a0fb8
MD5 a2dc6b40b7176372d2e0ee89894eae19
BLAKE2b-256 a619916227de3b66f8d7bafb43e07258251d95d885b62a678eaa3b228de8a3cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a1-cp310-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on mongodb/atlas-local-lib-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atlas_local_lib_py-0.1.0a1-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for atlas_local_lib_py-0.1.0a1-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a565903e7ae2b442e5bcb482c0e94b3652ac282092f1b884cdf4a529c5fbe354
MD5 37b457ecdb430b67869947b4ca17c7ba
BLAKE2b-256 708eb8998985acd0eade5673f7b7f9e9d0c5e2d3c7afd3ec3374a5c1f427d72e

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a1-cp310-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on mongodb/atlas-local-lib-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atlas_local_lib_py-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for atlas_local_lib_py-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 045dbd3d62f7f75535a5ffb4e4302bbdbea5d2fa403794298e366649fa596ba2
MD5 4d67de7ba0f157f71de990724e90f2fb
BLAKE2b-256 b773527c85116f2caa1e5ad8142d1c5f461a4efa2bab3993347e92872c5e70e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a1-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on mongodb/atlas-local-lib-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file atlas_local_lib_py-0.1.0a1-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for atlas_local_lib_py-0.1.0a1-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b1d2a240d93686ece8453afbaf46b1f16ad9f81071853cae6ff4ce848898e590
MD5 836f9c8b85c32e98fea4e05f63ccc722
BLAKE2b-256 80d48ddec515e9d7166c1ea66b685449648ff6a230a88dc84767954be376e8b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a1-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on mongodb/atlas-local-lib-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

6 files

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