Numyra Gateway
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file numyra_gateway-0.1.1.tar.gz.
File metadata
- Download URL: numyra_gateway-0.1.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32875e33b3b7f39e4ff1a8abef351fc516fc5e2f2a659fb10022245ed6dd3483
|
|
| MD5 |
760a7a2866e717aeb5caf3f6ca98fe19
|
|
| BLAKE2b-256 |
5c66b6c6c1ad2edb71482b636208705e7f2c0d7c7f583a2dc3816a545de2e6f3
|
File details
Details for the file numyra_gateway-0.1.1-py3-none-any.whl.
File metadata
- Download URL: numyra_gateway-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f584218174584744996934ad7e2ae76b43fba59dddcf2f9637bb219ec8693eb2
|
|
| MD5 |
64a3dd0b6aa10a06145bc123b83a755b
|
|
| BLAKE2b-256 |
40dd97067684b90c2a93703ff9f898d76989c6a23d9ea499e8b5a7b89364a364
|