https://github.com/xanhex/fastnames
Async nicknames provider
https://github.com/xanhex/fastnames
asyncio bootstrap5 docker-compose fastapi postgresql pytest python3 sqlalchemy
Last synced: 3 months ago
JSON representation
Async nicknames provider
- Host: GitHub
- URL: https://github.com/xanhex/fastnames
- Owner: xanhex
- License: apache-2.0
- Created: 2023-10-01T14:56:11.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-05T12:34:15.000Z (over 2 years ago)
- Last Synced: 2025-01-02T11:44:18.366Z (over 1 year ago)
- Topics: asyncio, bootstrap5, docker-compose, fastapi, postgresql, pytest, python3, sqlalchemy
- Language: Python
- Homepage:
- Size: 265 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fastnames
A fully asynchronous Fast API service that provides the user with nickname
options and the ability to add them to the PostgreSQL database.
It has modern responsive interface and the dark theme.
## Technologies
- Python
- FastAPI
- Asyncio
- SQLAlchemy
- PostgreSQL
- Pytest
- Jinja2
- Bootstrap 5
- CSS
- Uvicorn
- Docker
## Standards
- pep8
- flake8
- black
- pymarkdown
## How to run
1. Clone the repository
2. To run on PostgreSQL instead of SQLite (default), put `.env` file into
`fastnames` folder with such content:
```env
POSTGRES_DB=db_name
POSTGRES_USER=db_user
POSTGRES_PASSWORD=db_pswd
DB_PORT=5432
DATABASE_URL=postgresql+asyncpg://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres_db:${DB_PORT}/${POSTGRES_DB}
```
3. From the root folder run:
```bash
docker compose up
```
## Local development and testing
1. Clone the project, activate virtual environment and install
dependencies from `fastnames/requirements.txt` file
2. To test the current functionality run `pytest` command
## Demo


