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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for unifactory-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51db23016684c286df6790614ade56018c634bef485c822e878c74f8229f5891 |
|
MD5 | 9238d12a9728fbe7d5241ed0b0b3082c |
|
BLAKE2b-256 | a1ae8a9f063cc9703b1413fbf344ecc5d0f80c57515884e932ca327082fcd87a |