Skip to content

parikls/pyrogram-aiopg-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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 such

Usage

import aiopg.sa
from pyrogram import Client
from pyrogram_aiopg_storage import PostgreSQLStorage

db_pool = await aiopg.sa.create_engine(...)
session = PostgreSQLStorage(db_pool=db_pool, user_id=..., phone=...)
pyrogram = Client(session_name=session)
await pyrogram.connect()

About

aiopg + sqlalchemy storage for pyrogram

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages