{"id":34075243,"url":"https://github.com/emrekgn/spring-cloud-config-python-client","last_synced_at":"2025-12-14T09:08:39.506Z","repository":{"id":326351751,"uuid":"1103989035","full_name":"emrekgn/spring-cloud-config-python-client","owner":"emrekgn","description":"A Python client for Spring Cloud Config Server","archived":false,"fork":false,"pushed_at":"2025-11-27T12:55:31.000Z","size":43,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-30T02:24:35.515Z","etag":null,"topics":["python","python3","python312","spring-boot","spring-cloud","spring-cloud-config","spring-cloud-config-client","spring-cloud-config-server"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emrekgn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-25T15:48:02.000Z","updated_at":"2025-11-27T13:37:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/emrekgn/spring-cloud-config-python-client","commit_stats":null,"previous_names":["emrekgn/spring-cloud-config-python-client"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/emrekgn/spring-cloud-config-python-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrekgn%2Fspring-cloud-config-python-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrekgn%2Fspring-cloud-config-python-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrekgn%2Fspring-cloud-config-python-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrekgn%2Fspring-cloud-config-python-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emrekgn","download_url":"https://codeload.github.com/emrekgn/spring-cloud-config-python-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emrekgn%2Fspring-cloud-config-python-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27724259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","python3","python312","spring-boot","spring-cloud","spring-cloud-config","spring-cloud-config-client","spring-cloud-config-server"],"created_at":"2025-12-14T09:08:36.939Z","updated_at":"2025-12-14T09:08:39.501Z","avatar_url":"https://github.com/emrekgn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-cloud-config-client\n\n[![PyPI version](https://img.shields.io/pypi/v/spring-cloud-config-client.svg)](https://pypi.org/project/spring-cloud-config-client/)\n![License](https://img.shields.io/github/license/emrekgn/spring-cloud-config-python-client)\n![Build Status](https://github.com/emrekgn/spring-cloud-config-python-client/actions/workflows/python-package.yml/badge.svg)\n\nA helper library written in Python to fetch configuration properties from [the Spring Cloud Config server](https://docs.spring.io/spring-cloud-config/reference/server.html).\n\n\n## Development Setup\n\nTo contribute to this project, you’ll need to install some common prerequisites first, and then follow setup instructions.\n\n### Prerequisites\n\n* [uv](https://docs.astral.sh/uv/)\n* make [for win](https://stackoverflow.com/a/32127632) (required on Windows, usually preinstalled on Linux/macOS)\n\n### Setup\n\n```shell\n# Install Python 3.12 and all dependencies under ./venv locally\nmake install-dev\n```\n\n## How to Use\n\nFetch configuration the same way you would in a Spring Boot application. Below is a realistic client that pulls database, Kafka, and actuator settings exposed by a Spring Cloud Config Server:\n\n```python\nfrom spring_cloud_config_client import props\n\n# Initialize with your Spring application name and active profiles\nprops.init(\"inventory-service\", [\"prod\", \"us-east-1\"])\n\n# Common Spring properties\ndb_url = props.get(\"spring.datasource.url\")\ndb_user = props.get(\"spring.datasource.username\")\ndb_password = props.get(\"spring.datasource.password\")\nconnection_timeout = props.get(\n    \"spring.datasource.hikari.connection-timeout\",\n    default_value=30_000,\n)\n\n# Messaging and observability\nkafka_servers = props.get(\"spring.kafka.bootstrap-servers\")\norder_topic = props.get(\"spring.kafka.topic.orders\")\nactuator_exposed = props.get(\n    \"management.endpoints.web.exposure.include\",\n    default_value=\"health,info,prometheus\",\n)\n\n# You can also fetch structured sections\nlogging_levels = props.get(\"logging.level\")\n# {'root': 'INFO', 'com.example.inventory': 'DEBUG'}\n```\n\nThe library can also make use of *environment variables*. So if your configuration property contains a placeholder (e.g. `${REDIS_HOST}` or `${KAFKA_HOST:localhost}` etc.) it will be replaced by its matching environment variable (`REDIS_HOST`, `KAFKA_HOST` etc.) if exists.\\\nIf the environment variable cannot be found, it searches for an optional default value in the placeholder (e.g. `localhost` in `\\${KAFKA_HOST:localhost}`) and if this is also not found, it throws an exception. Only alphanumeric characters and dash (`-`) are supported for default values.\n\n## Environment Variables\n\nConfigure the client with these environment variables:\n\n* **CONFIG_SERVER_FQDN** overrides host and port with a full URL (default `http://localhost:8080/`)\n* **CONFIG_SERVER_HOST** host used when `CONFIG_SERVER_FQDN` is unset (default `localhost`)\n* **CONFIG_SERVER_PORT** port paired with `CONFIG_SERVER_HOST` (default `8080`)\n* **CONFIG_SERVER_USERNAME** HTTP basic auth username (default `user`)\n* **CONFIG_SERVER_PASSWORD** HTTP basic auth password (default empty)\n* **CONFIG_CLIENT_FAIL_FAST** exits when unable to reach the config server if set to `True` (default `False`)\n* **CONFIG_CLIENT_RETRY_INITIAL_INTERVAL** wait (seconds) before the first retry (default `1`)\n* **CONFIG_CLIENT_RETRY_MAX_INTERVAL** maximum wait (seconds) between retries (default `10`)\n* **CONFIG_CLIENT_RETRY_MAX_ATTEMPTS** total attempts before giving up (default `5`)\n* **CONFIG_CLIENT_RETRY_MULTIPLIER** exponential backoff multiplier applied between retries (default `1.1`)\n\n## Unit Tests\n\n```shell\nmake test\n```\n\n## Integration Tests\n\nIf you have Docker available, you can run a live integration test suite against an actual Spring Cloud Config Server:\n\n```shell\nmake test-integration\n```\n\nThe target spins up the server defined in `docker-compose.integration.yml`, serves the fixtures from `tests/integration/config-repo`, runs the tests in `tests/integration`, and tears everything down when finished.\n\n## Versioning\n\nWe use semantic versioning. You can check [here](https://semver.org/) when and how to bump up the version.\n\n```shell\nmake set-version VERSION=\u003cNEW_VERSION\u003e`\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femrekgn%2Fspring-cloud-config-python-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femrekgn%2Fspring-cloud-config-python-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femrekgn%2Fspring-cloud-config-python-client/lists"}