简介
基于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"])
Metadata
Release files for python-apollo 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python-apollo-0.0.3.tar.gz | 4.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_apollo-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / python-apollo-0.0.3.tar.gz
| Download URL | python-apollo-0.0.3.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df53cf4a2a5abfa8eb3d7ab6b8ef4e0ce7fa5420b9e6390be5f35877b135f81a
|
|
BLAKE2b-256 checksum How to use checksums |
493925170f58d7575806842f76505f8c2224ca5960f9c857717b312bfc979fad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / python_apollo-0.0.3-py3-none-any.whl
| Download URL | python_apollo-0.0.3-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7acb7deb6b2c812fe08ec45243467c283d745df6db658b6a3892266bcfdc0aa6
|
|
BLAKE2b-256 checksum How to use checksums |
56cfe43678cad26613d00ee0afaebc7dea2758d6a6885270fc7f6f5959f4371a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for python-apollo 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.