semvec/pypi-packages huggingface dataset:
a3mongo 0.3.0
a3mongo is a simple wrapper around pymongo to make it easier to use.
License: MIT
Requires Python: >=3.10

# a3mongo

English | [简体中文](README_ZH.md)

`a3mongo` is a simple wrapper around `pymongo` to make it easier to use.

## 1. Introduction

* Multiple MongoDB services can be configured at the same time.
* Some commonly used methods have been encapsulated.

## 2. Usage

### Install

```shell
pip install a3mongo

```

### Examples

```python
CONF = {
    'site_a': {
        "host": "127.0.0.1",
        "port": 27017,
        "username": "username",
        "password": "password",
        "authSource": "site_a",
        "authMechanism": "SCRAM-SHA-256"
    },
    'site_b': {
        "host": "127.0.0.1",
        "port": 27018,
        "username": "username",
        "password": "password",
        "authSource": "site_b",
        "authMechanism": "SCRAM-SHA-256"
    }
}


from a3mongo import MongoClientFactory, MongoTable


class SiteUser(MongoTable):
    table_name = 'site_user'
    db_conf_name = 'site_a'

    
if __name__ == '__main__':
    MongoClientFactory.init_mongo_clients(conf=CONF)
    site_user = SiteUser()
    site_user.create_table()
    site_user.create_index_list(['name', 'gender', 'email'])
    site_user.upsert_many([
        {'name': 'Alice', 'gender': 'female', 'email': 'alice@example.com'},
        {'name': 'Bob', 'gender':'male', 'email': 'bob@example.com'},
        {'name': 'Charlie', 'gender': 'male', 'email': 'charlie@example.com'},
    ])
    male_users = site_user.find({'gender':'male'})

```
sterces-cli 0.1.0
Command line interface for pykeepass
License: MIT
Requires Python: <4.0,>=3.10

# sterces-cli

[![Build Status](https://github.com/wtfo-guru/sterces/workflows/Sterces-cli/badge.svg)](https://github.com/wtfo-guru/sterces/actions?query=workflow%3ASterces)
[![codecov](https://codecov.io/gh/wtfo-guru/sterces/branch/main/graph/badge.svg)](https://codecov.io/gh/wtfo-guru/sterces)
[![Python Version](https://img.shields.io/pypi/pyversions/sterces.svg)](https://pypi.org/project/sterces/)
[![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide)

## Rationale

I am a retired software engineer. I have a small home lab of less than 10 servers and
workstations. I also manage a very small number of cloud instances. Having a networked
secrets system is not a viable solution for me for several reasons, so I needed a local
secrets tool that could be managed easily via ansible.

Before you mention how insecure this tool is, I must say that it is protected by file
permissions in the home directory of my concierge user account. I take normal
precautions to protect access to this (and other user accounts) so if the concierge or
root account is breached, the contents of my secrets files are the least of my worries.

## Features

- Wrapper functions to allow adding, updating, and looking up data from a keepass database file

- Fully typed with annotations and checked with mypy, [PEP561 compatible](https://www.python.org/dev/peps/pep-0561/)

## Installation

```bash
pipx install sterces-cli

```

or

```bash
pip install sterces-cli

```

## Usage

[HELP](https://github.com/wtfo-guru/sterces-cli/blob/main/USAGE.md)

## Documentation

- [Stable](https://sterces-cli.readthedocs.io/en/stable)

- [Latest](https://sterces-cli.readthedocs.io/en/latest)

## License

[MIT](https://github.com/wtfo-guru/sterces-cli/blob/main/LICENSE)

## Credits

This project uses [`pykeepass`](https://github.com/libkeypass/pykeepass).
This project was tested with [`wemake-python-package`](https://github.com/wemake-services/wemake-python-package).