jsf
Creates fake JSON files from a JSON schema
What it is and what it does
jsf is a Python port of json-schema-faker that turns JSON Schema definitions into streams of realistic fake data. You define a schema with optional $provider directives (pointing to faker methods or custom functions), and jsf generates valid JSON objects matching that schema. It validates output against the schema, supports multi-level state for dependent fields (e.g., siblings sharing a surname), and can convert schemas to Pydantic models with generated examples.
The package is designed for test-data generation, rapid prototyping, and API mocking. It integrates with FastAPI to auto-generate example responses and schemas in OpenAPI docs. You can use it as a library in Python code, load schemas from JSON files, or run it from the command line or Docker. Six runtime dependencies (faker, jsonschema, pydantic, rstr, smart-open, typing-extensions) handle schema validation, data generation, and file I/O.
Use it for:
- Generate realistic test fixtures for unit and integration tests without hand-crafting mock data
- Populate FastAPI endpoints with auto-generated example responses and interactive schema documentation
- Create synthetic datasets for development and staging environments that match your data contracts
- Prototype APIs and data pipelines before real data is available or during schema design
- Validate JSON schemas by generating and verifying conformant fake data
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates realistic fake JSON data from JSON Schema definitions, using pluggable data providers like faker to populate fields with consistent, meaningful test data.
Yes, if you need test-data generation from JSON schemas. The package is stable, permissively licensed, and has low install friction. Maintenance is aging (last release March 2024, no commits for 871 days), so it's best suited for established schemas that don't require frequent updates. No known vulnerabilities. Good fit for testing, mocking, and prototyping workflows.
Install
jsf on PyPI
pip
pip install jsfuv
uv add jsfpoetry
poetry add jsfInstalling jsf
Before you install
Low friction install with six runtime dependencies (faker, jsonschema, pydantic, rstr, smart-open, typing-extensions). Maintenance is aging—last release was in March 2024 and no commits for 871 days—but the repository remains active and the package is stable enough for test-data use.
License in practice
MIT License (permissive). You can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
from jsf import JSF
faker = JSF({
"type": "object",
"properties": {
"name": {"type": "string", "$provider": "faker.name"},
"email": {"type": "string", "$provider": "faker.email"},
},
"required": ["name", "email"],
})
fake_json = faker.generate()
Verify before relying
- Whether custom $provider lambdas can reference all faker methods or only a documented subset
- Performance characteristics when generating large volumes of data or deeply nested schemas
- Extent of contentMediaType support beyond the noted 'subset' of string types
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — faker, jsonschema, pydantic, rstr, smart-open, typing-extensions |
| Maintenance | aging — 871 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 748,829/month — #5,164 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: jsf-0.11.2-py3-none-any.whl
Keywords: JSON Schema, Fake data, Test data, Schema, JSON, Faker, Hypothesis, Rapid Prototype, Data contract
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
FakerFaker generates realistic fake data—names,…
permissive · top 1,000 on PyPI
fake-factoryfake-factory is a deprecated package that…
permissive · top 15,000 on PyPI
faker-nonprofitExtends Faker with methods to generate…
permissive · top 15,000 on PyPI
robotframework-fakerWraps Faker's random test data generation as…
permissive · top 15,000 on PyPI
mimesisMimesis generates realistic fake data across 47…
permissive · top 5,000 on PyPI
pytest-fakerProvides pytest fixtures that integrate the…
permissive · top 15,000 on PyPI
faker-eduGenerates fake data for educational…
permissive · top 15,000 on PyPI
streamlit-fakerGenerates random fake data to populate…
unclear · top 15,000 on PyPI
faker-e164Generates fake E164-formatted phone numbers for…
permissive · top 15,000 on PyPI
faker-enumAdds enum value generation to the Faker…
permissive · top 15,000 on PyPI