Numyra Gateway
A proxy gateway for intercepting and analyzing Anthropic Claude API streaming responses using mitmproxy.
Features
- SSE Stream Parsing: Parse Server-Sent Events from Claude API responses
- Anthropic Message Reconstruction: Rebuild streaming messages from SSE chunks
- Tool Use Support: Handle both text and tool use responses with JSON pretty-printing
- mitmproxy Integration: Visual inspection of streaming responses in mitmproxy web interface
- Custom Content Views: Dedicated "Numyra Anthropic View" for formatted message display
Installation
pip install numyra-gateway
Usage
Command Line
Start the gateway proxy:
numyra-gateway
This will start:
- Proxy server on
http://127.0.0.1:8080(reverse proxy tohttps://api.anthropic.com) - Web interface on
http://127.0.0.1:8081
Python API
from numyra_gateway.streaming import AnthropicStreamParser
# Parse streaming SSE responses
parser = AnthropicStreamParser()
message = parser.feed(sse_content)
if message and message.is_complete:
print(f"Content: {message.content}")
print(f"Stop reason: {message.stop_reason}")
Requirements
- Python 3.13+
- mitmproxy 12.1.2+
Development
# Install with dev dependencies
uv sync --group dev
# Run tests
uv run pytest
# Start development server
uv run numyra-gateway
License
PROPRIETARY SOFTWARE - NOT FREE TO USE
This is a development version owned by Numyra and is NOT free to use. This software is provided for evaluation and development purposes only. Commercial use is strictly prohibited without explicit written permission from Numyra. See LICENSE file for complete terms.
Metadata
Release files for numyra-gateway 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| numyra_gateway-0.1.1.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| numyra_gateway-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.3 kB
Release files / numyra_gateway-0.1.1.tar.gz
| Download URL | numyra_gateway-0.1.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32875e33b3b7f39e4ff1a8abef351fc516fc5e2f2a659fb10022245ed6dd3483
|
|
BLAKE2b-256 checksum How to use checksums |
5c66b6c6c1ad2edb71482b636208705e7f2c0d7c7f583a2dc3816a545de2e6f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.5
|
Release files / numyra_gateway-0.1.1-py3-none-any.whl
| Download URL | numyra_gateway-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f584218174584744996934ad7e2ae76b43fba59dddcf2f9637bb219ec8693eb2
|
|
BLAKE2b-256 checksum How to use checksums |
40dd97067684b90c2a93703ff9f898d76989c6a23d9ea499e8b5a7b89364a364
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.5
|