Generate data randomly
Project description
randog 0.19.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
- IPv4Address
- (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.19.0.tar.gz
(57.4 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.19.0-py3-none-any.whl
(90.7 kB
view details)
File details
Details for the file randog-0.19.0.tar.gz.
File metadata
- Download URL: randog-0.19.0.tar.gz
- Upload date:
- Size: 57.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afbc4c13930c32b90ed11864da3e1cab2e3a5034140c4da621d458ac2bbeb350
|
|
| MD5 |
c00b769d2e193b5f4f01563af5fd1a83
|
|
| BLAKE2b-256 |
435b36267c0fe4bfc5fcd81c47064f53734c53e7680609cb0345d6b65f6f4f5a
|
File details
Details for the file randog-0.19.0-py3-none-any.whl.
File metadata
- Download URL: randog-0.19.0-py3-none-any.whl
- Upload date:
- Size: 90.7 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 |
54a6f4b3dd6eaf6970474c7922be50b552cec60781ed06021627796f1a73a6cf
|
|
| MD5 |
79b691091c1bd1266a6c59311a7c649b
|
|
| BLAKE2b-256 |
e1cd36543dfd69d8b37c695d028533a1307f89abf76fe004d274c081cf68f4ab
|