Skip to main content

Teia Labs DB Utils packege

Project description

Axolotl

db utils

install

pip install axolotl-dbu

dev install

pip install -e ./
cp example.env .env

cli help

axolotl --help 
axolotl backup-and-restore --help
axolotl db-utils --help

config file

create a axolotl-clusters.yml file in the /.config directory in your home

cluster config file

local: mongodb://localhost:27017
beta: mongodb+srv://<user>:<password>@some-cluster.mongodb.net/

move db form one cluster to another

axolotl db-utils move-db-cluster -oc beta -dc local -db jokes -p ./tmp

example

import os
import dotenv
from axolotl import BackupAndRestoreClient

dotenv.load_dotenv()

client = BackupAndRestoreClient(db_uir=os.getenv("MONGO_DB_URI"))
client.backup_collection(
    db="jokes", collection="funny-jokes", path="./results"
)

Project details


Download files

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

Source Distribution

axolotl-dbu-0.1.2.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

axolotl_dbu-0.1.2-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page