A comprehensive Python library designed for unified network endpoint management across multiple protocols. UriPoint simplifies the creation, management, and monitoring of network endpoints through a single, cohesive interface.
UriPoint provides a comprehensive solution that goes beyond simple protocol handling, offering a complete platform for building, managing, and operating network communications.
Handle multiple protocols through one consistent interface, simplifying your network architecture and reducing complexity.
Easy setup through CLI or Python API with persistent YAML-based configuration storage.
Support for web, streaming, IoT, and messaging protocols with protocol-specific optimizations and auto-negotiation.
Built-in monitoring, testing, and persistence with comprehensive testing framework and chaos engineering support.
Optimized communication, reduced overhead, and integrated caching for better performance across all protocols.
Consistent security policies, unified authentication, and centralized monitoring across all endpoints.
UriPoint supports a wide range of protocols, making it suitable for various use cases from web services to IoT and streaming applications.
Getting started with UriPoint is simple and straightforward.
pip install uripoint
UriPoint uses a YAML-based configuration file stored at ~/.uripoint_config.yaml
:
# ~/.uripoint_config.yaml
endpoints:
- name: api-endpoint
uri: http://localhost:8080/api
protocol: http
methods: [GET, POST]
- name: mqtt-sensor
uri: mqtt://broker:1883/sensors
protocol: mqtt
qos: 1
UriPoint provides both a CLI and Python API for managing endpoints.
uripoint [options] <command>
# List all configured endpoints
uripoint --list
# Serve all endpoints as a live server
uripoint --serve
# Test endpoints
uripoint --test
# Detach specific endpoints
uripoint --detach "http://localhost:9000/api/hello"
from uripoint import UriPointCLI
cli = UriPointCLI()
cli.create_endpoint(
uri='http://localhost:8000/api/users',
data={
'response': {'users': []},
'methods': ['GET', 'POST', 'PUT', 'DELETE']
}
)
# Start serving endpoints
cli.serve()
from uripoint import UriPointCLI
cli = UriPointCLI()
cli.create_endpoint(
uri='http://localhost:8000/api/users',
data={
'response': {'users': []},
'methods': ['GET', 'POST', 'PUT', 'DELETE']
}
)
# Create endpoint
uripoint --uri http://localhost:8000/api/users --data '{"response": {"users": []}}' --method GET POST PUT DELETE
# Test endpoint
curl -X GET http://localhost:8000/api/users
cli.create_endpoint(
uri='mqtt://localhost:1883/sensors/temperature',
data={
'topic': 'sensors/temperature',
'qos': 1,
'device': {
'type': 'temperature',
'location': 'room1'
}
}
)
# Create endpoint
uripoint --uri mqtt://localhost:1883/sensors/temperature --data '{"topic": "sensors/temperature", "qos": 1}'
# Test endpoint
mosquitto_pub -h localhost -p 1883 -t sensors/temperature -m '{"value": 22.5}'
cli.create_endpoint(
uri='rtsp://localhost:8554/camera1',
data={
'stream_url': 'rtsp://camera.example.com/stream1',
'transport': 'tcp'
}
)
# Create endpoint
uripoint --uri rtsp://localhost:8554/camera1 --data '{"stream_url": "rtsp://camera.example.com/stream1", "transport": "tcp"}'
# Test endpoint
ffplay rtsp://localhost:8554/camera1
UriPoint is built with a modular architecture that separates concerns and provides flexibility.
UriPoint is designed for a variety of professionals working with distributed systems and network communications.
Building microservices architectures, managing service discovery, implementing API gateways, and developing service meshes.
Infrastructure automation, service deployment, monitoring setup, and configuration management.
Device management, sensor networks, data collection systems, and remote monitoring.
Video streaming services, live broadcast systems, security camera networks, and content delivery networks.
API development, service integration, message queue implementation, and cache management.
UriPoint provides a comprehensive solution that goes beyond simple protocol handling, offering a complete platform for building, managing, and operating network communications.
UriPoint can handle complex scenarios involving multiple protocols and integrations.
# CLI Commands
# Create MQTT endpoint for sensor data
uripoint --uri mqtt://localhost:1883/sensors \
--data '{
"topics": ["sensors/#"],
"qos": 1
}'
# Create Redis endpoint for data storage
uripoint --uri redis://localhost:6379/sensor-data \
--data '{
"database": 1,
"expire": 3600
}'
# Create HTTP API endpoint
uripoint --uri http://localhost:8080/api/sensors \
--method GET POST \
--data '{
"cache": "redis://localhost:6379/sensor-data",
"mqtt": "mqtt://localhost:1883/sensors"
}'
from uripoint import UriPointCLI, SystemTest
# Create system endpoints
cli = UriPointCLI()
# MQTT endpoint
mqtt = cli.create_mqtt_endpoint(
uri='mqtt://localhost:1883/sensors',
data={
'topics': ['sensors/#'],
'qos': 1
}
)
# Redis endpoint
redis = cli.create_redis_endpoint(
uri='redis://localhost:6379/sensor-data',
data={
'database': 1,
'expire': 3600
}
)
# HTTP API endpoint
api = cli.create_endpoint(
uri='http://localhost:8080/api/sensors',
data={
'methods': ['GET', 'POST'],
'cache': 'redis://localhost:6379/sensor-data',
'mqtt': 'mqtt://localhost:1883/sensors'
}
)
# Create system test
test = SystemTest([mqtt, redis, api])
test.verify_integration()
test.test_data_flow()
test.check_performance()
UriPoint includes a comprehensive testing framework that ensures reliability and performance across all components.
# Basic endpoint test
test = EndpointTest(endpoint)
test.run()
# Protocol-specific tests
test.verify_protocol()
test.check_security()
test.validate_performance()
# Integration tests
test.verify_dependencies()
test.check_data_flow()
test.test_failover()
# Load tests
test.concurrent_access(num_clients=100)
test.sustained_load(duration=300)
test.peak_performance()
# Chaos tests
test.network_partition()
test.process_failure()
test.data_corruption()
# test_config.yaml
tests:
performance:
concurrent_users: 100
duration: 300
thresholds:
latency_p95: 200
error_rate: 0.01
integration:
dependencies:
- redis
- mqtt
- http
timeout: 30
chaos:
scenarios:
- network_partition
- process_crash
- disk_full
duration: 600
# Run all tests
pytest tests/
# Run specific test categories
pytest tests/test_protocols.py
pytest tests/test_performance.py
pytest tests/test_integration.py
pytest tests/test_chaos.py
# Run with coverage report
pytest --cov=uripoint tests/
UriPoint provides a comprehensive solution for managing network endpoints across multiple protocols. Get started today!