Skip to main content

No project description provided

Project description

elf-py-utils项目说明

小精灵Python工具包

前言

  • 目标使用者:从事运维工程师、后端开发工程师等相关岗位,并熟悉python基础语法规则
  • 本包的工作:在前人的基础上,对当前已有的工具包进行二次封装,并提供一个统一的配置文件来进行配置管理,意图提供一个类似于Spring Boot的框架方便使用

当前功能

Redis工具类

配置示例

通过配置文件,实现一种代码连接多种Redis部署方式

redis:
  # 需要在同一命名空间中定义redis的服务发现
  # redis部署方式 单节点-single 集群模式-cluster 哨兵模式-sentinel
  type: cluster
  single:
    host_port: redis
  cluster:
    host_port: redis-cluster:6379
  sentinel:
    db: 1
    password: password
    service_name: mymaster
    host_port: redis-sentinel-01:6379,redis-sentinel-02:6379,redis-sentinel-03:6379

调用

from elf_py_utils import RedisUtil

redis = RedisUtil.connect_redis()

依赖

redis==3.5.3
redis-py-cluster==2.1.3

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

elf-py-utils-0.1.3.3.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

elf_py_utils-0.1.3.3-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file elf-py-utils-0.1.3.3.tar.gz.

File metadata

  • Download URL: elf-py-utils-0.1.3.3.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.7 Windows/10

File hashes

Hashes for elf-py-utils-0.1.3.3.tar.gz
Algorithm Hash digest
SHA256 86e4efbb97247a3186dc9d6e18c7254ba154049383d8e4ee1c685b562457f85e
MD5 36db2786694df95823b927527e4ed1bb
BLAKE2b-256 bec0443a59a41ee7f371a275aa60d0f550546f20fe9263fbdc5894f7b3deae8d

See more details on using hashes here.

File details

Details for the file elf_py_utils-0.1.3.3-py3-none-any.whl.

File metadata

  • Download URL: elf_py_utils-0.1.3.3-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.7 Windows/10

File hashes

Hashes for elf_py_utils-0.1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7e1f391564fedc8c4821fe1770f1d61847e359cc69f907fab5477504122a5381
MD5 431a49a023ab0439cb90edbc2a131f90
BLAKE2b-256 249f4223607d70d77ca2c2c8a32b4d781393e40cf832864ab081519f0b77fa44

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