Skip to main content

Python3 Apollo Client

Project description

简介

基于apollo-client,修改的 Apollo 客户端。

使用示例

安装

pip install -U python-apollo

使用示例

from apollo.client import ApolloClient

# 获取 ApolloClient 实例
apollo = ApolloClient(app_id='xxx', config_server_url='http://127.0.0.1:8090', cycle_time=30)

# 从指定的 namespace 中获取 host 的值。
apollo.get_value("host", namespace='application')

# 从指定的 namespace 中获取 host 的值, 如果没有则去公共 namespace 中获取。如果都存在则私有的优先级高于公共的。
apollo.get_value("host", namespace='application', public_namespace=["common.smtp"])

# 获取指定 namespace 下的所有配置值
apollo.get_values(namespace='application')

# 获取指定 namespace 和 public_namespace 下的所有配置值。如果都存在则私有的优先级高于公共的。
apollo.get_values(namespace='application', public_namespace=["common.smtp"])

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

python-apollo-0.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

python_apollo-0.0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file python-apollo-0.0.1.tar.gz.

File metadata

  • Download URL: python-apollo-0.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for python-apollo-0.0.1.tar.gz
Algorithm Hash digest
SHA256 266a38257d192af5764ceec307617b2df81ef60f43764073430373734d9a1499
MD5 d776527e6bcd79b7175c53a35c553625
BLAKE2b-256 bd728ff070a1e2426c1d547d8b40b64139fa20df4ed9ac49e5db605e5083d583

See more details on using hashes here.

File details

Details for the file python_apollo-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: python_apollo-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for python_apollo-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d8c7bcdfaa96a8a5264d34cfbbf5494404c64f0755c6c7157b5839823c6fd102
MD5 476dd5b25ba3a457c7b371529fb36f23
BLAKE2b-256 94d720f3066748e36138421e9967a102402b28dcc7922db165d8a329d7c114ac

See more details on using hashes here.

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