Skip to main content

python端启动器

Project description

微服务配置加载器

如何使用

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_name spring-config 服务名
  • eureka_url eureka地址
  • register 是否注册eureka(该配置可以从远程的config-file覆盖)
  • profile 启动模式(dev|prod)
  • extra_profiles 额外的配置文件加载( 逗号隔开会加载所有spring-config-file中的 application-文件名.yml 配置 )

其余的可json化配置也会加载到config中,但是会被远程覆盖

功能

  • 配置加载
  • 日志初始化
  • eureka注册
  • 服务发现接口

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

py_bootstrap-0.0.15.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_bootstrap-0.0.15-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file py_bootstrap-0.0.15.tar.gz.

File metadata

  • Download URL: py_bootstrap-0.0.15.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for py_bootstrap-0.0.15.tar.gz
Algorithm Hash digest
SHA256 9668a4bd0c7cf16a13b0717936f6380f36af5a57e5dffce4383943beed0f462d
MD5 5b7aa446a888aebcd689c67dfd2c026c
BLAKE2b-256 e2b4b34dffcb346ba5dcc86ffa8f462002e305212604e62442e48b821bcef25b

See more details on using hashes here.

File details

Details for the file py_bootstrap-0.0.15-py3-none-any.whl.

File metadata

  • Download URL: py_bootstrap-0.0.15-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for py_bootstrap-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 d44751716fb14290abf52802c1df97a670577c8dfcffe78e3f3f7620e03287d2
MD5 96e5f25eccfc26fb4886e1dbd8498f04
BLAKE2b-256 605756afcda88552b3805f03e528dd7705e1550d41162912512af96c80ff62e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page