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.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: python-apollo-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 64d71709e75244aa65b3ec1bad184566c465fd9a4768cdd8336c58c23f5abe25
MD5 6111afdfe366407cfec2587bced30e77
BLAKE2b-256 8708a46cd33f3bf9ab57c29bedf7b890038525f723ef3b0b8ea98b5c431f7857

See more details on using hashes here.

File details

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

File metadata

  • Download URL: python_apollo-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5251849fe219a3e48a2e8b67bc78b610c252c86ddb64256dbc5f11dc5a949f07
MD5 395d86c566063bb257f65af94fc266a0
BLAKE2b-256 f719cc32705e9fa27dd42db6eb2798abf20d2a39ad1a7e9fbf6da91ad0defc1b

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