https://github.com/zeroniki/fasttask
https://github.com/zeroniki/fasttask
aiogram alembic async fastapi httpx python3 telegram-api
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zeroniki/fasttask
- Owner: ZeroNiki
- Created: 2024-12-03T09:51:03.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-11T12:30:06.000Z (6 months ago)
- Last Synced: 2025-02-09T13:13:47.450Z (4 months ago)
- Topics: aiogram, alembic, async, fastapi, httpx, python3, telegram-api
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FastTask
- Navigation:
- [About](https://github.com/ZeroNiki/FastTask/blob/main/README.md#about)
- [Features](https://github.com/ZeroNiki/FastTask/blob/main/README.md#features)
- [Components](https://github.com/ZeroNiki/FastTask/blob/main/README.md#components)
- [Install and usage](https://github.com/ZeroNiki/FastTask/blob/main/README.md#install-and-usage)[RU README](https://github.com/ZeroNiki/FastTask/blob/main/README_RUS.md)
## About
This project is a Task Management Bot using the Aiogram framework for Telegram bot interaction and FastAPI for backend operations. It integrates a SQLite database via SQLAlchemy ORM to manage users and tasks. The bot allows users to create, view, update, and delete tasks with seamless interaction and error handling.### Features
- User Management: Automatic registration of users on their first interaction with the bot.
- Task Management: Create, view, update, and delete tasks. Tasks are stored in the database and associated with specific users.
- Error Handling: Logs and replies to users in case of errors during API calls.
- Interactive Telegram Interface: Rich text formatting and custom keyboards for easy user interaction.#### Components
##### Telegram Bot
- Aiogram framework handles bot commands and messages.
- Command Handlers for starting the bot, registering users, and viewing tasks.
- Interactive Keyboard options for task management.##### FastAPI Backend
- Exposes API endpoints for managing users and tasks:
- POST `/operations/users:` Create a new user.
- POST `/operations/tasks:` Create a task.
- GET `/operations/tasks/{user_id}:` Retrieve tasks for a user.
- PATCH `/operations/tasks/{task_id}:` Mark task as done.
- DELETE `/operations/tasks/{task_id}:` Delete a task.## Install and usage
Clone repo:
```sh
git clone https://github.com/ZeroNiki/FastTask.gitcd FastTask
```Install requirements:
```
pip install -r requirements.txt
```in `.env` file paste you telegram bot `TOKEN`:
```
TOKEN=you bot token
```Update database:
```sh
mkdir migrations/versionsalembic revision --autogenerate -m "Init"
alembic upgrade head
```Start `api` and `bot`:
```sh
python3 start_api.pypython3 start_bot.py
```Done!