Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/augsmachado/fastapi-postgres
A robust web application built with FastAPI, PostgreSQL, and SQLAlchemy, featuring comprehensive database migrations and modern Python development practices.
https://github.com/augsmachado/fastapi-postgres
docker fastapi postgresql python sqlalchemy
Last synced: 10 days ago
JSON representation
A robust web application built with FastAPI, PostgreSQL, and SQLAlchemy, featuring comprehensive database migrations and modern Python development practices.
- Host: GitHub
- URL: https://github.com/augsmachado/fastapi-postgres
- Owner: augsmachado
- License: apache-2.0
- Created: 2024-12-25T15:39:42.000Z (15 days ago)
- Default Branch: master
- Last Pushed: 2024-12-28T05:07:10.000Z (12 days ago)
- Last Synced: 2024-12-28T05:18:02.644Z (12 days ago)
- Topics: docker, fastapi, postgresql, python, sqlalchemy
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# FastAPI Postgres Project
## Overview
A robust web application built with FastAPI, PostgreSQL, and SQLAlchemy, featuring comprehensive database migrations and modern Python development practices.
![Screenshot 2024-12-28 at 2 06 07 AM](https://github.com/user-attachments/assets/7258e20c-bba3-4254-a2a0-6e15110c20ab)
## 🚀 Features
- FastAPI backend
- PostgreSQL database integration
- SQLAlchemy ORM
- Alembic database migrations
- Comprehensive GitHub Actions workflows
- CodeQL security analysis## 🛠 Tech Stack
- Python 3.11
- FastAPI
- PostgreSQL
- SQLAlchemy
- Alembic
- GitHub Actions
- Docker (optional)## 📦 Prerequisites
- Python 3.11+
- PostgreSQL
- pip## 🔧 Installation
### 1. Clone Repository
```bash
git clone https://github.com/yourusername/fastapi-postgres.git
cd fastapi-postgres
```### 2. Create Virtual Environment
```bash
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```### 3. Install Dependencies
```bash
pip install -r requirements.txt
```### 4. Database Setup
```bash
# Configure your database connection in .env or environment variables
alembic upgrade head
```### 🚦 Running the Application
```bash
uvicorn main:app --reload
```### 🔍 Testing
```bash
pytest
```### 🔐 Security
- CodeQL analysis integrated
- Dependabot for dependency updates
- Regular security scans### 📋 Database Migrations
```bash
# Create a new migration
alembic revision --autogenerate -m "Description of changes"# Apply migrations
alembic upgrade head
```### 🤝 Contributing
Feel free to submit issues or pull requests for improvements or bug fixes. Use the framework below:
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request### 📄 License
This project is licensed under the Apache License 2.0.
See the LICENSE file for details.