Skip to main content

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

async_param_server-1.1.2.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

async_param_server-1.1.2-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

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

Hashes for async_param_server-1.1.2.tar.gz
Algorithm Hash digest
SHA256 77a736c994043e645d834aea095c208b0a9a0de802bd6e0f5df83afc68ac7540
MD5 38c99e34da63a078201396644f307147
BLAKE2b-256 bcb609444f651e93a4303bddf0c0949874507b55a65d17227ba4b7581bcab73c

See more details on using hashes here.

File details

Details for the file async_param_server-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for async_param_server-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a8c5a9b468b21cb4e5f8da8e8c97eef274484c8dbfcfa744fa70b074b4f7c3ba
MD5 bef7de97909048e05702e15234425a94
BLAKE2b-256 da92afc64d5897726e8b1818d3f765712f4af71f4f3cbc68417f456340ff3422

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page