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.0a0.tar.gz (70.3 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.0a0-cp310-abi3-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10+Windows x86-64

atlas_local_lib_py-0.1.0a0-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.0a0-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.0a0-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.0a0-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.0a0.tar.gz.

File metadata

  • Download URL: atlas_local_lib_py-0.1.0a0.tar.gz
  • Upload date:
  • Size: 70.3 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.0a0.tar.gz
Algorithm Hash digest
SHA256 fc8be59002f6c33dadec10129b39e83eedec121aada988d34da62414302dca34
MD5 320edb67eec809912af9b2f078dc12e3
BLAKE2b-256 6a2974bd4383683d370ed05929f596a88c6f1a9a7717430b5c5a23b7d0b66f05

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a0.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.0a0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for atlas_local_lib_py-0.1.0a0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 43fa77c4de0299b1aec11e687f7554c520e062b471461980a5cde5b2ec065b2e
MD5 4269e94e972a9261667d4406cd87028a
BLAKE2b-256 913d49537e93b430f86fa886b9d27e826ed8cd37389fbc19a603c8755dabff0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a0-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.0a0-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for atlas_local_lib_py-0.1.0a0-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 94944c8caa0f0ff4dab1d8d91ddafb8fc1c812b6a3e50bc6c69126843212cb20
MD5 8e3b9a0c238b4132095cbb33cddd22f0
BLAKE2b-256 b5aeddfe072f4ac9bc11aab25c2b26507d4de177abe89711e7b93d8c02f0acdb

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a0-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.0a0-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for atlas_local_lib_py-0.1.0a0-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 570a3ec282896ecb50f57f5d22d611b1866078f4f88c29dc7bd29d3b3e6b19d0
MD5 88f0f7ae4bda68156021a8ea76219545
BLAKE2b-256 80fba8f7471cef52de15d8f4ad7182fd118594a857ee2037948b18926c322f97

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a0-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.0a0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for atlas_local_lib_py-0.1.0a0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4af78355d3b9d8b57d724530248fe37a659ca86b8155eae773b3e820cc8c2074
MD5 c45cc8527e6e56b761f110f7b630d9ac
BLAKE2b-256 2228275922f76cf94ebe72264f8c23aa6a4ee72974ea13af98d456d9981b5d29

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a0-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.0a0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for atlas_local_lib_py-0.1.0a0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d4a502edd3cb40a8b98afdd6ae549275bac712c34d492528a0be2f57b2727c7a
MD5 f1d1d8b653486b2a5cde2715902d0d43
BLAKE2b-256 e4f4690790fdc9c4569f9ccd0f87ea96a1097673ab2ddf2a5484055622417164

See more details on using hashes here.

Provenance

The following attestation bundles were made for atlas_local_lib_py-0.1.0a0-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.0a0 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