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.

Source Distribution

fistro-0.1.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

fistro-0.1.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fistro-0.1.1.tar.gz
  • Upload date:
  • Size: 4.3 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.1.1.tar.gz
Algorithm Hash digest
SHA256 9e64275c2f6c7d19c74be6579ce82fdcf6bba82623b227e7b827876d2258083a
MD5 7637dd808e305d83317dfd2241b5ff85
BLAKE2b-256 7739b60cdf738a2a63a211f575fe51300eeeba5805d017ea0a48847c2b7420c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fistro-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.6 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 743858c336fc49feffeaaa4f4699e3a837a12db68ff8174cf74c16fdb15256b8
MD5 f84741cd50fe90ef3b123a99fe779d1b
BLAKE2b-256 895af724c18aa2899c91532ddc5a55bb484eb94b43639ecc0b987793e4e56920

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