Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/parikls/pyrogram-aiopg-storage
aiopg + sqlalchemy storage for pyrogram
https://github.com/parikls/pyrogram-aiopg-storage
Last synced: about 1 month ago
JSON representation
aiopg + sqlalchemy storage for pyrogram
- Host: GitHub
- URL: https://github.com/parikls/pyrogram-aiopg-storage
- Owner: parikls
- Created: 2021-04-14T22:14:32.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-28T16:58:04.000Z (almost 3 years ago)
- Last Synced: 2024-10-03T18:44:41.200Z (about 1 month ago)
- Language: Python
- Size: 5.86 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Pyrogram aiopg storage
======================Motivation
----------I need to work with multiple telegram session and keep all of them in a single PostgreSQL database.
I use aiopg with SQLAlchemy hence I've written a wrapper for this stack.
Maybe someone also requires suchUsage
-----```python
import aiopg.sa
from pyrogram import Client
from pyrogram_aiopg_storage import PostgreSQLStoragedb_pool = await aiopg.sa.create_engine(...)
session = PostgreSQLStorage(db_pool=db_pool, user_id=..., phone=...)
pyrogram = Client(session_name=session)
await pyrogram.connect()```