enconia-utils
Enconia 工具包,提供常用的 Python 工具函数集合。
安装
pip install enconia-utils
初始化
使用OSS/SLS/MNS前先初始化凭证:
from enconia_utils import Credentials
Credentials.init(...)
# 或从环境变量初始化
Credentials.init_from_env()
功能模块
ID 生成器 (id_generator)
get_random_short_id()- 生成 8 位随机短 IDget_random_long_id()- 生成 22 位随机长 IDget_fix_short_id(base_str)- 根据输入字符串生成固定的短 IDget_fix_long_id(base_str)- 根据输入字符串生成固定的长 IDget_file_md5(filepath)- 计算文件 MD5
日期工具 (util_date)
get_orbit_std_datetime()- 获取标准格式的当前日期时间get_orbit_std_date()- 获取标准格式的当前日期get_date_range_list_v2(start, end)- 获取日期范围列表get_next_day(day, interval)- 获取下一天get_next_workday_cn(day)- 获取下一个中国工作日
飞书推送 (feishu_push)
FeiShuTalkChatBot- 飞书机器人消息推送
阿里云 SLS 日志 (aliyun_sls_log)
send_sls_log()- 发送日志到阿里云 SLS
阿里云 OSS (util_oss)
OssCloudObjectProvider- OSS 文件操作(上传、下载、复制、删除等)
文件类型映射 (util_type_mapping)
get_content_type_4_filename(filename)- 根据文件名获取 MIME 类型file2content_type(ext)- 扩展名转 MIME 类型content2file_type(mime)- MIME 类型转扩展名
依赖
- requests
- pytz
- deprecated
- oss2
- aliyun-log-python-sdk
- chinese_calendar
License
BSD-3-Clause
Metadata
Release files for enconia-utils 0.1.4
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 |
|---|---|---|---|---|
| enconia_utils-0.1.4.tar.gz | 20.9 kB | Without provenance | Details for enconia_utils-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| enconia_utils-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for enconia_utils-0.1.4-py3-none-any.whl |
Total release size: 43.7 kB
Release files / enconia_utils-0.1.4.tar.gz
| Download URL | enconia_utils-0.1.4.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b96214615283ddb9573a9b070209792e89036159b90c1b8d5a7cd216331a089
|
|
BLAKE2b-256 checksum How to use checksums |
5559a0e81703c936871c55194de44687efd1e0c01aa8e561a6f074ea1578766c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / enconia_utils-0.1.4-py3-none-any.whl
| Download URL | enconia_utils-0.1.4-py3-none-any.whl |
|---|---|
| Size | 22.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e63010db638e92e95b22d66f3a1d408354279b33866aec9f2d74fe398a3809b5
|
|
BLAKE2b-256 checksum How to use checksums |
3e8f587bed0a9b0740f353bf70587c14242988e9c2789fe934686fa20f7cc647
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for enconia-utils 0.1.4
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.