pyromongo
INTRODUCTION
Persistent Session Storage for Pyrogram with MongoDB
from pyrogram.client import Client
from pyromongo import MongoStorage
from motor.motor_asyncio import AsyncIOMotorClient
client = Client(..)
mongo = AsyncIOMotorClient("mongodb+srv://..")
client.storage = MongoStorage(mongo["pyrogram"], remove_peers=False) # use remove_peers=True to remove all peers on logout
client.run()
Note:
❌ It will not work with the pyrogram context manager.
async def main():
async with Client(..) as client:
client.storage = MongoStorage(..)
# It will only store peers
INSTALLATION:
pip install pyromongo
# Install from git
pip install git+https://github.com/animeshxd/pyromongo
Install dnspython for mongo+srv://.. URIs
pip install dnspython
# or pip install -U pyromongo[srv]
# for Termux use dnspython fork
apt install resolv-conf
pip install git+https://github.com/animeshxd/dnspython
Install with all extra dependencies
pip install "pyromongo[gssapi,aws,ocsp,snappy,srv,zstd,encryption]"
Check other required dependencies for motor https://motor.readthedocs.io/en/stable/installation.html#dependencies
Metadata
Release files for pyromongo 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyromongo-0.0.9.tar.gz | 4.3 kB | Without provenance | Details for pyromongo-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyromongo-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for pyromongo-0.0.9-py3-none-any.whl |
Total release size: 8.5 kB
Release files / pyromongo-0.0.9.tar.gz
| Download URL | pyromongo-0.0.9.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
059093c73997b5e6ca8b84144d247a81e6a122734264c7f1ce500f71d6dd5c07
|
|
BLAKE2b-256 checksum How to use checksums |
5c7759aca14edfb333ae7b79437f01d0798948e50d7fc6a0a69b0ae1f6137694
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / pyromongo-0.0.9-py3-none-any.whl
| Download URL | pyromongo-0.0.9-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34317977d8df7f380890fa72c5fc0ffd32622a8f262f2fdb9d1ed535db31f419
|
|
BLAKE2b-256 checksum How to use checksums |
d5b42ff3371898167abd9ad670718998e59277ae64a9ca0ef6e5ea656c25bae1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Security for pyromongo 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.