Generate data randomly
Project description
randog 0.17.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.17.0.tar.gz
(48.0 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.17.0-py3-none-any.whl
(75.0 kB
view details)
File details
Details for the file randog-0.17.0.tar.gz.
File metadata
- Download URL: randog-0.17.0.tar.gz
- Upload date:
- Size: 48.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e48daeb9b20b0ba84fdaac928d2f27e099335baf77786a40618dbc2b1dc18b77
|
|
| MD5 |
c3342017caaa52ec8de7554c2f7224d6
|
|
| BLAKE2b-256 |
975fcd2e2a2826454cf7b28623d5c9fa9e8f322b431b27101eab05d82d4e59b6
|
File details
Details for the file randog-0.17.0-py3-none-any.whl.
File metadata
- Download URL: randog-0.17.0-py3-none-any.whl
- Upload date:
- Size: 75.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97d2bde105ef20b7a9f9f71f1759ba51865772cd8efbb4ac5b908cd98e994417
|
|
| MD5 |
ecc7960885f4d715155f1a713804434a
|
|
| BLAKE2b-256 |
733afcb0b13e3762dfaac5559d75dfd88b27fdc6c4b0ac08af063600fee447ba
|