Metadata-Version: 2.1
Name: axolotl-dbu
Version: 0.1.2
Summary: Teia Labs DB Utils packege
Home-page: https://github.com/TeiaLabs/axolotl
Author: TeiaLabs
Author-email: contato@teialabs.com
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: rich
Requires-Dist: typer
Requires-Dist: python-dotenv
Requires-Dist: pymongo
Requires-Dist: pymilvus
Requires-Dist: numpy
Requires-Dist: PyYAML
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: redb-odm ; extra == 'test'

# Axolotl 

<img src="resources/images/axolotl.png" align="center" width="256">

 

 # 

# db utils

## install
```bash
pip install axolotl-dbu
```

## dev install 
```bash
pip install -e ./
cp example.env .env
```

# cli help
```bash
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
```yml
local: mongodb://localhost:27017
beta: mongodb+srv://<user>:<password>@some-cluster.mongodb.net/
```

## move db form one cluster to another

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



# example
```python
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"
)
```
