mascam97 / fastapi-social-media

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FastAPI Social Media

Minimal System to manage user and publications.

Project goal by mascam97 🥅

Personal project to learn FastAPI / Python.

Achievements 2023 🌟

  • Added a CRUD for publications.
  • Implemented authentication
  • Added testing
  • Added a CRUD for comments
  • Added endpoints to register, logout and update profile
  • Configured hexagonal architecture
  • Added a Docker container
  • Implemented GraphQL
  • Implemented a MySQL database
  • Included a CI/CD pipeline with GitHub Actions
  • Implemented best practices like dotenv and fix PEP 8 style

Getting Started 🚀

These instructions will get you a copy of the project up and running on your local machine.

Prerequisites 📋

The programs you need are:

  • Python 3.10.12.
  • pip 22.0.2 .

Installing 🔧

Install the Python dependencies:

pip install -r requirements.txt

The, copy the .env.example file to .env and fill the variables with your own values.

cp .env.example .env

Finally, run the application with

uvicorn main:app —reload

Running the tests ⚙️

To run the tests, run the following command

python3 -m pytest

Include more dependencies 📦

To include more dependencies into requirements.txt, run the following command

pip3 freeze > requirements.txt

Code style 🎨

To check the code style, and check PEP8 standard, run the following command

autopep8 --in-place --recursive .

Built With 🛠️

  • FastAPI - FastAPI framework, high performance, easy to learn, fast to code, ready for production.
  • pytest - The pytest framework makes it easy to write small tests, yet scales to support complex functional testing.
  • autopep8 - A tool that automatically formats Python code to conform to the PEP 8 style guide.

Authors

Contributing

You're free to contribute to this project by submitting issues and/or pull requests.

License

This project is licensed under the MIT License.

References 📚

About


Languages

Language:Python 100.0%