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
Release history Release notifications | RSS feed
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.5.tar.gz
(9.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elf_py_utils-0.1.3.5.tar.gz.
File metadata
- Download URL: elf_py_utils-0.1.3.5.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.13 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7753feafa603c4c0d5affbf0544e12e07ec9fb2ef126b3bb0187862fa5070c33
|
|
| MD5 |
f148ee9ebfbeb12a623ca65f7f6ee174
|
|
| BLAKE2b-256 |
07c24e284420569c63f51e30fced328994954008f4c241c8e101e37917fd7c3c
|
File details
Details for the file elf_py_utils-0.1.3.5-py3-none-any.whl.
File metadata
- Download URL: elf_py_utils-0.1.3.5-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.9.13 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68d3369099d0496b654c2a1cf845e144003ff6dcf3d5ad05c682724aa1763fed
|
|
| MD5 |
d46b90ef0334ccf0ad9ec190326f162c
|
|
| BLAKE2b-256 |
5946142cc63b7231e9c64b22eb635ff5897bc8f8a62002981e24704815bc6f4a
|