File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11SHELL := /bin/bash
22
33configure : venv
4- source ./venv/bin/activate && pip install --force-reinstall - r requirements.txt -r requirements.dev.txt
4+ source ./venv/bin/activate && pip install -r requirements.txt -r requirements.dev.txt
55
66venv :
7- python3.12 -m venv venv
7+ python3.11 -m venv venv
88
99format :
1010 source ./venv/bin/activate && autoflake -r --in-place --remove-all-unused-imports ./src
1111 source ./venv/bin/activate && isort ./src
1212 source ./venv/bin/activate && black ./src
1313
1414db :
15- # docker
15+ docker run -d -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust --name db-random_coffee_bot postgres:15
1616
1717migrate :
18- source ./venv/bin/activate && alembic upgrade head
18+ source ./venv/bin/activate && alembic upgrade head
19+
20+ run :
21+ source ./venv/bin/activate && python -m src
Original file line number Diff line number Diff line change 1- pydantic
2- pydantic-settings
31sqlalchemy
42psycopg2-binary
5- aiogram
3+ aiogram
4+ pydantic == 2.11.7
5+ pydantic-settings == 2.10.1
6+ pydantic_core == 2.33.2
Original file line number Diff line number Diff line change 11from aiogram import Router
22from aiogram .filters import Command
33from aiogram .types import Message
4+ from src .utils .answers import Answers
45
56router = Router ()
6-
7+ answers = Answers ()
78
89@router .message (Command ("help" ))
910async def cmd_help (message : Message ):
10- await message .answer ("Это справочное сообщение. Чем могу помочь?" )
11+ await message .answer (answers . help )
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class Settings(BaseSettings):
66 """Application settings"""
77
88 BOT_TOKEN : str
9- DB_DSN : PostgresDsn
9+ # DB_DSN: PostgresDsn
1010 # MARKETING_URL: str //future tasks
1111
1212 model_config = ConfigDict (case_sensitive = True , env_file = ".env" , extra = "allow" )
Original file line number Diff line number Diff line change 1- # ready answers
1+ from dataclasses import dataclass
2+
3+ @dataclass
4+ class Answers :
5+ test = "some answer"
6+ help = (
7+ "Я рандом кофе бот для встреч\n "
8+ "/help - вывести все команды"
9+ "/..."
10+ )
You can’t perform that action at this time.
0 commit comments