Skip to main content

Pydantic-Choices

Build Status PyPI version Codcov

How to use

from pydantic_choices import choice

import pydantic as pd


Licenses = choice(["GPL", "GPLv3+", "MIT", "MPL 2.0"])


class Project(pd.BaseModel):
    id: str
    url: str
    license: Licenses


# Validation passes
Project(
    id="pydantic_choices",
    url="https://github.com/vinissimus/pydantic-choices",
    license="MIT",
)

# Validation fails
p1 = Project(
    id="pydantic_choices",
    url="https://github.com/vinissimus/pydantic-choices",
    license="propietary",  # value not in choice
)

Metadata

Release files for pydantic-choices 0.1.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 pydantic-choices 0.1.1
File Size Uploaded Provenance Actions
pydantic-choices-0.1.1.tar.gz 2.9 kB Without provenance Details for pydantic-choices-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pydantic-choices 0.1.1
File Interpreter ABI Platform Actions
pydantic_choices-0.1.1-py3-none-any.whl Python 3 none any Details for pydantic_choices-0.1.1-py3-none-any.whl

Total release size: 5.9 kB

Release files / pydantic-choices-0.1.1.tar.gz

Download URL pydantic-choices-0.1.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
86d7958c43c794f35b389df3a94b680ddfa8fd12da828188b70937b7550c46b8
BLAKE2b-256 checksum
How to use checksums
a51ae05a4ef626e0c48fffff25dc574541f621294186c6bbc0bfc415dcd3ffd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.8.2 Linux/4.15.0-109-generic

Release files / pydantic_choices-0.1.1-py3-none-any.whl

Download URL pydantic_choices-0.1.1-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
956c3e61073aabdd908e9aa4b7310445928f7d5ccde7c20823fc8e36cc697b56
BLAKE2b-256 checksum
How to use checksums
18d57012a12bb4c3f1248308f9838b70487d21160c882535810c844a342c0c4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.8.2 Linux/4.15.0-109-generic

Security for pydantic-choices 0.1.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.1.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