dataforger
Generate realistic fake data from Python or the command line, and save it as CSV or JSON. Dataforger uses only the Python standard library and has no third-party runtime dependencies.
Built-in names, streets, companies, and email domains are stored in
src/dataforger/data.json. Country names and their associated cities are
stored in src/dataforger/countries.json; when generating a record with both
country and city fields, the city is selected from that country's list.
Install
Requires Python 3.10 or later.
From a checkout of this repository:
python -m pip install .
After publishing the package to PyPI:
python -m pip install dataforger
Publishing to PyPI
The GitHub Actions workflow runs the tests on Python 3.10 through 3.13 and
builds wheel and source distributions on pushes and pull requests. To publish,
configure a PyPI trusted publisher for this GitHub repository, using workflow
.github/workflows/publish.yml and the GitHub environment pypi. Then create
and publish a GitHub Release; the workflow publishes its tested distributions
to PyPI using trusted publishing.
Command line
Run dataforger without field options for an interactive prompt. Or specify
all options directly:
dataforger --rows 100 --field name:name --field email:email --field age:age --format csv --output users.csv --seed 42
The --field option can be repeated. Supported field types are name,
first_name, last_name, email, phone, address, city, country,
company, uuid, date, age, integer, float, and boolean. If
--field is omitted, the command prompts for the row count, format, output
path, and fields. When using command-line field options, the defaults are 10
rows, JSON format, and data.json.
Python API
from dataforger import generate_data, write_data
records = generate_data(
{"name": "name", "email": "email", "age": "age"},
rows=100,
seed=42,
)
write_data(records, "users.json", "json")
write_data(records, "users.csv", "csv")
generate_data returns a list of dictionaries. Pass the resulting records,
an output path, and either "csv" or "json" to write_data.
Metadata
Release files for dataforger 0.1.1
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 | |
|---|---|---|---|---|
| dataforger-0.1.1.tar.gz | 360.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dataforger-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 720.4 kB
Release files / dataforger-0.1.1.tar.gz
| Download URL | dataforger-0.1.1.tar.gz |
|---|---|
| Size | 360.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
705edcfdd3cdf2102a19585508f698a90204b493c05f7be251467c6dda3b47f7
|
|
BLAKE2b-256 checksum How to use checksums |
4d15ec2cee8b258b8ebd8cd6ea59164b84082bad37596fef0a798cda88c3fa3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logRelease files / dataforger-0.1.1-py3-none-any.whl
| Download URL | dataforger-0.1.1-py3-none-any.whl |
|---|---|
| Size | 359.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68102c1879840f27f007115394766116a19f820542bf0af6c74f7e5d68424a6d
|
|
BLAKE2b-256 checksum How to use checksums |
ade53fbc0f6296a3345d05ae0f1ed60f81466a5733ba8ff201ae50bcbde1283a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logSecurity for dataforger 0.1.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for dataforger-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.
Transparency logA 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.