Sample Data
App to automatically populate django database.
Install
Install using pip, including any pillow if you want image genetion…:
pip install sampledata
pip install pillow # For image generation
Quick start
You can build any kind of object using the SampleData class.
from sampledata.helper import SampleData
def generate_random_users(instances):
sd = SampleData(seed=123)
users = []
for x in range(instances):
data = {
"slug": sd.slug(2, 3),
"name": sd.name('us'),
"claim": sd.sentence(),
"description": sd.paragraph(),
"email": sd.email(),
"photo": sd.image_stream(64, 64),
"is_active": sd.boolean(),
"birth_date": sd.past_date(),
"expected_death_date": sd.future_date(),
}
users.append(data)
return users
Documentation
Read the Docs: https://sampledata.readthedocs.org/en/latest/
Metadata
Release files for sampledata 0.3.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sampledata-0.3.7.tar.gz | 178.0 kB | Without provenance | Details for sampledata-0.3.7.tar.gz |
Release files / sampledata-0.3.7.tar.gz
| Download URL | sampledata-0.3.7.tar.gz |
|---|---|
| Size | 178.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b06916ef010d3c1a9db8aa314a144f24ad421f28597ff8c568603c451391a2cf
|
|
BLAKE2b-256 checksum How to use checksums |
c82a47577aa3b9038cdd1ab263ede01d497f9ceed5b50ac99642550a17bbcaff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sampledata 0.3.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.