Skip to main content

A fixture generator based on type annotations.

Project description

https://img.shields.io/pypi/v/fistro.svg https://img.shields.io/pypi/pyversions/fistro.svg https://img.shields.io/circleci/project/github/kingoodie/fistro.svg https://codecov.io/gh/kingoodie/fistro/branch/master/graph/badge.svg

A fixture generator based on type annotations.

Examples

>>> from datetime import datetime, date
>>>
>>> from fistro.fistro import generate
>>>
>>>
>>> class Employee:
>>>     id: int
>>>     name: str = 'Carlos Sánchez'
>>>     birthday: date
>>>     last_access: datetime
>>>     password: str
>>>
>>>
>>> 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.

Files for fistro, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size fistro-0.1.1-py3-none-any.whl (9.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size fistro-0.1.1.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page