ConfigMate
A Python configuration library with first-class Stellar Horizon and Soroban RPC endpoint settings, alongside general-purpose environment and file loading.
Features
- Load configuration from multiple sources (environment variables, files, defaults)
- Automatic type conversion and validation
- Nested configuration support
- Easy to use API
- Zero required dependencies (optional PyYAML support for YAML files)
- Stellar-specific configuration loading for Horizon and Soroban RPC endpoints
For Stellar Python applications
Stellar applications commonly need to configure Horizon for account and
transaction data and Soroban RPC for smart-contract operations. StellarConfig
keeps both URLs together with the selected network: choosing Testnet, Mainnet,
or Futurenet updates both built-in endpoint defaults, while each URL can be
overridden independently through STELLAR_ environment variables.
from configmate import StellarConfig
from stellar_sdk import Server, SorobanServer
config = StellarConfig()
config.load_from_env()
horizon = Server(config.get_horizon_url())
soroban = SorobanServer(config.get_soroban_rpc_url())
Set STELLAR_NETWORK=mainnet to select Mainnet defaults, or provide
STELLAR_HORIZON_URL and STELLAR_SOROBAN_RPC_URL for hosted or local
endpoints. Custom network names are accepted, but have no built-in endpoints;
each endpoint your app uses must be configured explicitly or its getter raises
StellarEndpointError. Install stellar-sdk separately; ConfigMate does not
make requests or check endpoint connectivity. See the
Stellar configuration guide
and SDK usage example.
The typescript/ directory also contains a small TypeScript
companion for typed endpoint defaults and custom URL overrides. It is source in
this repository and is not yet published to npm.
About Kairo Solutions
ConfigMate is maintained by Kairo Solutions, a technology organization focused on building reliable, developer-friendly open source tools. Our mission is to simplify complex development challenges through well-designed, intuitive libraries that integrate seamlessly into modern Python workflows.
We believe in:
- Simplicity without sacrifice: Powerful features that don't complicate the developer experience
- Reliability: Thoroughly tested, stable releases you can depend on in production
- Community-driven development: Transparent processes that welcome contributions from developers worldwide
- Practical solutions: Tools designed to solve real-world problems faced by Python developers daily
Installation
The PyPI name configmate belongs to a different project. This project uses
the distribution name kairo-configmate. Install it from PyPI with:
pip install kairo-configmate
For development from a source checkout:
pip install .
For YAML support, install the optional extra:
pip install "kairo-configmate[yaml]"
Usage
Basic Usage
from configmate import Config
config = Config()
config.load_from_env(prefix='APP_')
config.load_from_file('config.yaml')
config.set_default('debug', False, bool)
debug = config.get('debug')
database_url = config.get('database.url')
Stellar Configuration
from configmate import StellarConfig
# Create a Stellar configuration instance
stellar_config = StellarConfig()
# Load from environment variables with STELLAR_ prefix
# e.g., STELLAR_NETWORK=mainnet STELLAR_HORIZON_URL=https://custom.horizon.example
stellar_config.load_from_env()
# Get the horizon URL for the current network
horizon_url = stellar_config.get_horizon_url()
soroban_rpc_url = stellar_config.get_soroban_rpc_url()
# Check if using a known network
if stellar_config.is_known_network():
print(f"Using known network: {stellar_config.get('stellar.network')}")
else:
print(f"Using custom network: {stellar_config.get('stellar.network')}")
# Access other configuration values as usual
network = stellar_config.get('stellar.network')
The StellarConfig class extends Config and provides:
- Defaults for
stellar.network(testnet),stellar.horizon_url, andstellar.soroban_rpc_url(both endpoint URLs follow the selected known network) - Automatic loading from environment variables with
STELLAR_prefix - Validation for the network field
- Custom network names that require explicit endpoint URLs, with
StellarEndpointErrorraised when an endpoint is missing - Helper methods like
get_horizon_url(),get_soroban_rpc_url(), andis_known_network()
License
MIT
Contributing
Bug reports and feature requests can be filed in the issue tracker. See CONTRIBUTING.md for development setup and guidance on preparing focused issues for Drips Wave.
Metadata
Release files for kairo-configmate 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kairo_configmate-0.1.0.tar.gz | 18.6 kB | Without provenance | Details for kairo_configmate-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kairo_configmate-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for kairo_configmate-0.1.0-py3-none-any.whl |
Total release size: 37.7 kB
Release files / kairo_configmate-0.1.0.tar.gz
| Download URL | kairo_configmate-0.1.0.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e795b61348ae140334e93159ab42024955ee643467e98633060c606c3c2634be
|
|
BLAKE2b-256 checksum How to use checksums |
8992cf482fd32c34ce9147c246d7c4b3ae99f187f1eaabd3fa26762e967eec75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / kairo_configmate-0.1.0-py3-none-any.whl
| Download URL | kairo_configmate-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
462f8c7496b341ad78d0134736cc88dfe9b5f0ca0135316c26a3052820a4fc36
|
|
BLAKE2b-256 checksum How to use checksums |
ce92d4502be4ba658f040e1c3ccaf6364c9c1b99ae0022b662e204cc4b0a0276
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for kairo-configmate 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.