jskiner


Namejskiner JSON
Version 0.0.12 PyPI version JSON
download
home_page
Summary
upload_time2023-03-23 13:43:59
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # JSkiner 

The is a python **Js**on **Sch**ema **In**ference **E**ngine with **R**ust's core. Its inferencing speed is about 10 times of its pure-python counterpart ([jsonschema-inference](https://pypi.org/project/jsonschema-inference/)).

# Installation 

```bash
pip install jskiner
```

# Usage

## Checking the Json Schema of a Large .jsonl file

```bash
jskiner \
    --jsonl <path_to_jsonl> 
    --verbose <0/1> 
    --out <output_file_path>
    --nworkers <number_of_cpu_core>
```

## Infering the Schema in Python

```python
from jskiner import InferenceEngine
cpu_cnt = 16
engine = InferenceEngine(cpu_cnt)
json_string_list = ["1", "1.2", "null", "{\"a\": 1}"]
schema = engine.run(json_string_list)
schema
```
>> Union({Atomic(Float()), Atomic(Int()), Atomic(Non()), Record({"a": Atomic(Int())})})

## Calculate the Union of a List of Schema 

```python
from jskiner import InferenceEngine
from jskiner.schema import Atomic, Int, Non
cpu_cnt = 16
engine = InferenceEngine(cpu_cnt)
schema = engine.run([Atomic(Int()), Atomic(Non)])
schema
```
>> Optional(Atomic(Int()))

## Using | Operation between Two Schema

