Skip to main content

Code style: black

stringliteral

from stringliteral import StringLiteral

class AllowedValues(StringLiteral):
    LEFT="left"
    RIGHT="right"

value = AllowedValues.LEFT

AllowedValues.contains("left") # returns True
AllowedValues.contains("up") # returns False

Define your class attributes with ALL CAPS only. Non CAP attributes will be ignored.

I created this for my own usage after tripping over using the built in Enum class many, many times..

Metadata

Release files for stringliteral 0.0.1

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

Source distribution (sdist)

Source distribution for stringliteral 0.0.1
File Size Uploaded Provenance Actions
stringliteral-0.0.1.tar.gz 5.0 kB Without provenance Details for stringliteral-0.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 6.9 kB

Release files / stringliteral-0.0.1.tar.gz

Download URL stringliteral-0.0.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
89dbe0742e5d978dec7941c1805a99f93a9c166a718327e57c1df2096accfa32
BLAKE2b-256 checksum
How to use checksums
0b5fdfa1f04322442da76003eaed2d8177485a7ac0f92ba625e227fc42cef6ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release files / stringliteral-0.0.1-py3-none-any.whl

Download URL stringliteral-0.0.1-py3-none-any.whl
Size 1.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
885d26806d0efdc8765602762eaefdc752ce1c29918f6c361706ddb3d85df19f
BLAKE2b-256 checksum
How to use checksums
eaf9cddff5a47401d540e986bbad3652d6c4ef7751ad6280dc58c9e5ef0e3f19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Security for stringliteral 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 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