测试工具库 czo
用于快速构造测试数据与常用辅助函数(时间、随机、网络、路径、假数据)。
安装
pip install czo
快速上手
from czo import Rand, Faker, DateTime, Net, Paths
Rand.random_str(12) # 随机字符串
Rand.random_email() # 随机邮箱
Rand.random_url() # 随机 URL
DateTime.parse_iso8601("2024-01-01T00:00:00Z") # 解析 ISO8601
DateTime.to_timezone("2024-01-01T00:00:00Z", 8) # 转换时区
Net.generate_ip_list(3) # 生成 IPv4 列表
Net.ip_in_range("192.168.1.1", "192.168.1.0/24")
faker = Faker()
faker.profile(zh=True) # 随机中文个人档案
开发与测试
python -m venv .venv && .\.venv\Scripts\activate # Windows
pip install -r requirements.txt
python -m pytest
目录结构
src/czo/utils/核心工具(时间、随机、网络、路径、假数据等)src/czo/data/内置数据集(地址、学校、车牌等)tests/pytest 用例
Metadata
Release files for czo 0.3.3
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 |
|---|---|---|---|---|
| czo-0.3.3.tar.gz | 73.3 kB | Without provenance | Details for czo-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| czo-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for czo-0.3.3-py3-none-any.whl |
Total release size: 148.9 kB
Release files / czo-0.3.3.tar.gz
| Download URL | czo-0.3.3.tar.gz |
|---|---|
| Size | 73.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4bd702378a7db39fef57b16df0ddf6d27fb8685df7b65775f2ad5c63f53a62c3
|
|
BLAKE2b-256 checksum How to use checksums |
2f0c54d3d138011a24eb9b2e113f4bfa2ea12175f8e97bd7cd981ce0ca081617
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / czo-0.3.3-py3-none-any.whl
| Download URL | czo-0.3.3-py3-none-any.whl |
|---|---|
| Size | 75.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c486b33c09e61f68b8ae3344b7351dfb47f81f12ba94f3635c1ea5728412979d
|
|
BLAKE2b-256 checksum How to use checksums |
0d9c073e434883b9bf49c48487c239e7380ee5de60dacf3e74968570452e0cd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for czo 0.3.3
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.