微服务配置加载器
如何使用
from py_bootstrap import config,get_app_homepage
print(config.get('你的配置')) # config 是由 项目根目录 bootstrap.py 文件内可json化数据与 spring-config服务获取你的服务配置的合并
print(get_app_homepage("服务名")) # 可通过该方法获取服务ip
bootstrap 文件配置解读
app_name应用名称 与 eureka注册,config获取挂钩config_server_namespring-config 服务名eureka_urleureka地址register是否注册eureka(该配置可以从远程的config-file覆盖)profile启动模式(dev|prod)extra_profiles额外的配置文件加载( 逗号隔开会加载所有spring-config-file中的 application-文件名.yml 配置 )
其余的可json化配置也会加载到config中,但是会被远程覆盖
功能
- 配置加载
- 日志初始化
- eureka注册
- 服务发现接口
Metadata
Release files for py-bootstrap 0.0.15
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 | Actions |
|---|---|---|---|---|
| py_bootstrap-0.0.15.tar.gz | 6.8 kB | Without provenance | Details for py_bootstrap-0.0.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_bootstrap-0.0.15-py3-none-any.whl | Python 3 | none | any | Details for py_bootstrap-0.0.15-py3-none-any.whl |
Total release size: 11.4 kB
Release files / py_bootstrap-0.0.15.tar.gz
| Download URL | py_bootstrap-0.0.15.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9668a4bd0c7cf16a13b0717936f6380f36af5a57e5dffce4383943beed0f462d
|
|
BLAKE2b-256 checksum How to use checksums |
e2b4b34dffcb346ba5dcc86ffa8f462002e305212604e62442e48b821bcef25b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Release files / py_bootstrap-0.0.15-py3-none-any.whl
| Download URL | py_bootstrap-0.0.15-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d44751716fb14290abf52802c1df97a670577c8dfcffe78e3f3f7620e03287d2
|
|
BLAKE2b-256 checksum How to use checksums |
605756afcda88552b3805f03e528dd7705e1550d41162912512af96c80ff62e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
|
Security for py-bootstrap 0.0.15
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.