A fixture generator based on type annotations.
Project description
A fixture generator based on type annotations.
Examples
>>> from dataclasses import dataclass >>> from datetime import datetime, date >>> >>> from fistro.fistro import generate >>> >>> >>> @dataclass >>> class Employee: >>> id: int >>> birthday: date >>> last_access: datetime >>> password: str >>> name: str = 'Carlos Sánchez' >>> >>> >>> employee = generate(Employee)() >>> print(employee)
It will show something like this:
>>> Employee(id=7621035066, name='Carlos Sánchez', birthday=datetime.date(259, 2, 21), last_access=datetime.datetime(2190, 11, 7, 7, 3, 20), password=":F'5nr\x0ch~")
Installation
>>> pip install fistro
Credits
In memoriam of Chiquito de la Calzada.
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
fistro-0.2.0.tar.gz
(5.2 kB
view hashes)
Built Distribution
fistro-0.2.0-py3-none-any.whl
(13.8 kB
view hashes)