Riven
Riven is an HTTP/3 server for Python applications, built around the requirements of RFC 9114.
Riven provides two application interfaces:
- RCP - Riven's native application interface, designed alongside the server to expose its HTTP/3 protocol model.
- ASGI - compatibility support for existing Python applications and frameworks that use the ASGI specification.
RCP is the default interface. ASGI applications can be selected with --application-interface asgi.
Project Status
Riven is currently in alpha development and is not ready for production use.
The server can run HTTP/3 applications in development environments, but the API, behavior, and implementation may change as the project evolves. Bugs and incomplete features are expected.
ASGI support currently covers the common HTTP request and response events, as well as lifespan handling. Application compatibility may vary depending on how an application uses ASGI, so applications should be tested in a development environment before being used with Riven.
Installation
Install Riven with pip:
pip install riven
To install Riven with a platform-specific event loop implementation, use the standard extra:
pip install "riven[standard]"
The standard extra installs:
uvloopon Linux and macOSwinloopon Windows
Riven can also run with Python's standard asyncio event loop without either package.
ASGI Application
Create an ASGI application in example.py:
async def app(scope, receive, send):
assert scope["type"] == "http"
await send({
"type": "http.response.start",
"status": 200,
"headers": [
(b"content-type", b"text/plain"),
],
})
await send({
"type": "http.response.body",
"body": b"Hello, world!",
})
Start Riven with the ASGI application and a TLS certificate and private key:
riven example:app --application-interface asgi --ssl-certfile cert.pem --ssl-keyfile key.pem
The application argument uses module:attribute notation.
For example:
riven myapp.server:app --application-interface asgi --ssl-certfile cert.pem --ssl-keyfile key.pem
Riven requires a TLS certificate and private key because QUIC provides built-in TLS encryption.
imports app from myapp/server.py.
Riven listens on 127.0.0.1:8000 by default. Use --host and --port to change the bind address.
Why Riven Supports Both RCP and ASGI
Riven's primary goal is to provide an HTTP/3-focused server that follows the protocol requirements defined by RFC 9114.
RCP is Riven's native application interface and is designed alongside Riven to represent its HTTP/3 protocol model directly.
ASGI is supported to make Riven usable with existing Python applications and frameworks without requiring them to be rewritten around RCP.
RCP is the default application interface. To run an ASGI application, use:
riven example:app --application-interface asgi --ssl-certfile cert.pem --ssl-keyfile key.pem
For more information about RCP, see the RCP project.
When using an ASGI application with Riven, keep in mind that HTTP/3 has protocol requirements that differ from older HTTP versions. In particular, some connection-specific headers and behaviors that may be valid in HTTP/1.1 or HTTP/2 are not permitted in HTTP/3.
Standalone HTTP/3 Deployment
For standalone HTTP/3 deployment, publish an HTTPS DNS resource record as defined by RFC 9460.
The record should advertise the HTTP/3 endpoint using the h3 ALPN identifier. For a service running on the default HTTPS port, the record can look like this:
example.com. HTTPS 1 . alpn="h3"
For a non-default port, add the port parameter:
example.com. HTTPS 1 . alpn="h3" port="8443"
Configure the corresponding TLS certificate on Riven and allow QUIC traffic over UDP on the configured port.
Riven currently supports HTTP/3 only. Until additional HTTP protocols are supported, advertise the service using the h3 ALPN identifier.
Contributions
Riven is currently in active development, and its architecture may continue to evolve as the project progresses.
If you are interested in contributing, feel free to reach out first so I can share the current areas where contributions would be most useful.
You can also open an issue or start a discussion if you have an idea, question, bug report, or technical suggestion.
Discussions
Ideas, architecture questions, and technical discussions are welcome in the repository's Discussions.
License
Riven is licensed under the BSD License.
Built for the next generation of Python web applications, beyond request and response.
Metadata
Release files for riven 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| riven-0.1.2.tar.gz | 27.9 kB | Without provenance | Details for riven-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| riven-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for riven-0.1.2-py3-none-any.whl |
Total release size: 58.8 kB
Release files / riven-0.1.2.tar.gz
| Download URL | riven-0.1.2.tar.gz |
|---|---|
| Size | 27.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e46c9945fa3f55158f6048e919dc173b9d9cd1f3df53215e2842b2229b3ba64
|
|
BLAKE2b-256 checksum How to use checksums |
7744a16120e2793abf85bf2ed105ace46bc9ff55aec07f1d5304684a1a40fab8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|
Release files / riven-0.1.2-py3-none-any.whl
| Download URL | riven-0.1.2-py3-none-any.whl |
|---|---|
| Size | 30.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5c3de71b5ab077995bdeae1954c24a5916ffd4607e817b15452a47618598b77
|
|
BLAKE2b-256 checksum How to use checksums |
99c5c5cf65bc97132caae72f0ef88faccd87ac69d3aaebc7f13134c100cc1198
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.7
|
Security for riven 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.