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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc8be59002f6c33dadec10129b39e83eedec121aada988d34da62414302dca34
|
|
| MD5 |
320edb67eec809912af9b2f078dc12e3
|
|
| BLAKE2b-256 |
6a2974bd4383683d370ed05929f596a88c6f1a9a7717430b5c5a23b7d0b66f05
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atlas_local_lib_py-0.1.0a0.tar.gz -
Subject digest:
fc8be59002f6c33dadec10129b39e83eedec121aada988d34da62414302dca34 - Sigstore transparency entry: 2514639581
- Sigstore integration time:
-
Permalink:
mongodb/atlas-local-lib-py@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Branch / Tag:
refs/tags/v0.1.0-alpha.0 - Owner: https://github.com/mongodb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file atlas_local_lib_py-0.1.0a0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: atlas_local_lib_py-0.1.0a0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43fa77c4de0299b1aec11e687f7554c520e062b471461980a5cde5b2ec065b2e
|
|
| MD5 |
4269e94e972a9261667d4406cd87028a
|
|
| BLAKE2b-256 |
913d49537e93b430f86fa886b9d27e826ed8cd37389fbc19a603c8755dabff0c
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atlas_local_lib_py-0.1.0a0-cp310-abi3-win_amd64.whl -
Subject digest:
43fa77c4de0299b1aec11e687f7554c520e062b471461980a5cde5b2ec065b2e - Sigstore transparency entry: 2514639598
- Sigstore integration time:
-
Permalink:
mongodb/atlas-local-lib-py@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Branch / Tag:
refs/tags/v0.1.0-alpha.0 - Owner: https://github.com/mongodb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file atlas_local_lib_py-0.1.0a0-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: atlas_local_lib_py-0.1.0a0-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94944c8caa0f0ff4dab1d8d91ddafb8fc1c812b6a3e50bc6c69126843212cb20
|
|
| MD5 |
8e3b9a0c238b4132095cbb33cddd22f0
|
|
| BLAKE2b-256 |
b5aeddfe072f4ac9bc11aab25c2b26507d4de177abe89711e7b93d8c02f0acdb
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atlas_local_lib_py-0.1.0a0-cp310-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
94944c8caa0f0ff4dab1d8d91ddafb8fc1c812b6a3e50bc6c69126843212cb20 - Sigstore transparency entry: 2514639611
- Sigstore integration time:
-
Permalink:
mongodb/atlas-local-lib-py@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Branch / Tag:
refs/tags/v0.1.0-alpha.0 - Owner: https://github.com/mongodb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file atlas_local_lib_py-0.1.0a0-cp310-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: atlas_local_lib_py-0.1.0a0-cp310-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
570a3ec282896ecb50f57f5d22d611b1866078f4f88c29dc7bd29d3b3e6b19d0
|
|
| MD5 |
88f0f7ae4bda68156021a8ea76219545
|
|
| BLAKE2b-256 |
80fba8f7471cef52de15d8f4ad7182fd118594a857ee2037948b18926c322f97
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atlas_local_lib_py-0.1.0a0-cp310-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
570a3ec282896ecb50f57f5d22d611b1866078f4f88c29dc7bd29d3b3e6b19d0 - Sigstore transparency entry: 2514639617
- Sigstore integration time:
-
Permalink:
mongodb/atlas-local-lib-py@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Branch / Tag:
refs/tags/v0.1.0-alpha.0 - Owner: https://github.com/mongodb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file atlas_local_lib_py-0.1.0a0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: atlas_local_lib_py-0.1.0a0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4af78355d3b9d8b57d724530248fe37a659ca86b8155eae773b3e820cc8c2074
|
|
| MD5 |
c45cc8527e6e56b761f110f7b630d9ac
|
|
| BLAKE2b-256 |
2228275922f76cf94ebe72264f8c23aa6a4ee72974ea13af98d456d9981b5d29
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atlas_local_lib_py-0.1.0a0-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
4af78355d3b9d8b57d724530248fe37a659ca86b8155eae773b3e820cc8c2074 - Sigstore transparency entry: 2514639603
- Sigstore integration time:
-
Permalink:
mongodb/atlas-local-lib-py@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Branch / Tag:
refs/tags/v0.1.0-alpha.0 - Owner: https://github.com/mongodb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Trigger Event:
push
-
Statement type:
File details
Details for the file atlas_local_lib_py-0.1.0a0-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: atlas_local_lib_py-0.1.0a0-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4a502edd3cb40a8b98afdd6ae549275bac712c34d492528a0be2f57b2727c7a
|
|
| MD5 |
f1d1d8b653486b2a5cde2715902d0d43
|
|
| BLAKE2b-256 |
e4f4690790fdc9c4569f9ccd0f87ea96a1097673ab2ddf2a5484055622417164
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atlas_local_lib_py-0.1.0a0-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
d4a502edd3cb40a8b98afdd6ae549275bac712c34d492528a0be2f57b2727c7a - Sigstore transparency entry: 2514639591
- Sigstore integration time:
-
Permalink:
mongodb/atlas-local-lib-py@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Branch / Tag:
refs/tags/v0.1.0-alpha.0 - Owner: https://github.com/mongodb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0c9d3f2b887b4ec25d047d7e91940969b7055b06 -
Trigger Event:
push
-
Statement type: