full-stack-fastapi-postgresql
openapi-generator
Our great sponsors
full-stack-fastapi-postgresql | openapi-generator | |
---|---|---|
23 | 206 | |
12,050 | 16,571 | |
- | 3.0% | |
0.0 | 9.9 | |
16 days ago | 4 days ago | |
Python | Java | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
full-stack-fastapi-postgresql
- Is there any open source project that uses FasAPI?
-
How to build a scalable project file structure for a beginner.
I've just recently switched to a structure that follows Netflix's Dispatch application after starting with https://github.com/tiangolo/full-stack-fastapi-postgresql and it feels way better and organized.
- ORM for FastAPI+PostgreSQL, Tortoise or Sqlalchemy? what would you choose and why?
-
FastAPI Best Practices
I would encourage you to take a look at this repo: https://github.com/tiangolo/full-stack-fastapi-postgresql This is a boilerplate of an application made with fastapi, prepared by the creator of the fastapi himself. You can even set it up yourself locally and have a look how it’s organised. I know it has a lot of different services included, but I find the fastapi part itself to be well thought. Inside the api directory you can notice another folder named api_v1, so you can have multiple versions of your API routes when needed, with the general code in other places that is more generic and can be reused in all your different API versions. The schemas are separated from the models and models itself have different classes depending on what you would actually like to do with the data. The migrations are managed with alembic based on schemas rather than models itself. The settings are a python class that implicitly reads the .env file in your project’s directory. And many, many other interesting patterns to explore. Too much to write in one comment to be honest.
-
Is there public repo showing production level code of REST APIs using FastAPI
Have a look at Full Stack FastAPI and PostgreSQL - Base Project Generator
While that is a good base, it can be a bit outdated in places. I would suggest checking out this issue on the topic
-
I wrote an alternative for the official FastAPI full stack project generator (more info in comment)
Hi, earlier this year I built a project using the official FastAPI full stack example. While working on my project, I realised that the FastAPI ecosystem has matured a lot since that template was created and many things that I ended up writing code for was already solved by others. And I didn't want to keep reinventing the wheel.
- Suggest a learning Docker project
- Best method to use docker in dev, test, and production
-
FastAPI framework, high perf, easy to learn, fast to code, ready for production
I'm glad you're liking FastAPI!
You could check the official project generator, it includes a simple Vue.js front end: https://github.com/tiangolo/full-stack-fastapi-postgresql
Although I'm currently using React with TypeScript and hooks, and it's a great development experience. I plan on adding it to the project generator later.
openapi-generator
-
OpenAPI v4 Proposal
https://github.com/OpenAPITools/openapi-generator
Reviews are mixed though.
I've tried using OpenAPI a few times, it's been...lackluster... I probably won't use it again.
Here are my gripes:
1) For me one of the biggest selling points is client code gen (https://github.com/OpenAPITools/openapi-generator). Basically it sucks, or at least it sucks in enough languages to spoil it. The value prop here is define the API once, code gen the client for Ruby, Python and Scala (or insert your languages here). Often there are a half dozen clients for each language, often they are simply broken (the generated code just straight up doesn't compile). Of the ones that do work, you get random PRs accepted that impose a completely different ideological approach to how the client works. It really seems like any PR is accepted with no overarching guidance.
2) JSONSchema is too limited. We use it for a lot of things, but it just makes some things incredibly hard. This is compounded by the seemingly limitless number of version or drafts of the spec. If your goal is interop, which it probably is if you are using JSON, you have to go our and research what the lower common denominator draft spec JSONSchema support is for the various languages you want to use and limit yourself to that (probably draft 4, or draft 7).
-
Looking for an alternative to NSwag
Check out https://openapi-generator.tech/
-
I made a modern wrapper for the outdated Irish Rail Realtime API using Flask, Marshmallow and OpenAPI
I thought about publishing NPM and PyPI packages once I clean it up a bit. Until then though you can autogenerate a Python client using the OpenAPI code gen tool. That's what I would be doing to create the package anyway.
-
Tips on Creating a Design-First API Using Rust
How about this; there's some rust samples in there - https://github.com/OpenAPITools/openapi-generator/tree/master
-
how to keep the front end and back end models in sync?
Unless you are trying to build some kind of offline mode, all your frontend should know about the backend is the response schema. You could feed an OpenAPI spec to something like https://openapi-generator.tech/ and generate a Dart client. Then, whenever some endpoint changes you will have to regenerate the client. Bonus points for doing API versioning.
-
Torn between Flask, Django or FastAPI
Take a look at OpenAPI generator (https://openapi-generator.tech). You define your REST schema, and it will generate server stub code for you (flask and fastapi are supported, among others). It's not pretty, but it'll get you up and running quickly and you can see which one you like better.
-
Building a dev.to analytics dashboard using OpenSearch
While I could have written out a full API to talk to the Forem API, this would have taken a long time and I had an OpenAPI spec document, so I used OpenAPI Generator which can pretty much instantly generate a full API integration, just from the OpenAPI spec. While I'm using C# and .Net 6, this tool has a pretty large list of supported languages, so if you wanted to code something similar, you could absolutely use your language of choice, rather than C#.
-
Hey Rustaceans! Got a question? Ask here (12/2023)!
I was thinking of using OpenAPI Generator to generate a Rust server stub for me. Problem: the generator generates a crate with numerous modules and a rather complicated manifest, not a single module that I can straightforwardly include!. How do I integrate this into my project, then? I can download and run the generator in build.rs, but Cargo doesn't support depending on a crate generated by the build script, so how do I actually use it?
-
openapi-generator vs janephp?
I have a project using openapi-generator. Our system works well, and we have a number of custom mustache template overrides. That said, janephp looks appealing to me as it's php native, would remove java dependencies, and be fully manageable through composer.
What are some alternatives?
NSwag - The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
fastapi-react - 🚀 Cookiecutter Template for FastAPI + React Projects. Using PostgreSQL, SQLAlchemy, and Docker
oapi-codegen - Generate Go client and server boilerplate from OpenAPI 3 specifications
smithy - Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
SvelteKit - web development, streamlined
fastapi-starter - A FastAPI based low code starter/boilerplate: SQLAlchemy 2.0 (async), Postgres, React-Admin, pytest and cypress
django-ninja - 💨 Fast, Async-ready, Openapi, type hints based framework for building APIs
autorest - OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python
uvicorn-gunicorn-fastapi-docker - Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python with performance auto-tuning. Optionally with Alpine Linux.
cookiecutter-djangopackage - A cookiecutter template for creating reusable Django packages quickly.
smithy-go - Smithy code generators for Go (in development)
swagger-petstore - swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.