A distributed parameter server for managing configuration across processes
Project description
Parameter Server
Dead simple TCP-based parameter storage that actually works. No cap.
Quick Start
# Install dependencies
make install
# Run server
make server
Note, it uses example parameter yml file.
Python Usage
from param_server.client import AsyncParameterClient
async with AsyncParameterClient() as client:
await client.set("/camera/exposure", 100)
value = await client.get("/camera/exposure")
print(f"Exposure: {value}")
Production Setup
Parameters.yml
Add your production parameters to file config/params.yml.
Docker Compose (recommended)
# Build container
make docker-build
# Start container
make docker-run
# Stop container
make stop
# Server runs on 0.0.0.0:8888
Configuration (when running without make)
Drop a YAML file with your defaults:
camera:
exposure: 100
gain: 1.5
fps: 30
network:
timeout: 5000
retries: 3
Load it: --config your-config.yml
CLI Commands
# Basic operations
param-cli set /path/to/param value
param-cli get /path/to/param
param-cli delete /path/to/param
param-cli list --prefix /camera
# Live monitoring
param-cli watch /camera/exposure
# Health check
param-cli ping
Client Libraries
Async
from param_server.client import AsyncParameterClient
client = AsyncParameterClient("localhost", 8888)
await client.connect()
await client.set("/test", 123)
value = await client.get("/test")
await client.disconnect()
Features
- Persistent connections (low latency)
- Auto-reconnection (handles network issues)
- Type support: str, int, float, bool
- Concurrent operations
- Tree-like parameter paths
- JSON/tree CLI output formats
- Docker ready
Port Configuration
Default port is 8888. Change it:
# Server
param-server --port 9999
# Client
param-cli --port 9999 ping
# Python
AsyncParameterClient("localhost", 9999)
# or
ParameterClient("localhost", 9999)
Troubleshooting
Connection refused
# Check if server is running
param-cli ping
# Check port
netstat -tlnp | grep 8888
Permission denied
# Use different port
param-server --port 9999
Docker issues
# Check logs
docker compose logs param-server
# Rebuild
docker compose build --no-cache
That's it. Simple as.
@themladypan
Project details
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 async_param_server-1.1.2.tar.gz.
File metadata
- Download URL: async_param_server-1.1.2.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77a736c994043e645d834aea095c208b0a9a0de802bd6e0f5df83afc68ac7540
|
|
| MD5 |
38c99e34da63a078201396644f307147
|
|
| BLAKE2b-256 |
bcb609444f651e93a4303bddf0c0949874507b55a65d17227ba4b7581bcab73c
|
File details
Details for the file async_param_server-1.1.2-py3-none-any.whl.
File metadata
- Download URL: async_param_server-1.1.2-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8c5a9b468b21cb4e5f8da8e8c97eef274484c8dbfcfa744fa70b074b4f7c3ba
|
|
| MD5 |
bef7de97909048e05702e15234425a94
|
|
| BLAKE2b-256 |
da92afc64d5897726e8b1818d3f765712f4af71f4f3cbc68417f456340ff3422
|