No project description provided
Project description
JSkiner
The is a python Json Schema Inference Engine with Rust's core. Its inferencing speed is about 10 times of its pure-python counterpart (jsonschema-inference).
Installation
pip install jskiner
Usage
Checking the Json Schema of a Large .jsonl file
jskiner \
--in <path_to_jsonl>
--verbose <false/true>
--out <output_file_path>
--nworkers <number_of_cpu_core>
--split <number_of_split_batch_size>
--split-path <path_to_store_the_split_files>
Checking the Json Schema for a folder of json files
jskiner \
--in <path_to_jsons>
--verbose <false/true>
--out <output_file_path>
--nworkers <number_of_cpu_core>
--batch-size <batch_size_for_inferencing>
--cuckoo-path <path_to_store_the_cuckoo_filter>
--cuckoo-size <approximated_size_of_the_cuckoo_filter (Recommend using 10X of current json count)>
--cuckoo-fpr <false_positive_rate_of_the_cuckoo_filter>
Infering the Schema in 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
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
from jskiner import Atomic, Int, Non
schema = Atomic(Int()) | Atomic(Non())
schema
Optional(Atomic(Int()))
TODO:
- Enable inference from a folder of json files
- Enable ignoring of existing json files using cuckoo filter
- Enable add starting schema file
- Enable batch-by-batch process on large jsonl file
- FIX: make sure repr escape special characters.
- Auto Formatting Using Black
- Enable Regex to represent patterned FieldSet
- Using borrow to increase efficiency
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for jskiner-0.0.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cf4ce36d2aa762855a4bc97fc997522ca5b218bfdcf8925868cc836b0924651 |
|
MD5 | d6387b2f45f276ad525c1824f8c19da9 |
|
BLAKE2b-256 | 0511dc2b0c31f573e67d53381b11fec0479d222a05ea6a7b759afba5aca23178 |
Close
Hashes for jskiner-0.0.15-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd8b915ddd559966f11fa76f3605e44af2fd683d50b98d99318f1b744ab990a6 |
|
MD5 | 2c72440288c56cfbd3cc562a1beb15f2 |
|
BLAKE2b-256 | e914fe15c14b6e8fb90887caa9bd9478bb0c318b151bae246d12032c9d270553 |
Close
Hashes for jskiner-0.0.15-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62c596643c8b6a30225bab126ad9d75c9976e85d6a016e3d5c80c5cba3361ec4 |
|
MD5 | fb326978f23b4b6625c8c3adcdb44665 |
|
BLAKE2b-256 | 76e5bd6ccce1235cb114d71f29b7e090a76a2f241a296ea9093c85962965ffb3 |
Close
Hashes for jskiner-0.0.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 464ba651701afd1815558e46236ea77bb211c7d8812d938aae6b957ab9b91ca9 |
|
MD5 | ce16d94e52c672b5ed668cc3c3bd0381 |
|
BLAKE2b-256 | 22d679109cf9b46ff71c48cbda662a9d0137745c0d97a611ed9b974cfe4bbdf1 |
Close
Hashes for jskiner-0.0.15-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2832e764276e99e3b980c156e47f4aac767688026b75a9be28e99f31edb55db |
|
MD5 | 263c408729e48d17d2f0ad2f5151df29 |
|
BLAKE2b-256 | 2678a9ec4c39328cf1df898ce2d87e8a45bb453b210cca30657bb9e088f4d378 |
Close
Hashes for jskiner-0.0.15-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a2cf2b8c409e3503db6067c254b5339eeb76fafccae3f72881416c936ac5601 |
|
MD5 | 691af74e214eb9abbacb967af0738e81 |
|
BLAKE2b-256 | c4d78937da2bb34304cd022db3e42882a8cb9c79ffda208f1e004ead160a53b7 |
Close
Hashes for jskiner-0.0.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b644a3b6cc7379d33d12bafcf7f94f502311ffdab08e590d8f8968320ea0005 |
|
MD5 | 008b38a12c0d0f4d4960861ca6b8b052 |
|
BLAKE2b-256 | c80cf3bccb4f58989ffb077d3fedd49e7ea9ad709e61ebe8dcdfc54636303144 |
Close
Hashes for jskiner-0.0.15-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70fc08ccb8e12177016c7863035e6a921438bc8319dd55e05c3023d35e3b7762 |
|
MD5 | 45d8d25820987c3b557f9999fe952ffb |
|
BLAKE2b-256 | 6990a270a7d5cff50096538aadf8f3a7eddc12a67631bd10182ed23d93c54ea9 |
Close
Hashes for jskiner-0.0.15-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4afd84f1140fa9f90f50076fb443dc27dc08356caee444e9dc1a5493e0268874 |
|
MD5 | a0369e922e505da8f37f74f3485a03e2 |
|
BLAKE2b-256 | ac11def912715ed1fd45aeff3121b179d153ad51c815d0a069bfd7f7491e8548 |
Close
Hashes for jskiner-0.0.15-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e1015ed3cde95d7dc927ff8cfe97a8541ffd729f17e12322115157be972ca48 |
|
MD5 | a80ab9c0f6c37c692e0dedd65b837a98 |
|
BLAKE2b-256 | f45fff3c4de0ba17746be0563ff438ffe5a9ba6c5504e0683676eaf625cebb47 |
Close
Hashes for jskiner-0.0.15-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f966ba7c6dd907311a202200024fd9f8cf3ac148c36c0f131d0bac34a2a01e44 |
|
MD5 | 75f22c7f9c6666e5bf473dd6f8f84896 |
|
BLAKE2b-256 | 0ffa8d4e7b013a9883dbcce6bb75997756e736d4fd6a9a04109fd3d6a7265a2b |