Skip to content

Instantly share code, notes, and snippets.

View awolverp's full-sized avatar
📚
hard-studying lessons ...

Ali awolverp

📚
hard-studying lessons ...
View GitHub Profile
@awolverp
awolverp / Asynchronous SQLAlchemy Example.md
Last active June 21, 2024 12:04
Asynchronous SQLAlchemy Example | Python

Asynchronous SQLALchemy Example

Note

We won't use relationships in this example; see SQLAlchemy documentation for those.

First of all, we need to install asyncio sqlalchemy by:

pip3 install -U 'sqlalchemy[asyncio]' aiomysql

Pyrogram Forced Join Trick

async def is_joined(app, from_user_id, ids) -> bool:
    """
    Parameters:
        - app (`pyrogram.Client`) - client

        - from_user_id (`int | str`) - user id
@awolverp
awolverp / PythonCheatSheet.md
Created February 9, 2023 12:28
Python Cheat Sheet