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 redis_util

redis = redis_util.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.4.tar.gz (9.1 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.4-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file elf_py_utils-0.1.3.4.tar.gz.

File metadata

  • Download URL: elf_py_utils-0.1.3.4.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.9.7 Windows/10

File hashes

Hashes for elf_py_utils-0.1.3.4.tar.gz
Algorithm Hash digest
SHA256 2fe28332375a1691c6c0a616524863ee570b020584aba53f0d827b984db96010
MD5 5d7122516937e8f136bc1c0c92138704
BLAKE2b-256 b22c04a66eb28c543c51deba83e1dc4a8ec968cdb83c36ab2b1e36eec949f83e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for elf_py_utils-0.1.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f2c4371ea0b991ab0bd25f9e69978b22279b2c6a463e5c805c511002e6f13736
MD5 b086673953c80b9f86888b1bd8cd258c
BLAKE2b-256 74ac3ff569f615532fa31f304fb558b8b54ba9cf1ae99d2ace973efa302f6503

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