GithubHelp home page GithubHelp logo

grillazz / fastapi-postgis Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 450 KB

Integration of FastAPI framework supported by Pydantic with SQLAlchemy ORM and PostGIS on psycopg driver

License: MIT License

Dockerfile 6.63% Python 85.38% Makefile 5.23% Mako 2.77%
docker-compose fastapi fastapi-sqlalchemy geoalchemy2 postgis pydantic-v2 python3 sqlalchemy

fastapi-postgis's Introduction

fastapi-postgis

Contributors Forks Stargazers Issues MIT License LinkedIn

fastapi-postgis

Table of Contents
  1. About The Project
  2. Getting Started
  3. Acknowledgments

About The Project

This example demonstrates the seamless integration of FastAPI, a modern, high-performance web framework, with Pydantic 2.0, a robust and powerful data validation library. The integration is further enhanced by the use of SQLAlchemy ORM, a popular and feature-rich Object-Relational Mapping tool, and PostGIS16, a spatial database extender for PostgreSQL that enables efficient storage, indexing, and querying of geospatial data.

The entire stack is connected using the psycopg Database Client Library, which provides a robust and efficient way to interact with PostgreSQL databases in Python, leveraging the power of asyncio and event loops.

Notably, this example showcases the latest and greatest versions of SQLAlchemy and psycopg, which are renowned for their robustness, power, and speed. The inclusion of FastAPI adds a modern, fast, and high-performance web framework to the mix allowing for the rapid development of APIs with Python 3.8+.

FastAPI has received significant recognition in the industry, including a review on thoughtworks Technology Radar in April 2021, where it was classified as a Trial technology, with comments praising its performance, ease of use, and features such as API documentation using OpenAPI. Additionally, FastAPI was recognized in the Python Developers Survey 2022 Results, conducted by the Python Software Foundation and JetBrains, where it was reported that 1 in 4 Python developers use FastAPI, with a 4 percentage point increase from the previous year.

Built With

FastAPI Pydantic SQLAlchemy Uvicorn pytest psycopg alembic rich

(back to top)

Getting Started

Make will help you

To build , run and test and more ... use magic of make help to play with this project.

1. make docker-build
2. make docker-up
3. make docker-alembic-migrate

(back to top)

Local development with poetry

pyenv install 3.12 && pyenv local 3.12
poetry install

Hope you enjoy it.

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)

Change Log

  • [long time ago...] it was a long time ago in galaxy far far away...

(back to top)

fastapi-postgis's People

Contributors

grillazz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

chandan0000

fastapi-postgis's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.