skillfed

jsf

Creates fake JSON files from a JSON schema

jsf v0.11.2 748.8K downloads/30d#5,164 on PyPI200
Permissive license AGING released

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 jsf

uv

uv add jsf

poetry

poetry add jsf

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

json schema fake data generatortest data generation from schemafaker json schemamock json datasynthetic data from schemajson schema to fake objectstest fixture generation
test-dataschema-drivenfastapi-integration

More Testing packages