FastAPI logo

FastAPI

A high performance, easy to learn, fast to code, ready for production web framework
1.1K
664
+ 1
43

What is FastAPI?

It is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.
FastAPI is a tool in the Microframeworks (Backend) category of a tech stack.
FastAPI is an open source tool with GitHub stars and GitHub forks. Here’s a link to FastAPI's open source repository on GitHub

Who uses FastAPI?

Companies
173 companies reportedly use FastAPI in their tech stacks, including HENNGE K.K., Payhere, and Primer.

Developers
785 developers on StackShare have stated that they use FastAPI.

FastAPI Integrations

Python, OpenAPI, htmx, Qdrant, and Haystack NLP Framework are some of the popular tools that integrate with FastAPI. Here's a list of all 17 tools that integrate with FastAPI.
Pros of FastAPI
11
Python
10
Rapid Development
7
Documentation
6
Super Lightweight
5
Open Source
3
Fast performance
1
Add a pro
Decisions about FastAPI

Here are some stack decisions, common use cases and reviews by companies and developers who chose FastAPI in their tech stack.

Needs advice
on
AstroAstroSvelteKitSvelteKit
and
Vue.jsVue.js

Hello everybody! I want to create an easy to use website (and simplified) builder. Users create a site, add their domain and edit Pages inside an Admin Area inside predefined "Blocks" like with Wagtail.

There should be several default templates/themes and layouts. Choosing a different theme might change both the layout and styling. And I'm looking for SSR or SSG with a focus on the end-user's Page performance.

Current Stack:

  • GraphQL for the dynamic part (for example data to Pricing might not be required on the homepage, or images might go into gallery in one theme, and on the homepage in another theme)

  • FastAPI and SQLAlchemy to store Data. I have prior experience with Wagtail and Django and want to stay with Python and learn Fastapi

  • NGINX to handle domain-specific things (the how is not yet refined)

I want a scalable architecture and especially a fast frontend. I'm tending to use SvelteKit, but I'm afraid that the dynamic part won't make me happy after having hundreds of sites, as the bundler cannot load themes dynamically. sveltekit - dynamic import

I want to handle the scenario: Admin-User chooses a theme and other options for the site (domain) and the End-User Frontend/Session/Cookie will have to fetch and store data about the theme and load subsequent calls to prerendered sites.

Also the "hundreds of sites" might not be all covered by 5 Themes, because users may purchase a custom-made theme, and I would have to manage one big project having lots of different Styleguides and flows. I even thought of statically building the site whenever the user makes a change, maybe using Hugo (or VitePress?). Then I would have to take more care with the page recreation and it would be easily routable instead of nesting every component with logic in the frontend... I think. But this I haven't thought through yet.

Can anyone please help?

See more
Needs advice
on
DjangoDjangoFastAPIFastAPI
and
Next.jsNext.js

I need to build a virtual trading website for a client. I'm considering Next.js for the frontend but can't decide whether to use FastAPI or Django as the backend.

I'll use PostgreSQL for the database. Also, there will be a Mobile version of the website using Flutter. It needs to be able to connect with the backend.

Any advice is greatly appreciated.

See more
Arthur Henrique Della Fraga
Software Solution Architect at Supernova · | 5 upvotes · 159.8K views
Needs advice
on
PostmanPostman
and
RapidAPIRapidAPI

I'm starting to implement a new full-stack application and adopting an API-first development approach. Right now deciding which of these tools to use to build, mock and track the evolution of my just-born OpenAPI specification.

I'm already familiar with Postman when it comes to consuming ready-to-use implemented API, but not yet with its API-build features. As well as I barely know how FastAPI could help with this goal.

I would like to understand if there'd be a big difference of usage and capabilities between these tools. And any other one that could help on development, test and documentation of a REST API.

Thanks a lot for helping on this!

See more
Needs advice
on
Amazon S3Amazon S3FastAPIFastAPI
and
PostgreSQLPostgreSQL

Hello, I am trying to build a hobby API that can handle B2B tasks for the supply chain management process. And can be consumed to fit different platforms, such as, mobile applications(android, Ios), & a web app. I am not experienced in building enterprise-grade software. So, I am seeking advice if FastAPI can be used for such software and any other tools or stacks I can apply. Thank you in advance.

See more
Needs advice
on
DjangoDjango
and
FastAPIFastAPI

I need to build a full authentication and authorisation service, one of many services in my application. I am deciding between Django and FastAPI to implement this service. The full scope of the service will be authentication, roles and permissions.

My major concerns are developer experience and time savings. Please advise with reasons to choose one over the other.

See more
Needs advice
on
DjangoDjango
and
FastAPIFastAPI

I'm a Data Engineer, looking to build some web apps in my spare time, especially on weekends. I'm debating between choosing Django over FastAPI. What I am pondering are performance, development speed, ease of management, scalability, and support if I ever need to use another frontend framework (eg React). Please help me with advice, I would appreciate it!

See more

FastAPI's Features

  • Very high performance, on par with NodeJS and Go
  • Increase the speed to develop features by about 200% to 300%
  • Reduce about 40% of human (developer) induced errors
  • Great editor support. Completion everywhere. Less time debugging
  • Designed to be easy to use and learn. Less time reading docs
  • Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs
  • Get production-ready code. With automatic interactive documentation

FastAPI Alternatives & Comparisons

What are some alternatives to FastAPI?
JavaScript
JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
Node.js
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
HTML5
HTML5 is a core technology markup language of the Internet used for structuring and presenting content for the World Wide Web. As of October 2014 this is the final and complete fifth revision of the HTML standard of the World Wide Web Consortium (W3C). The previous version, HTML 4, was standardised in 1997.
PHP
Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
See all alternatives
Related Comparisons
No related comparisons found

FastAPI's Followers
664 developers follow FastAPI to keep up with related blogs and decisions.