Hey Dev.to community!
I'm excited to announce the release of the Kiponos Python SDK v0.1.2 on PyPI! Kiponos is a real-time configuration-as-a-service platform that lets you manage configs dynamically via simple SDK. Internally built on WebSockets and STOMP, Kiponos provides instant updates across environments in zero latency!.
It's perfect for AI apps, DevOps workflows, or any Python project needing zero-latency config changes without redeploys. without restarts. without even a refresh! Anything you modify online instantly affects your algorithm or any python app! simple as that!
Key Features
- Real-Time Sync: Fetch the initial config tree and subscribe to delta updates (key created/updated) for instant reflection in your app.
-
Local Access: Configs stored in memory for fast lookups (e.g.,
client.get("learning-rate")
orclient.get("timeout")
etc. -
Secure & Isolated: Uses env vars for auth (
KIPONOS_ID
,KIPONOS_ACCESS
) and supports profile paths for environment-specific configs. - Simple Integration: Connect, fetch, and query with minimal code.
- No Code Modifications. No Config Files: Kiponos frees you from handling any config files or any static data, while your code is written only once - for all environments! all configs in any environment (dev, tests, staging, qa, production) are accessed seamlessly and managed by Kiponos.io in real-time.
Installation
Get started with:
pip install kiponos-pysdk
Requires Python 3.12+.
Quick Usage Example
Set up your env vars (from your Kiponos account):
export KIPONOS_ID="your-id"
export KIPONOS_ACCESS="your-access"
Then:
from kiponos_pysdk import KiponosClient
# work on specific config profile
client = KiponosClient(kiponos="['my-app']['1.0.0']['dev']['base']")
client.connect()
# Get a config value
print(client.get("timeout", "not found")) # e.g., "100"
client.close()
For an interactive demo, check the repo for usage_example.py
—it supports commands like get <key>
, list-keys
, dump
, and exit
.
Why Kiponos?
Built over 3 years of development, Kiponos decouples config from code, making your apps environment-agnostic. Free plans available—sign up at kiponos.io to get your tokens.
Feedback welcome! Source on GitHub: github.com/Avdiel/kiponos-py-sdk (soon public).
Usage Example - accessing real-time configs
import os
import time
import json
from kiponos_pysdk.client import KiponosClient
if __name__ == "__main__":
# Expected env vars: KIPONOS_ID and KIPONOS_ACCESS
env_profile = "['my-app']['1.0.0']['dev']['base']"
kiponos_sdk = KiponosClient(kiponos=env_profile)
kiponos_sdk.connect()
print("\n\nWelcome to the Kiponos interactive example!")
print(f"Team Id: {kiponos_sdk.team_id}")
print("-------------------------------------------")
print("Commands:")
print("---------")
print(" get <key_name>")
print(" list")
print(" dump")
print(" exit")
print(" help")
while True:
user_input = input("> ").strip()
parts = user_input.split(maxsplit=1)
command = parts[0].lower() if parts else ""
if command == "exit":
print("Stopping...")
break
elif command == "get" and len(parts) > 1:
key_name = parts[1]
value = kiponos_sdk.get(key_name, "Not Found")
print(f"{key_name} = {value}")
elif command == "list":
keys = list(kiponos_sdk.config_tree.keys())
print(keys if keys else "--- No Keys ---")
elif command == "dump":
print("Config Tree:")
print(json.dumps(kiponos_sdk.config_tree, indent=2))
else:
print(f"Unknown command: {command}")
kiponos_sdk.close()
Top comments (0)