Skip to content

asmaur/fastapi-blog-course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Development

Python FastAPI Mysql Docker JWT

This project is an API built using Pyhon, FastAPI, MySQL as the database, JWT for authentication control.

This project was build for API Development with Python and FastAPI Course and may be available on my Youtube Channel, to demonstrate how to configure Authentication and Implement Security using JWT token.

Table of Contents

Installation

  1. Clone the repository:
[email protected]:asmaur/fastapi-blog-course.git

Make sure you have Docker and Docker compose installed and working on your computer

Usage

  1. Start the application with Docker compose docker compose up

    if the app fail to connect to the database at first run. Kill all container and try again.

  2. The API will be accessible at http://localhost:8080/

API Endpoints

The API provides the following endpoints:

GET /blog - Retrieve a list of all post. (all authenticated users)

GET /blog/{id} - Retrieve a list of all products. (all authenticated users)

POST /blog - Create a new post (all authenticated users).

PUT /blog/{id} - Update a post. (all authenticated users)

DELETE /blog/{id} - Delete a post. (all authenticated users)

POST /login - Login into the App

POST /users - Register a new user into the App

Authentication

The API uses JWT for authentication control.

Database

The project utilizes MySQL as the database. The necessary database migrations are managed using SQLAlchemy.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request to the repository.

When contributing to this project, please follow the existing code style, commit conventions, and submit your changes in a separate branch.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published