Skip to content

Instantly share code, notes, and snippets.

View IvanIsak2000's full-sized avatar
🎯
Focusing

Iwan Sakharov ⚙️ IvanIsak2000

🎯
Focusing
View GitHub Profile
# pip install cryptography
from cryptography.fernet import Fernet
class LockBoxServer:
def __init__(self):
session_key = Fernet.generate_key()
print(f"{session_key=}")
self.fernet = Fernet(session_key)
@IvanIsak2000
IvanIsak2000 / logger.py
Created June 19, 2024 12:30
Aiogram logger alert
from logtail import LogtailHandler
import logging
import requests
from utils.config import LOG_TOKEN
from utils.config import BOT_KEY
from utils.config import MODERATOR_ID
class AiogramAlertLogger():