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 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 details)

Uploaded Source

Built Distribution

fistro-0.2.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file fistro-0.2.0.tar.gz.

File metadata

  • Download URL: fistro-0.2.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.11.4 CPython/3.7.0 Windows/10

File hashes

Hashes for fistro-0.2.0.tar.gz
Algorithm Hash digest
SHA256 95f459a09d9487f2594ac15eb9f90ebd9ce8693713e3ee77fdfb5d22200574f2
MD5 c1a8aecfb04ba846e177bbd275046c1a
BLAKE2b-256 c1203d89a453f0f1e3e5d992fc519feefcbd83396c2570d933bb5064a6413dc2

See more details on using hashes here.

File details

Details for the file fistro-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fistro-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.11.4 CPython/3.7.0 Windows/10

File hashes

Hashes for fistro-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 129b2aff0bafac5625bfd0b38faf930d67c0270ae46b2c9d0e33936234d17bcf
MD5 287de0a6b572a3e313d8598c523d4cd3
BLAKE2b-256 4e832fdd0051be3fe6902a7b8551389820fec2c975174ddaddd50ece403223e9

See more details on using hashes here.

Supported by

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