skinfer

Skinfer is a tool for inferring and merging JSON schemas

  • Owner: scrapinghub/skinfer
  • Platform:
  • License:: BSD 3-Clause "New" or "Revised" License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

============================================
Skinfer - tool for working with JSON schemas

.. image:: https://badge.fury.io/py/skinfer.png
:target: http://badge.fury.io/py/skinfer

.. image:: https://travis-ci.org/scrapinghub/skinfer.png?branch=master
:target: https://travis-ci.org/scrapinghub/skinfer

.. image:: https://pypip.in/d/skinfer/badge.png
:target: https://pypi.python.org/pypi/skinfer

Simple tool to infer and/or merge JSON schemas

Features

  • Generating schema in JSON Schema draft 4 format
  • Inferring schema from multiple samples
  • Merging schemas - nice for generating schema in Map-Reduce fashion
    or updating an old schema with new data

Example of using skinfer to generate a schema from a list of samples::

$ cat samples.jsonl
{"name": "Claudio", "age": 29}
{"name": "Roberto", "surname": "Gomez", "age": 72}
$ skinfer --jsonlines samples.jsonl
{
    "$schema": "http://json-schema.org/draft-04/schema",
    "required": [
        "age",
        "name"
    ],
    "type": "object",
    "properties": {
        "age": {
            "type": "number"
        },
        "surname": {
            "type": "string"
        },
        "name": {
            "type": "string"
        }
    }
}

Install with::

$ pip install skinfer

Or, if you don't have pip, you can still install it with::

$ easy_install skinfer

Main metrics

Overview
Name With Ownerscrapinghub/skinfer
Primary LanguagePython
Program languagePython (Language Count: 2)
Platform
License:BSD 3-Clause "New" or "Revised" License
所有者活动
Created At2014-12-17 22:45:44
Pushed At2024-04-24 09:06:25
Last Commit At2016-06-09 10:21:10
Release Count4
Last Release Name0.2.0 (Posted on )
First Release Name0.1.0 (Posted on 2015-03-03 22:19:24)
用户参与
Stargazers Count139
Watchers Count120
Fork Count20
Commits Count62
Has Issues Enabled
Issues Count6
Issue Open Count5
Pull Requests Count3
Pull Requests Open Count3
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private