Requests per second 12 requests per second – Realistic Python web frameworks

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • FrameworkBenchmarks

    Source for the TechEmpower Framework Benchmarks project

  • It needs to be emphasized how artificial these benchmarks really are. Here is the source for the Fortunes C# benchmark:

    https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...

    There's no routing or templating, it just writes a bunch of strings. No one would build an actual web app this way.

    The only C# benchmarks that are remotely realistic are the mvc variants, starting with aspcore-mvc-ado-pg at number 79.

  • just

    the only javascript runtime to hit no.1 on techempower :fire: (by just-js)

  • just.js (#9) looks interesting

    https://github.com/just-js/just

    It seems to be a much tinier JavaScript runtime than Node.js (still using v8), but linux only

    The benchmark is probably unrealistically optimized code but even so, it implies Node.js itself has a large performance overhead

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • django-seal

    Django application providing queryset sealing capability.

  • Reddit

  • I always assumed Python could scale because of Reddit: https://github.com/reddit-archive/reddit

    Not quite sure if their current site's code is opensource... anyone know?

  • Dapper

    Discontinued Dapper - a simple object mapper for .Net [Moved to: https://github.com/DapperLib/Dapper] (by StackExchange)

  • Like there wouldn't be anything in between /s

    There are "simple ORMs" that only map results of SQL queries to objects. They do not provide a magic query API - which is the source of most problems. I don't do Python, but for .NET there is Dapper https://github.com/StackExchange/Dapper, you can have a look what I mean. You write the SQL query, explicitly execute it, the library maps the results of that query into objects (it's C#, so you have to declare the class. In Python I'd imagine it would create the object for you)

  • comet

    Modern PHP framework for building blazing fast REST APIs and microservices (by gotzmann)

  • Why is it so? I've got 100K requests per sec with PHP easily [1]

    [1] https://github.com/gotzmann/comet

  • fastapi

    FastAPI framework, high performance, easy to learn, fast to code, ready for production

  • The biggest difference between the two API frameworks is that Falcon is synchronous while Sanic is asynchronous. With Sanic, you would explicitly specify async/await for asynchronous operations and use asynchronous libraries for I/O. Both are plenty fast.

    FastAPI [1] is also worth considering if you are looking into asynchronous API frameworks. It comes with nice features for specifying API schemas.

    [1]: https://fastapi.tiangolo.com/

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • dataclasses-sql

    Using dataclasses with SQL databases

  • It would be cool to teach the python static type checkers such as pyright and mypy to do the same validation as pydantic, marshmallow.

    Then you could use dataclasses and map them to the database via sqlalchemy.

    https://github.com/adsharma/dataclasses-sql

    Couple of other techniques to speedup python:

    * Transpile python to another language (py2many)

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts