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.1.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.1-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file async_param_server-1.1.1.tar.gz.

File metadata

  • Download URL: async_param_server-1.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 abaa9c22915c507850d91cb34a02ce399f8930309e832e91ecf6af9a5688181e
MD5 af1ba2e9520afa95a554b6eb21a7fb8a
BLAKE2b-256 8dc86c469b5d0a3f7efff6577007ce0e1e89106b564c7fde582a53617d97b697

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for async_param_server-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d76709a19b6fba3eda4152bb62c300c97abb89daa45c810ba53dbfc77324662
MD5 1622ce7e6e3e5e17b7a364902bf4f82e
BLAKE2b-256 248f5809287ffe0baf6d769d5cf67d561229b0d3f78f37b944e3a02346ab8517

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