Skip to main content

bagof-factories

Hint-based factories that build default values at runtime.

Example

>>> from bagof.factories import get_factory
>>> get_factory(list[int])()
[]
>>> get_factory(dict[str, int])()
{}
>>> get_factory(set[int])()
set()
>>> get_factory(int)()
0
>>> get_factory(int | None)()  # optional -> None
>>> get_factory(str)()
''

Abstract collection ABCs (Sequence, Mapping, Set, Iterable, ...), numeric ABCs (numbers.Integral, numbers.Real, ...), enumerations, and builtin/stdlib types whose constructor needs arguments (range, slice, memoryview, datetime, date, uuid.UUID) are all handled too.

Metadata

Release files for bagof-factories 0.2.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 bagof-factories 0.2.0
File Size Uploaded Provenance Actions
bagof_factories-0.2.0.tar.gz 32.9 kB Without provenance Details for bagof_factories-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bagof-factories 0.2.0
File Interpreter ABI Platform Actions
bagof_factories-0.2.0-py3-none-any.whl Python 3 none any Details for bagof_factories-0.2.0-py3-none-any.whl

Total release size: 58.2 kB

Release files / bagof_factories-0.2.0.tar.gz

Download URL bagof_factories-0.2.0.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
425ef2150e77f80caef9f2666cf13da003739618c8923e510c469d2ab9334326
BLAKE2b-256 checksum
How to use checksums
6e0c918174c7356249c7b9b79ed8dd9a7d43b16af9203d3cd75516925a72de66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / bagof_factories-0.2.0-py3-none-any.whl

Download URL bagof_factories-0.2.0-py3-none-any.whl
Size 25.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f84fa044dcbda5a1195f2da67bf185d3a78c65f12d7e2d34bcd91f9337d1c8f
BLAKE2b-256 checksum
How to use checksums
54ba64ea990fff02a53c0bdd48ff95c559da6ab643a73360753218fb2b23eb13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for bagof-factories 0.2.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