Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spring-config-client-0.1.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

spring_config_client-0.1-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

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