Skip to content

omarftt/API-FastAPI-Postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API FastAPI - Postgres

Docs

1. Getting started

This process required:

  • Python
  • Docker

To check your python version uses this command:

$ python --version
Python 3.9.13

2. Clone

Clone this repository in your local system:

git clone https://github.com/omarftt/API-FastAPI-Postgres.git

3. Installation

Create a virtual environment

virtualenv venv
source venv/bin/activate 

Install all packages required

cd app
pip install -r requirements.txt

Pull required Docker images

docker pull postgres

4. Run the API server using docker-compose

Then, to run the development server using docker-compose, use:

cd ..
docker-compose up

Docker compose will up 3 services: FastAPI, Postgres, and PGAdmin. Use user and password configure in docker-compose.yml file

5. Testing

To evaluate the application, you can insert dummy values into the Postgres database (users table). Execute the following command:

bash init_db.sh

To test this API, you could use FastAPI Docs, Postman o CuRL.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published