pyromongo


Namepyromongo JSON
Version 0.0.9 PyPI version JSON
download
home_pagehttps://github.com/animeshxd/pyromongo
SummaryMongo Session Storage for pyrogram
upload_time2024-06-07 07:59:24
maintainerNone
docs_urlNone
authorAnimesh Murmu
requires_python>=3.7.0
licenseMIT
keywords async mongo session storage pyrogram
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyromongo
## INTRODUCTION 
Persistent Session Storage for Pyrogram with MongoDB

```python
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.
   ```python
   async def main():
       async with Client(..) as client:
           client.storage = MongoStorage(..)
   
   # It will only store peers
   ```
 ### INSTALLATION:
  ```bash
  pip install pyromongo

  # Install from git
  pip install git+https://github.com/animeshxd/pyromongo
  ```
  Install dnspython for `mongo+srv://..` URIs
   ```bash
   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
   ```bash
   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
  

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/animeshxd/pyromongo",
    "name": "pyromongo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7.0",
    "maintainer_email": null,
    "keywords": "async mongo session storage pyrogram",
    "author": "Animesh Murmu",
    "author_email": "am2646374@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5c/77/59aca14edfb333ae7b79437f01d0798948e50d7fc6a0a69b0ae1f6137694/pyromongo-0.0.9.tar.gz",
    "platform": null,
    "description": "# pyromongo\n## INTRODUCTION \nPersistent Session Storage for Pyrogram with MongoDB\n\n```python\nfrom pyrogram.client import Client\nfrom pyromongo import MongoStorage\nfrom motor.motor_asyncio import AsyncIOMotorClient\n\nclient = Client(..)\nmongo = AsyncIOMotorClient(\"mongodb+srv://..\")\nclient.storage = MongoStorage(mongo[\"pyrogram\"], remove_peers=False) # use remove_peers=True to remove all peers on logout\n\n\nclient.run()\n```\n## Note:\n  \u274c It will not work with the pyrogram context manager.\n   ```python\n   async def main():\n       async with Client(..) as client:\n           client.storage = MongoStorage(..)\n   \n   # It will only store peers\n   ```\n ### INSTALLATION:\n  ```bash\n  pip install pyromongo\n\n  # Install from git\n  pip install git+https://github.com/animeshxd/pyromongo\n  ```\n  Install dnspython for `mongo+srv://..` URIs\n   ```bash\n   pip install dnspython\n   # or pip install -U pyromongo[srv]\n    \n   # for Termux use dnspython fork\n   apt install resolv-conf\n   pip install git+https://github.com/animeshxd/dnspython\n   ```\n   Install with all extra dependencies\n   ```bash\n   pip install \"pyromongo[gssapi,aws,ocsp,snappy,srv,zstd,encryption]\"\n   ```\n  Check other required dependencies for motor\n  https://motor.readthedocs.io/en/stable/installation.html#dependencies\n  \n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Mongo Session Storage for pyrogram",
    "version": "0.0.9",
    "project_urls": {
        "Homepage": "https://github.com/animeshxd/pyromongo"
    },
    "split_keywords": [
        "async",
        "mongo",
        "session",
        "storage",
        "pyrogram"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5b42ff3371898167abd9ad670718998e59277ae64a9ca0ef6e5ea656c25bae1",
                "md5": "1460e4d55a85752518ed99283ccfd86e",
                "sha256": "34317977d8df7f380890fa72c5fc0ffd32622a8f262f2fdb9d1ed535db31f419"
            },
            "downloads": -1,
            "filename": "pyromongo-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1460e4d55a85752518ed99283ccfd86e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.0",
            "size": 4245,
            "upload_time": "2024-06-07T07:59:21",
            "upload_time_iso_8601": "2024-06-07T07:59:21.626323Z",
            "url": "https://files.pythonhosted.org/packages/d5/b4/2ff3371898167abd9ad670718998e59277ae64a9ca0ef6e5ea656c25bae1/pyromongo-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5c7759aca14edfb333ae7b79437f01d0798948e50d7fc6a0a69b0ae1f6137694",
                "md5": "6c1a3321ca60463bc0584121bd89f4b9",
                "sha256": "059093c73997b5e6ca8b84144d247a81e6a122734264c7f1ce500f71d6dd5c07"
            },
            "downloads": -1,
            "filename": "pyromongo-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "6c1a3321ca60463bc0584121bd89f4b9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.0",
            "size": 4259,
            "upload_time": "2024-06-07T07:59:24",
            "upload_time_iso_8601": "2024-06-07T07:59:24.085522Z",
            "url": "https://files.pythonhosted.org/packages/5c/77/59aca14edfb333ae7b79437f01d0798948e50d7fc6a0a69b0ae1f6137694/pyromongo-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-07 07:59:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "animeshxd",
    "github_project": "pyromongo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pyromongo"
}
        
Elapsed time: 0.78313s