A client for Spring Config Server
Project description
spring-config-client
A Python client for Spring Config Server.
This library is inspired by amenezes/config-client and is essentially a toned-down fork that I customized to fit my own needs.
Project goals
- Provide a basic client
- Provide basic authentication
- Add support for CloudFoundry
Installation
Install using pip
$ pip install spring-config-client
Usage
The very very usage of this library can be implemented like this:
from spring_config.client import SpringConfigClient
c = SpringConfigClient(app_name="test-application")
c.get_config()
By default, this package tries to fetch configuration from http://localhost:8888
using development
profile. These parameters can be changed by passing them into the SpringConfigClient
constructor.
Here are some examples:
# Fetch from http://someserver.com using profile "development"
c = SpringConfigClient(address="http://someserver.com", app_name="some_app")
# Fetch from http://someserver.com using profile "production"
c = SpringConfigClient(
address="http://someserver.com",
app_name="some_app",
profile="production"
)
Using with Flask
from flask import Flask
from spring_config import client
config_client = client.SpringConfigClient(...)
app = Flask(...)
# ... continued.
Requesting features
Please use the issues section to request new features and I will try to take out my time to work on them. Contributions in any sorts are always welcome :)
Project details
Release history Release notifications | RSS feed
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
Hashes for spring_config_client-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 706b88d591b3f54745939338ec552bd7d84b103e866cc366da4884e6ffd29d45 |
|
MD5 | daaaf5752538cde2118248b6e6a3291e |
|
BLAKE2b-256 | acc927a3b22c0515a795ab7b67d21a65d182da02551fd0d9e0973886ae075f5b |