https://github.com/alina1412/game_bot
a game bot for vk chat
https://github.com/alina1412/game_bot
alembic docker fastapi make poetry pytest python rabbitmq sqlalchemy vk-api
Last synced: about 2 months ago
JSON representation
a game bot for vk chat
- Host: GitHub
- URL: https://github.com/alina1412/game_bot
- Owner: alina1412
- Created: 2025-01-29T08:50:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-08T07:08:16.000Z (over 1 year ago)
- Last Synced: 2025-07-06T01:05:02.687Z (12 months ago)
- Topics: alembic, docker, fastapi, make, poetry, pytest, python, rabbitmq, sqlalchemy, vk-api
- Language: Python
- Homepage:
- Size: 155 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## VK Game Bot 🎮 (with FastApi and VK api)
A game bot for VK chat built with FastAPI and VK API.
This bot integrates with VK chat for gameplay, uses RabbitMQ for message queuing and PostgreSQL for data storage.
It requires token for vk bot in config.yml.
### 🛠️ Technology Stack
- Core: Python, FastAPI, VK API
- Database: PostgreSQL, SQLAlchemy, Alembic
- Infrastructure: Docker, RabbitMQ
- Tools: Poetry, pytest, make
### Quick Start
Prerequisites
- Python 3.10.x (see .python-version)
- Docker
- Poetry (optional)
### 📸 Screenshots

### Setup
- check file .python-version
- creating virtual environment or (`pyenv exec python -m venv .venv`),
- `cp .env.example .env` # Configure your variables
- `cp config_example.yml config.yml` # Configure your variables
- `poetry install`
- `make up` # Starts PostgreSQL and RabbitMQ in docker
- `make alembic`
- running using poetry and make: `make run`
- Access API docs: http://localhost:8000/docs/
### notes
enter docker container (example):
`docker exec -it 47dece677d93 bash`
in host console:
`psql -h 127.0.0.1 -p 5433 -U user postgres -d db_game`
### alembic:
`alembic init -t async migration`
`alembic revision --autogenerate -m 'initial'`
edit files configs:
`sqlalchemy.url = postgresql+asyncpg://%(DB_USERNAME)s:%(DB_PASSWORD)s@%(DB_HOST)s:%(DB_PORT)s/%(DB_NAME)s`