magic-numbers
Magically import magic number constants. Like so:
from magic_numbers import FORTY_TWO, SIXTY_NINE, FOUR_HUNDRED_AND_TWENTY
from magic_numbers import ONE_THOUSAND_THREE_HUNDRED_AND_TWELVE
from magic_numbers import THREE_POINT_ONE_FOUR_ONE_FIVE_NINE_TWO as PI
print(f"{FORTY_TWO = }") # 42
print(f"{SIXTY_NINE = }") # 69
print(f"{FOUR_HUNDRED_AND_TWENTY = }") # 420
print(f"{ONE_THOUSAND_THREE_HUNDRED_AND_TWELVE = }") # 1312
print(f"{PI = }") # 3.141592
Note: Floats can only be specified using "point", there is no support (yet) for fractions like THREE_AND_A_HALF or TWO_THIRDS
Installation
python3 -m pip install magic-numbers
Metadata
Release files for magic-numbers 1.0.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 |
|---|---|---|---|---|
| magic_numbers-1.0.3.tar.gz | 3.3 kB | Without provenance | Details for magic_numbers-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| magic_numbers-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for magic_numbers-1.0.3-py3-none-any.whl |
Total release size: 6.9 kB
Release files / magic_numbers-1.0.3.tar.gz
| Download URL | magic_numbers-1.0.3.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16680035652582500ab4d3abcaa908e6f48173bde0ef14b46822baad57c7bda5
|
|
BLAKE2b-256 checksum How to use checksums |
3e31deb47ce78eaae54accb8738b0e9936e3dca9aef8cc493fd027d4c2ae86a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.7
|
Release files / magic_numbers-1.0.3-py3-none-any.whl
| Download URL | magic_numbers-1.0.3-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
97d731da16c485f3934290cfbdfd1a7820ffb387320d5cd1a7510bc9c084a26e
|
|
BLAKE2b-256 checksum How to use checksums |
2a43f5766a317d00a53710ac4d5ce2ba4e9c712204067ed54a508d3c742e3ca9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.7
|
Security for magic-numbers 1.0.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.