webtransport
fastapi
Our great sponsors
webtransport | fastapi | |
---|---|---|
11 | 462 | |
793 | 69,701 | |
1.0% | - | |
9.1 | 9.7 | |
16 days ago | 4 days ago | |
Bikeshed | Python | |
GNU General Public License v3.0 or later | MIT License |
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.
webtransport
- WebGPU – All of the cores, none of the canvas
-
Firefox 114 released
WebTransport is now enabled by default and will be going to release with 114. As the original Explainer notes, it enables multiple use-cases that are hard or impossible to handle without it, especially for Gaming and live streaming. It covers cases that are problematic for alternative mechanisms, such as WebSockets. Built on top of HTTP3 (HTTP2 support will be coming later). The current implementation in Firefox is passing 505 out of 565 Web-Platform Tests.
-
Librespeed - a Foss speedtest
Sort of. The browser will re-use the connection if you have a bunch of resources in the HTML. When rendering it sees that it needs 2 images and 3 javascript files from the same server, so it pipelines all of those. But for requests initiated from javascript, you're going to get a new connection for each one unless you're using a library that implements the long-polling hack. SocketIO can use the long-polling hack as a fallback if websockets is not supported. HTTP/2 (formerly SPDY) gets part of the way to replacing websockets, but it's not a synchronous link. Only the client can send messages to the server and the server can only respond to those message (with websockets, either side can send messages once the connection is open). FWIW, less than 50% of websites use HTTP/2. HTTP/3's webtransport looks like it could replace websockets, but it also looks like it'll live along side websockets.
-
The WebSocket Handbook
If it's streaming data like dashboard statistics the new WebTransport API might be a much better base: https://github.com/w3c/webtransport/blob/main/explainer.md
-
We Got to LiveView
Are you guys looking into the Web Transport protocol for the future? Right now you have to tunnel the websocket connections over http2 and it will probably be the same for http3 afaik.
I know there is this work in progress (https://w3c.github.io/webtransport/) and websockets are probably fine for a long time but sooner or later (unless there is an update to websockets) it will probably be faster to just do normal http requests and listen on server sent events.
What are your thoughts for Liveview for the future? Will it forever stay on websockets or would you be open to change the underlying technology if / when new stuff becomes available?
-
The History and Future of Socket-level Multiplexing
It's taken nearly 10 years for QUIC to be refined and adopted in the wild and we're basically there. There's even a new browser API in the works called WebTransport.
-
Show HN: PSX Party – Online Multiplayer Playstation 1 Emulator Using WebRTC
tl;dr using WebRTC just for realtime client<->server data sucks, but WebTransport[1] is coming soon to serve that exact usecase with an easy API
WebRTC has data channels, which are currently the only way to achieve unreliable and unordered real-time communication (UDP-style) between the browser and other browsers or a server. This is pretty essential for any networked application where latency is critical, like voice and video and fast-paced multiplayer games.
As other commenters have noted, it's a royal pain in the ass to set up WebRTC if all you want is UDP-style communication between a server and browser, since you need to wrangle half a dozen other protocols in the process.
However! A new API, WebTransport[1], is actively being developed that will offer a WebSockets-like (read: super simple to set up) API for UDP-style communication. I am extremely excited about it and its potential for real-time browser-based multiplayer games (which I'm working on).
fastapi
-
LangChain, Python, and Heroku
An API application framework (such as FastAPI)
-
Litestar – powerful, flexible, and highly performant Python ASGI framework
It’s been my experience that async Python frameworks tend to turn IO bound problems into CPU bound problems with a high enough request rate, because due to their nature they act as unbounded queues.
This ends up made worse if you’re using sync routes.
If you’re constrained on a resource such as a database connection pool, your framework will continue to pull http requests off the wire that a sane client will cancel and retry due to timeouts because it takes too long to get a connection out of the pool. Since there isn’t a straightforward way to cancel the execution of a route handler in every Python http framework I’ve seen exhibit this problem, the problem quickly snowballs.
This is an issue with fastapi, too- https://github.com/tiangolo/fastapi/issues/5759
-
AI-Powered Image Search with CLIP, pgvector, and Fast API
Fast API.
- Ask HN: What is your go-to stack for the web?
-
Fun with Avatars: Crafting the core engine | Part. 1
We will create our API using FastAPI, a modern high-performance web framework for building fast APIs with Python. It is designed to be easy to use, efficient, and highly scalable. Some key features of FastAPI include:
-
Building Fast APIs with FastAPI: A Comprehensive Guide
FastAPI is a modern, fast, web framework for building APIs with Python 3.7+ based on standard Python type hints. It is designed to be easy to use, fast to run, and secure. In this blog post, we’ll explore the key features of FastAPI and walk through the process of creating a simple API using this powerful framework.
-
Effortless API Documentation: Accelerating Development with FastAPI, Swagger, and ReDoc
FastAPI is a modern, fast web framework for building APIs with Python 3.7+ that automatically generates OpenAPI and JSON Schema documentation. While FastAPI simplifies API development, manually creating and updating API documentation can still be a time-consuming task. In this blog post, we’ll explore how to leverage FastAPI’s automatic documentation generation capabilities, specifically focusing on Swagger and ReDoc, and how to streamline the process of documenting your APIs.
-
Building a Dynamic Tile Server Using Cloud Optimized GeoTIFF(COG) with TiTiler
TiTiler is a dynamic tile server built on FastAPI and Rasterio/GDAL. Its main features include support for Cloud Optimized GeoTIFF(COG), multiple projection methods, various output formats (JPEG, JP2, PNG, WEBP, GTIFF, NumpyTile), WMTS, and virtual mosaic. It also provides Lambda and ECS deployment environments using AWS CDK.
-
Writing Clean Code with FastAPI Dependency Injection
To make it a bit more realistic, we’re going to use a FastAPI route as an example, and we’re also going to use FastAPI’s dependency injection, which can really help with readability (and testability, but more on that later).
-
🔥14 Excellent Open-source Projects for Developers😎
2. FastAPI - Turbocharge Your Web APIs with Python ⚡
What are some alternatives?
AIOHTTP - Asynchronous HTTP client/server framework for asyncio and Python
HS-Sanic - Async Python 3.6+ web server/framework | Build fast. Run fast. [Moved to: https://github.com/sanic-org/sanic]
Tornado - Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.
django-ninja - 💨 Fast, Async-ready, Openapi, type hints based framework for building APIs
Flask - The Python micro framework for building web applications.
swagger-ui - Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
Django - The Web framework for perfectionists with deadlines.
starlite - Light, Flexible and Extensible ASGI API framework | Effortlessly Build Performant APIs [Moved to: https://github.com/litestar-org/litestar]
BentoML - Build Production-Grade AI Applications
django-rest-framework - Web APIs for Django. 🎸
quart - An async Python micro framework for building web applications.
chalice - Python Serverless Microframework for AWS