Recipes to generate random instances of various types, beyond the scope of random.
Project description
Random Recipes
Recipes to generate random instances of various types, beyond the scope of random.
Python's random implements generators for pseudo-random bytes, integers, and sequences. In random-recipes we collect additional functions to generate random instances of common types that may be useful.
Recipes
Type | Function |
---|---|
bool | random_bool |
bytes | random_bytes |
decimal.Decimal | random_decimal |
datetime.date | random_date |
datetime.datetime | random_datetime |
float | random_float |
fractions.Fraction | random_fraction |
str | random_str |
Installation
Install the library with pip from PyPi:
pip install random-recipes
Development
random-recipes
is developed by @ipear3.
This is a low-commitment project for practicing Python packaging, but it does try to contribute something of value.
Suggestions, comments, and contributions are welcome.
This project draws inspiration from more-itertools, a well-designed, simple extension to a Python's itertools.
Packaging & Dependency Management
Install the project with Poetry: poetry install --with dev,test
Pre Commit
We'll use pre-commit to ensure contributions maintain the development standards of the project, which follow.
Standards
Standard | pre-commit |
---|---|
Code should be formatted by Black. | black |
pyproject.toml should be kept up to-date. |
poetry-check |
poetry.lock should be kept up-to-date. |
poetry-lock |
pytest should pass |
pytest |
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
Built Distribution
Hashes for random_recipes-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 254d793c1ec01d9463cd15d88d311210c0f142053f8a21abf166151c846a75cc |
|
MD5 | 7bc4e729a473e8b476620512eb18f804 |
|
BLAKE2b-256 | f4504860df902e1bcbee899899f7819092a7fda376658b71ab4ba5ae0a201dc1 |