Metadata-Version: 2.4
Name: rivora-rcp
Version: 2.0.5
Summary: Rivora Contract Protocol (RCP) interface specification.
Author: Bhavya Malhotra
License-Expression: MIT
Project-URL: Homepage, https://github.com/RivoraEcosystem/rcp
Project-URL: Repository, https://github.com/RivoraEcosystem/rcp
Project-URL: Issues, https://github.com/RivoraEcosystem/rcp/issues
Project-URL: Documentation, https://rcp.bhavyamalhotra.in/
Project-URL: Changelog, https://github.com/RivoraEcosystem/rcp/blob/main/CHANGELOG.md
Keywords: rcp,rivora,riven,http3,quic,webtransport,framework,server
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Rivora Contract Protocol (RCP)

RCP defines a common contract between applications, frameworks, and servers, so each can be built and updated separately. It describes how HTTP requests, WebTransport sessions, application lifecycles, and protocol events are represented through scopes, receive events, and send events.

It is optimized around HTTP/3 and QUIC and Webtransport over HTTP/3
## Install

```bash
pip install rivora-rcp
```

## Quick start

```python
from rcp import HTTPResponseEventType


async def app(scope, receive, send):
    await send({"type": HTTPResponseEventType.START, "status": 200})
    await send(
        {
            "type": HTTPResponseEventType.BODY,
            "body": b"Hello from RCP",
            "more_body": False,
        }
    )
```

RCP applications are asynchronous callables that receive a `scope`, `receive`, and `send`. Servers provide these values and translate RCP events to and from the underlying transport.

## Protocol versions

| Version | Capabilities |
| --- | --- |
| `1.0` | HTTP/3, QUIC, lifespan, and extensions |
| `2.0` | Version 1.0 plus WebTransport |

The RCP protocol version is separate from the Python package version.

To learn more about `rcp`, please [read the documentation](https://rcp.bhavyamalhotra.in).

RCP is licensed under the [MIT License](LICENSE).
