Skip to main content

Automatically choose the right polyfactory.

Project description

Unifactory

Unifactory is a spin off from fastapi-overrider. A simple tool to automatically choose a matching factory from polyfactory's inventory.

Installation

pip install unifactory

Examples

from polyfactory.pytest_plugin import register_fixture
from unifactory import unifactory, build, batch, coverage

@dataclass
class Person:
    name: str
    age: float
    height: float
    weight: float

some_person = build(Person)
five_persons = batch(Person, 5)
all_persons = coverage(Person)
person_factory = register_fixture(unifactory(Person), name="person_factory")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

unifactory-0.1.0.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

unifactory-0.1.0-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page