Initial project for learning and becoming familiar with tools and processes.
- Python: 3.11.6
- FastAPI: 0.115.12
- Uvicorn: 0.34.2
- SQLAlchemy: 2.0.40
- PostgreSQL: 17.4
- Psycopg2-binary: 2.9.10
- Python-dotenv: 1.1.0
- Poetry: Dependency management and packaging tool
- Mypy: 1.15.0
- PostgreSQL container for local development and testing environments.
Before running the project, ensure you have the following installed on your machine:
- Docker
- Pyenv
- Python 3.11.6
- Poetry
Clone the project to your local machine:
git clone https://github.com/indigotech/onboard-cesar-souza.git
cd onboard-cesar-souzaCreate a .env file in the root of the project and add the following variables:
POSTGRES_USER=your_postgres_user
POSTGRES_PASSWORD=your_postgres_password
POSTGRES_DB=your_postgres_db_name
TEST_USER=your_test_user
TEST_PASSWORD=your_test_password
TEST_DB=your_test_db_name
DATABASE_URL=postgresql+asyncpg://user:password@localhost/dbRun the following command to start the PostgreSQL container:
docker-compose up -dThis will spin up two PostgreSQL containers (localdb and testdb) on ports 5432 and 5433, respectively.
Install the necessary dependencies using Poetry:
poetry installTo start the FastAPI application, use the command:
poetry run serveThis will start the server at http://localhost:8000.