generated from geekiot/python-template
Add [architecture]: add base src/ project arch
This commit is contained in:
parent
a1022b2a3b
commit
0c7a537502
15 changed files with 47 additions and 2 deletions
11
src/bot/__init__.py
Normal file
11
src/bot/__init__.py
Normal 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: ...
|
||||||
1
src/bot/handlers/__init__.py
Normal file
1
src/bot/handlers/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
__all__ = []
|
||||||
1
src/bot/handlers/callbacks/__init__.py
Normal file
1
src/bot/handlers/callbacks/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
__all__ = []
|
||||||
1
src/bot/handlers/commands/__init__.py
Normal file
1
src/bot/handlers/commands/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
__all__ = []
|
||||||
1
src/bot/handlers/filters/__init__.py
Normal file
1
src/bot/handlers/filters/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
__all__ = []
|
||||||
1
src/bot/handlers/keyboards/__init__.py
Normal file
1
src/bot/handlers/keyboards/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
__all__ = []
|
||||||
1
src/bot/handlers/states/__init__.py
Normal file
1
src/bot/handlers/states/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
__all__ = []
|
||||||
1
src/bot/middlewares/__init__.py
Normal file
1
src/bot/middlewares/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
__all__ = []
|
||||||
1
src/bot/services/__init__.py
Normal file
1
src/bot/services/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
__all__ = []
|
||||||
4
src/db/__init__.py
Normal file
4
src/db/__init__.py
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
__all__ = ["session"]
|
||||||
|
|
||||||
|
|
||||||
|
from .session import session
|
||||||
0
src/db/models.py
Normal file
0
src/db/models.py
Normal file
3
src/db/session.py
Normal file
3
src/db/session.py
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
from sqlalchemy.ext.asyncio import AsyncSession
|
||||||
|
|
||||||
|
session: AsyncSession = ...
|
||||||
16
src/main.py
16
src/main.py
|
|
@ -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
4
src/redis/__init__.py
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
__all__ = ["client"]
|
||||||
|
|
||||||
|
|
||||||
|
from .session import client
|
||||||
3
src/redis/session.py
Normal file
3
src/redis/session.py
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
from redis.asyncio.client import Redis
|
||||||
|
|
||||||
|
client: Redis = ...
|
||||||
Loading…
Add table
Add a link
Reference in a new issue