lesscode_options
介绍
lesscode_options是自定义全局配置项,一个地方定义,全局使用
示例
from lesscode_options.options import define, options
define(name="ceshi", type_=str, default="hello world", help_="说明", callback=str)
define(name="age", type_=int, default=5, help_="年龄", callback=str)
print(options.ceshi)
print(type(options.age))
options.ceshi = "hello"
print(options.ceshi)
Metadata
Release files for lesscode-options 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lesscode_options-0.0.1.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lesscode_options-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.1 kB
Release files / lesscode_options-0.0.1.tar.gz
| Download URL | lesscode_options-0.0.1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe07fac6a368a66c712ad86040283186e51258c3eb5632bb17a062b66f38c4db
|
|
BLAKE2b-256 checksum How to use checksums |
5f2e2ac102c9e1d756f1a8f2efd8b9fa40e555f8271de73588b308aa77ce9fac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|
Release files / lesscode_options-0.0.1-py3-none-any.whl
| Download URL | lesscode_options-0.0.1-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea4f504c4e5abe549a2500e1590d8d64ce53999da6e863823ab01d9488c1d735
|
|
BLAKE2b-256 checksum How to use checksums |
f2b4de31ac149d301100ec987bdccf29832988f8596a9aaf62af6789789f06b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.21
|