Skip to content

Simple comparison between Django and FastAPI for developing CRUD API

License

Notifications You must be signed in to change notification settings

acirtep/django-fastapi-crud

Repository files navigation

About

This repository is created to show-case how data models, APIs and unit testing are developed in Django Ninja and FastAPI.

The scope of it is for learning purposes only and it is the base for the following Medium articles:

  1. Django and FastAPI: Introduction
  2. Django and FastAPI: One To One Relationships
  3. Django and FastAPI: One To Many Relationships
  4. Django and FastAPI: Many To Many Relationships

Text Analytics With PostgreSQL

The FastAPI codebase is also use for data analysis of Medium articles, using the text analysis features from PostgreSQL. If you are a medium writer, export your articles and place them under medium_data. Run:

  1. make fastapi_app
  2. in another shell, load_medium_data

Articles:

  1. Text Analytics With PostgreSQL And SQLAlchemy - Part1
  2. 3 Ways To Filter On Order In PostgreSQL
  3. Term Frequency With PostgreSQL
  4. 100 Medium Articles

Pre-requisites:

  1. docker
  2. docker-compose

Django

Django docs: https://www.djangoproject.com/

Django Ninja docs: https://django-ninja.dev/

  1. make django_app, to run the app at http://0.0.0.0:3010
  2. make django_test, to execute the tests

FastAPI

FastAPI docs: https://fastapi.tiangolo.com/

SQLAlchemy docs: https://docs.sqlalchemy.org/en/20/

Alembic: https://alembic.sqlalchemy.org/en/latest/

  1. make fastapi_app, to run the app at http://0.0.0.0:3011
  2. make fastapi_test, to execute the tests

Others

About

Simple comparison between Django and FastAPI for developing CRUD API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages