Skip to main content

JSON-lines and recursive reading of json-files in a path.

Project description

TestStatus PyPiStatus BlackStyle BlackPackStyle MITLicenseBadge

numpy

Uses json_numpy for transparent loads and dumps of lists into numpy-arrayrs if the dtype is either purely int or float.

trees

Recursively read (or write) .json files in a tree of directories.

lines

JSON-lines or .jsonl is a powerful extension to the JSON-family.

import json_utils as ju

with ju.lines.open("my-items.jsonl.gz", mode="w|gz") as jl:
    for i in range(100):
        jl.write({"number": i})

with ju.lines.open("my-items.jsonl.gz", mode="r|gz") as jl:
    for obj in jl:
        print("item", obj["number"])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

json_utils_sebastian_achim_mueller-0.0.6.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file json_utils_sebastian_achim_mueller-0.0.6.tar.gz.

File metadata

File hashes

Hashes for json_utils_sebastian_achim_mueller-0.0.6.tar.gz
Algorithm Hash digest
SHA256 a73c7aa0466b81a73a453346d77cb01c0e2d29529a534266032216880989f089
MD5 09f6c3058a30b3520cfdfcc6c1d2b268
BLAKE2b-256 9b6f9b08af87b4e7c518ab85470ea2313619d9ca1cc1d824c7f3e1f094f71276

See more details on using hashes here.

File details

Details for the file json_utils_sebastian_achim_mueller-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for json_utils_sebastian_achim_mueller-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 43bf9fdf09fa509cd59f7e60b44aaf89ae03a479f28662275513a3748384e480
MD5 002908a9ec82b3ca164c61b52df309ba
BLAKE2b-256 57d99777d3694a2a9649ff8e48a933ec6d23a4a56161de10a56868266e4148c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page