Skip to content

Instantly share code, notes, and snippets.

import logging
import asyncio
from pathlib import Path
from typing import Optional
from aiogram import Bot, Dispatcher, executor, types
from aiogram.utils.exceptions import TelegramAPIError
from aiogram.types import InlineKeyboardMarkup
from aiogram.contrib.fsm_storage.files import JSONStorage
from aiogram.dispatcher import FSMContext
from aiogram.dispatcher.filters.state import State, StatesGroup
@Birdi7
Birdi7 / callback_data_factory_simple.py
Last active October 29, 2024 18:25
A simple example of usage of callback data factory from aiogram
"""
This is a simple example of usage of CallbackData factory
For more comprehensive example see callback_data_factory.py
"""
import asyncio
import logging
from aiogram import Bot, Dispatcher, executor, types
from aiogram.contrib.fsm_storage.memory import MemoryStorage