Skip to main content

常量常用包

包括三种常量实现方式

1.基类继承
from zconst.const_base import const

class my_const(const):
    a = 1
my_const = my_const()

print(my_const.a)
my_const.a = 1
2.装饰器
from zconst.const_decorator import const

@const
class my_const():
    a = 1

print(my_const.a)
my_const.a = 1
3.元类metaclass
from zconst.const_metaclass import const

class my_const(metaclass=const):
    a = 1

print(my_const.a)
my_const.a = 1

Metadata

Release files for zconst 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zconst 1.0.0
File Size Uploaded Provenance
zconst-1.0.0.tar.gz 2.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for zconst 1.0.0
File Interpreter ABI Platform
zconst-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.3 kB

Release files / zconst-1.0.0.tar.gz

Download URL zconst-1.0.0.tar.gz
Size 2.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d448ff9f7db31ab89be2b9bc0a8b2d10870faa075dd6f2ff530554b71f72a50d
BLAKE2b-256 checksum
How to use checksums
9b6b29d42ace48c46bcd859468c5b341b147be7ed8e1f570befd3af78012ad7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

Release files / zconst-1.0.0-py3-none-any.whl

Download URL zconst-1.0.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2350ac73118335cf8d1e91192d21dbf4a8f236b99e1480853d35a033ac18ec4
BLAKE2b-256 checksum
How to use checksums
c0468a375837b2996d30518401c534f124ef6eca28a608836db0f2e816f8db5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

Security for zconst 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page