Skip to content

ahmadhatahet/fastapi-crud-docker

Repository files navigation

CRUD using Fastapi and Docker

Utilizing FastAPI and MariaDB to create easy to use CRUD (Create-Read-Update-Delete) API in Python. With help of docker this project create two containers:

  1. FastAPI: to maintaine the API
  2. MariaDB: to host the database and perform the CRUD operations.

Steps to run the project:

  1. Make sure you have docker installed 🐳
docker --version

If not please refere to the Docker Website and install from there.

  1. Navigate to your prefered destination and clone the repository
git clone https://github.com/ahmadhatahet/fastapi-crud-docker.git

cd fastapi-crud-docker
  1. start docker containers:
docker compose up -d
  1. Visit: http://localhost:5404/docs

  2. To ingest some sample data for the first time please visit the migrate url. You will recive a response like this:

{'message': 'Created tables and inserted sample data successfully!'}

Preview

Here is a PDF showing all CRUD operation in action.


Note

FastAPI uses the 5404 port, if the port is already occubied in your local, kindly change the port to a prefered one in docker-compose.yml line 13 from 5404 to another one.

About

Performing CRUD operation using Fast API implemented in Docker containers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published