Mini API for CRUD Bank Account Bank

Built by : @AndiAlifs

API Documentation

Project Structure

├── main.py                 # Main File, consist of FastAPI App and Logic
├── requirements.txt        # Requirements Package
├── README.md               # This File
├── Database/               # Database Folder
├── ├── database.py         # Database Connection and Model
├── ├── schemas.py          # Pydantic Schema
├── ├── docker-compose.yml  # Docker Compose File for Postgres and PgAdmin

Requirements

  • Python 3.6^
  • FastAPI
  • Uvicorn
  • Docker
    • Docker Compose
    • Postgres Docker Image
    • PgAdmin Docker Image
  • Postman (Optional)

How to Prepare

  1. Download and Install Python 3.6^
  2. Install Requirements Package
pip install -r requirements.txt
  1. Install Docker
  2. Install Docker Compose
  3. Pull Postgres Docker Image
docker pull postgres
  1. Pull PgAdmin Docker Image
docker pull dpage/pgadmin4

How to Run

  1. Run docker-compose
cd Database
docker-compose up -d
cd ..
  1. Create Database
    • Open PgAdmin on http://localhost:5050
    • Login with email admin@admin.com and password admin
    • Create Database with name "sanberhub_pyjun"
  2. Run Uvicorn
uvicorn main:app --reload
  1. Open API Docs on http://localhost:8000/docs
  2. Enjoy, you can try to test the API with Postman