Skip to content

Tools for generating random JSON data from JSON schemas.

License

Notifications You must be signed in to change notification settings

HumanCellAtlas/dcp-pyjsongen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HCA JSON Generator

A tool for generating JSON data based on a provided JSON schema.

Setup

run make install

Test

Examples

Here is an example for using HCAJsonGenerator

from jsongen.hca_generator import HCAJsonGenerator

schema_urls = ["https://schema.humancellatlas.org/bundle/5.1.0/ingest_audit"]

faker = HCAJsonGenerator(schema_urls)
fake_json = faker.generate()

Here is an example for using JsonGenerator

from jsongen.generator import JsonGenerator

schema_analysis={
    "analysis_id": {
        "type": "string",
        "description": "A unique ID for this analysis."
    }
}

json_gen = JsonGenerator()
generated_json = json_gen.generate_json(schema_analysis)

About

Tools for generating random JSON data from JSON schemas.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published