Add [architecture]: add base src/ project arch

This commit is contained in:
Kirill Samoylenkov 2025-10-18 22:40:10 +05:00
parent a1022b2a3b
commit 0c7a537502
15 changed files with 47 additions and 2 deletions

11
src/bot/__init__.py Normal file
View file

@ -0,0 +1,11 @@
__all__ = ["start_bot"]
from redis.asyncio.client import Redis
from sqlalchemy.ext.asyncio import AsyncSession
async def start_bot(
redis_client: Redis,
database_session: AsyncSession,
) -> None: ...

View file

@ -0,0 +1 @@
__all__ = []

View file

@ -0,0 +1 @@
__all__ = []

View file

@ -0,0 +1 @@
__all__ = []

View file

@ -0,0 +1 @@
__all__ = []

View file

@ -0,0 +1 @@
__all__ = []

View file

@ -0,0 +1 @@
__all__ = []

View file

@ -0,0 +1 @@
__all__ = []

View file

@ -0,0 +1 @@
__all__ = []

4
src/db/__init__.py Normal file
View file

@ -0,0 +1,4 @@
__all__ = ["session"]
from .session import session

0
src/db/models.py Normal file
View file

3
src/db/session.py Normal file
View file

@ -0,0 +1,3 @@
from sqlalchemy.ext.asyncio import AsyncSession
session: AsyncSession = ...

View file

@ -1,5 +1,17 @@
def main(): import asyncio
print("Hello from urfu-daddy!")
from .bot import start_bot
from .db import session
from .redis import client
def main() -> None:
asyncio.run(
start_bot(
redis_client=client,
database_session=session,
)
)
if __name__ == "__main__": if __name__ == "__main__":

4
src/redis/__init__.py Normal file
View file

@ -0,0 +1,4 @@
__all__ = ["client"]
from .session import client

3
src/redis/session.py Normal file
View file

@ -0,0 +1,3 @@
from redis.asyncio.client import Redis
client: Redis = ...