Skip to main content

nonemptystr

PyPI PyPI - Python Version Code style: black license

Non-empty string.

Usage

pip install nonemptystr
from nonemptystr import EmptyString, nonemptystr

name: nonemptystr = nonemptystr("John")

try:
    name = nonemptystr("")
except EmptyString:
    print("The name is empty.")

... with pydantic

pip install nonemptystr, pydantic
from nonemptystr import nonemptystr
from pydantic import BaseModel, ValidationError

class Request(BaseModel):
    user_id: nonemptystr

try:
    request = Request.model_validate({"user_id": ""})
    print(f"user_id: {request.user_id}")
except ValidationError:
    print("user_id is empty")

API

Module nonemptystr

class nonemptystr(obj: object)

Subclass of str. Raise EmptyString exception if str(obj) is empty string.

class EmptyString

Subclass of ValueError.

Metadata

Release files for nonemptystr 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 nonemptystr 1.0.0
File Size Uploaded Provenance Actions
nonemptystr-1.0.0.tar.gz 2.8 kB Without provenance Details for nonemptystr-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 6.4 kB

Release files / nonemptystr-1.0.0.tar.gz

Download URL nonemptystr-1.0.0.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
928537e23c395d48da4334ff3cb476d6f996b058233801928759e3d15b51ddb3
BLAKE2b-256 checksum
How to use checksums
aba3e9e080f43fc80c7afd6af783aff27d9330002867d05264e7d92d409f761d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.3 Darwin/23.2.0

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

Download URL nonemptystr-1.0.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a96b2dc347548c3b113c975de3a30d7e1badd87634d72e144b0ffba00f45538f
BLAKE2b-256 checksum
How to use checksums
9a9bb749092d60ce48c30f670b94bf105553f65edab4c0e68fd3a9a7324b9e7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.11.3 Darwin/23.2.0

Security for nonemptystr 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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