```python
from jskiner import Atomic, Int, Non
schema = Atomic(Int()) | Atomic(Non())
schema
```
>> Optional(Atomic(Int()))

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "jskiner",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "",
    "download_url": "",
    "platform": null,
    "description": "# JSkiner \n\nThe is a python **Js**on **Sch**ema **In**ference **E**ngine with **R**ust's core. Its inferencing speed is about 10 times of its pure-python counterpart ([jsonschema-inference](https://pypi.org/project/jsonschema-inference/)).\n\n# Installation \n\n```bash\npip install jskiner\n```\n\n# Usage\n\n## Checking the Json Schema of a Large .jsonl file\n\n```bash\njskiner \\\n    --jsonl <path_to_jsonl> \n    --verbose <0/1> \n    --out <output_file_path>\n    --nworkers <number_of_cpu_core>\n```\n\n## Infering the Schema in Python\n\n```python\nfrom jskiner import InferenceEngine\ncpu_cnt = 16\nengine = InferenceEngine(cpu_cnt)\njson_string_list = [\"1\", \"1.2\", \"null\", \"{\\\"a\\\": 1}\"]\nschema = engine.run(json_string_list)\nschema\n```\n>> Union({Atomic(Float()), Atomic(Int()), Atomic(Non()), Record({\"a\": Atomic(Int())})})\n\n## Calculate the Union of a List of Schema \n\n```python\nfrom jskiner import InferenceEngine\nfrom jskiner.schema import Atomic, Int, Non\ncpu_cnt = 16\nengine = InferenceEngine(cpu_cnt)\nschema = engine.run([Atomic(Int()), Atomic(Non)])\nschema\n```\n>> Optional(Atomic(Int()))\n\n## Using | Operation between Two Schema\n\n```python\nfrom jskiner import Atomic, Int, Non\nschema = Atomic(Int()) | Atomic(Non())\nschema\n```\n>> Optional(Atomic(Int()))\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "",
    "version": "0.0.12",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dd7db724a621afde43663edf3128a9c15e8ccbe2c11c887e358be2c6f3d37dcb",
                "md5": "6288cd96ffc0821977fd56056d4b42e4",
                "sha256": "ec971318be9d8e1332ecde9f80d6f6531f5cb2898ce0f7bacddc9cb32d07f259"
            },
            "downloads": -1,
            "filename": "jskiner-0.0.12-cp310-cp310-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "6288cd96ffc0821977fd56056d4b42e4",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.7",
            "size": 395627,
            "upload_time": "2023-03-23T13:43:59",
            "upload_time_iso_8601": "2023-03-23T13:43:59.544581Z",
            "url": "https://files.pythonhosted.org/packages/dd/7d/b724a621afde43663edf3128a9c15e8ccbe2c11c887e358be2c6f3d37dcb/jskiner-0.0.12-cp310-cp310-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aee4362c41defb8c799f9c6c1bb095efb66ea11a53e45aecf57c9ec739bd6e4e",
                "md5": "a043b7042290d312145c94a75cffa9e6",
                "sha256": "0dd43456771503aee4767de10a63c21c362732ac3125cd24de07a88d4b200592"
            },
            "downloads": -1,
            "filename": "jskiner-0.0.12-cp310-cp310-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "a043b7042290d312145c94a75cffa9e6",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.7",
            "size": 397969,
            "upload_time": "2023-03-23T13:44:02",
            "upload_time_iso_8601": "2023-03-23T13:44:02.113703Z",
            "url": "https://files.pythonhosted.org/packages/ae/e4/362c41defb8c799f9c6c1bb095efb66ea11a53e45aecf57c9ec739bd6e4e/jskiner-0.0.12-cp310-cp310-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b94daa1f82b21e021ac93b30d1d720bd8372592b10a40287e07cea615af5fb7f",
                "md5": "1c8946abd5ecde335964f0e4bd3c8d8f",
                "sha256": "73cbf07ba66a0e1326da934817d962a634baafbdbd04627eee79ee3514787489"
            },
            "downloads": -1,
            "filename": "jskiner-0.0.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "1c8946abd5ecde335964f0e4bd3c8d8f",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.7",
            "size": 2358188,
            "upload_time": "2023-03-23T13:44:04",
            "upload_time_iso_8601": "2023-03-23T13:44:04.221870Z",
            "url": "https://files.pythonhosted.org/packages/b9/4d/aa1f82b21e021ac93b30d1d720bd8372592b10a40287e07cea615af5fb7f/jskiner-0.0.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "649aaebd6d60e6a2f9dca5b2b0034dce03e7ab3c4efd53d343bb78db61675d79",
                "md5": "1fde801f0e952189be1e68ca4a042212",
                "sha256": "61555d0865051e4f775e4be1663c76ae1befb2946ddaf3d79ce52d7840477751"
            },
            "downloads": -1,
            "filename": "jskiner-0.0.12-cp37-cp37m-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "1fde801f0e952189be1e68ca4a042212",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.7",
            "size": 396327,
            "upload_time": "2023-03-23T13:44:06",
            "upload_time_iso_8601": "2023-03-23T13:44:06.203921Z",
            "url": "https://files.pythonhosted.org/packages/64/9a/aebd6d60e6a2f9dca5b2b0034dce03e7ab3c4efd53d343bb78db61675d79/jskiner-0.0.12-cp37-cp37m-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2d881f1ed53a6fd892f712864eebb1d086bf95d1e8de028fb88c2e3e10d9a0bd",
                "md5": "579887adc693b341005b140a1b02e84c",
                "sha256": "7edc288a0aa27e064acd39f0976289b7d96699dce04e5a804f7149680f5c8215"
            },
            "downloads": -1,
            "filename": "jskiner-0.0.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "579887adc693b341005b140a1b02e84c",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": ">=3.7",
            "size": 2358449,
            "upload_time": "2023-03-23T13:44:08",
            "upload_time_iso_8601": "2023-03-23T13:44:08.397129Z",
            "url": "https://files.pythonhosted.org/packages/2d/88/1f1ed53a6fd892f712864eebb1d086bf95d1e8de028fb88c2e3e10d9a0bd/jskiner-0.0.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "588e7bafe72fdcc96e1daaec59a21b3f4cc4ce8f81077acd8f694972dbbef90d",
                "md5": "a5d03d63d57fd057660f003b2aa42787",
                "sha256": "66675e7eca5ad99b603c4a97b6c15c23935ad72b0a319fe1b7d3ce231feb8918"
            },
            "downloads": -1,
            "filename": "jskiner-0.0.12-cp38-cp38-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "a5d03d63d57fd057660f003b2aa42787",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.7",
            "size": 396213,
            "upload_time": "2023-03-23T13:44:10",
            "upload_time_iso_8601": "2023-03-23T13:44:10.934992Z",
            "url": "https://files.pythonhosted.org/packages/58/8e/7bafe72fdcc96e1daaec59a21b3f4cc4ce8f81077acd8f694972dbbef90d/jskiner-0.0.12-cp38-cp38-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7172a3d77400f549e4ba702aecfa9633fee4176f362f85c5730052596ca8739",
                "md5": "ec8dd3d42806fe885f66da63ee55a755",
                "sha256": "bb7cd8130e26e86513d246469a55cd96f9cd947d900bbbf5fb20d353bfd0d606"
            },
            "downloads": -1,
            "filename": "jskiner-0.0.12-cp38-cp38-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "ec8dd3d42806fe885f66da63ee55a755",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.7",
            "size": 398154,
            "upload_time": "2023-03-23T13:44:12",
            "upload_time_iso_8601": "2023-03-23T13:44:12.769815Z",
            "url": "https://files.pythonhosted.org/packages/f7/17/2a3d77400f549e4ba702aecfa9633fee4176f362f85c5730052596ca8739/jskiner-0.0.12-cp38-cp38-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d011c07948624c2734b8e35e40dfd2d50a86dea1487be46d8e529f897a343d5f",
                "md5": "fee0389328e057844b2e305eed7e107e",
                "sha256": "b047af35158a174eac8f6265f86a74d07cab0f86c6b2d2356aba4357b22d521d"
            },
            "downloads": -1,
            "filename": "jskiner-0.0.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "fee0389328e057844b2e305eed7e107e",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.7",
            "size": 2358234,
            "upload_time": "2023-03-23T13:44:14",
            "upload_time_iso_8601": "2023-03-23T13:44:14.506720Z",
            "url": "https://files.pythonhosted.org/packages/d0/11/c07948624c2734b8e35e40dfd2d50a86dea1487be46d8e529f897a343d5f/jskiner-0.0.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "904b87b6aa8edf2ad1b8f0181a1d3615dfb02fe6c912e1a25a7b811c2dba39b4",
                "md5": "2f39af32928fe7be528e7a08671f632e",
                "sha256": "3135e726a1f5097b6cdca6f7493b25dac4e092ae691c3e4e2589fa1ddd259459"
            },
            "downloads": -1,
            "filename": "jskiner-0.0.12-cp39-cp39-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "2f39af32928fe7be528e7a08671f632e",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.7",
            "size": 398050,
            "upload_time": "2023-03-23T13:44:16",
            "upload_time_iso_8601": "2023-03-23T13:44:16.672636Z",
            "url": "https://files.pythonhosted.org/packages/90/4b/87b6aa8edf2ad1b8f0181a1d3615dfb02fe6c912e1a25a7b811c2dba39b4/jskiner-0.0.12-cp39-cp39-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7372bb7562e4e4a14cf20aad44a6805d59be8a6f06fa2a0d076dc224e15197d6",
                "md5": "71766d1a0e54620801f21b59d1e3e292",
                "sha256": "9beda58e682eef680f7662283240b26351e1658dc765c225d7ead632ee57895c"
            },
            "downloads": -1,
            "filename": "jskiner-0.0.12-cp39-cp39-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "71766d1a0e54620801f21b59d1e3e292",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.7",
            "size": 396782,
            "upload_time": "2023-03-23T13:44:18",
            "upload_time_iso_8601": "2023-03-23T13:44:18.079988Z",
            "url": "https://files.pythonhosted.org/packages/73/72/bb7562e4e4a14cf20aad44a6805d59be8a6f06fa2a0d076dc224e15197d6/jskiner-0.0.12-cp39-cp39-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8306ca5a281f18bf4b295dc158fb54821f5d0ae7086db75d2e8b38ca40f61149",
                "md5": "067fefeeb2e375da62517eacab693521",
                "sha256": "33a1ba9626eefe203e9d190ba43d312c4d59bbf619a5a3b3e92b61e37262589f"
            },
            "downloads": -1,
            "filename": "jskiner-0.0.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "067fefeeb2e375da62517eacab693521",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.7",
            "size": 2358363,
            "upload_time": "2023-03-23T13:44:19",
            "upload_time_iso_8601": "2023-03-23T13:44:19.936675Z",
            "url": "https://files.pythonhosted.org/packages/83/06/ca5a281f18bf4b295dc158fb54821f5d0ae7086db75d2e8b38ca40f61149/jskiner-0.0.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-23 13:43:59",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "jskiner"
}
        
Elapsed time: 0.13404s