Generate data randomly
Project description
randog 0.16.0 — Randomly object generator
randog is a package which helps to generate data randomly.
Install
You can install from PyPI.
pip install -U randog
Usage
For example:
import uuid
import randog.factory
factory = randog.factory.from_example({"uuid": uuid.uuid4, "name": "", "age": 20})
generated = factory.next()
assert isinstance(generated, dict)
assert isinstance(generated["uuid"], uuid.UUID)
assert isinstance(generated["name"], str)
assert isinstance(generated["age"], int)
See the documentation for more details.
Types that can be generated
- int, float, str, etc.
- tuple, list, dict
- datetime, date, time, timedelta
- (Experimental feature) Model instance of SQLAlchemy
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
randog-0.16.0.tar.gz
(45.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
randog-0.16.0-py3-none-any.whl
(70.7 kB
view details)
File details
Details for the file randog-0.16.0.tar.gz.
File metadata
- Download URL: randog-0.16.0.tar.gz
- Upload date:
- Size: 45.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f49299254648d48fe4cebce323b7e154c1a4065edbd02763c27cd80bf420bafd
|
|
| MD5 |
c8ecd38a15b5bba891262a1f0e5282ca
|
|
| BLAKE2b-256 |
fb2d69060a6678712630f43d3d9b5d2db7e67b0e75475a94d9442179083dfa00
|
File details
Details for the file randog-0.16.0-py3-none-any.whl.
File metadata
- Download URL: randog-0.16.0-py3-none-any.whl
- Upload date:
- Size: 70.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
426efeb690aa28424747d81d6e39c11665a5e080098507271bcdb3705054d503
|
|
| MD5 |
0e36e794195e9e9cabd4dd4c20436439
|
|
| BLAKE2b-256 |
609d668ef4abd17b78add1919acba8dc608d8922cea0a31a6a5f7355c4cbd947
|