Catalog PyPI
PACKAGE EXPLORERView in registry

a3mongo

PyPI

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

Versions collected1
Direct dependencies1From release 0.3.0
Last observed20 Oct, 16:40 UTC

README

Version 0.3.0 documentation

a3mongo

English | 简体中文

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

pip install a3mongo

Examples

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'})

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.3.027 Mar 20251

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

ACCESSIBLE
three-kinds/a3mongo

Shared repository data · GitHub

License detected in repository
MIT
License branch / ref
main
Last push
27 Mar 2025
Archived
No
Contributor identities
— · partial collection

Public sponsor counts have not been collected. These signals belong to the repository owner.

Downloads & popularity

0count
Gauge · observed snapshots20 Oct 2026
10.50
2026-10-20: 0 · observed 2026-10-20T23:03:44.0955032Z
20 Oct20 Oct

github · 1 observations shown. Missing days are unknown.

View observed values
Date / source periodValueObserved at
2026-10-2002026-10-20T23:03:44.0955032Z

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:40 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:6340400570d8820979a60e5fc7c0b5a46bb2ad1e4f663ac8cda7a6714fe1fb28