Skip to main content

Build Status Coverage Status PyPI Status

Container for dictionary-like validated data structures

Documentation is available on Read the Docs: http://tg-option-container.readthedocs.io

Getting started

Install tg-option-container:

pip install tg-option-container

Then use it in your project:

from tg_option_container import Option, OptionContainer


class Character(OptionContainer):
    props = [
        Option.string('name', None),
        Option.string('gender', None, choices=('M', 'N')),
    ]


john = Character(name='John Smith', gender='M')

# This will raise: tg_option_container.types.InvalidOption: Invalid choice x for option `gender`, choices are ('M', 'N').
mary = Character(name='Mary Smith', gender='x')

Development

You can run the tests by running tox in the top-level of the project.

Metadata

Release files for tg-option-container 0.4.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 tg-option-container 0.4.0
File Size Uploaded Provenance
tg-option-container-0.4.0.tar.gz 9.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tg-option-container 0.4.0
File Interpreter ABI Platform
tg_option_container-0.4.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 19.8 kB

Release files / tg-option-container-0.4.0.tar.gz

Download URL tg-option-container-0.4.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
406a683a2b93161297de82a8ee98fc3bab38db909c48d5456d0e9b10e4f08281
BLAKE2b-256 checksum
How to use checksums
86a5ed3451d065a43b28008cf9956e0284a056a6b0b7cfa699665ef792c204e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / tg_option_container-0.4.0-py2.py3-none-any.whl

Download URL tg_option_container-0.4.0-py2.py3-none-any.whl
Size 10.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
044b4d171f29de18fac07161ec6de9e450e4295647bf89fe6d75ed1c16091ef0
BLAKE2b-256 checksum
How to use checksums
edb283df4bd75cd8c5d5384536def4b012820ff2a98790035e4744c766d4f67f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for tg-option-container 0.4.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.

Release history Release notifications | RSS feed

This release

0.4.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