Skip to main content

A collection of handy Python utility functions for file I/O, data processing, and more.

Project description

gaojie-niceutils

A collection of handy Python utility functions for file I/O, data processing, and more.

Installation

pip install gaojie-niceutils

Quick Start

from niceutils import load_json, dump_json, load_jsonl, dump_jsonl

# JSON
data = load_json("data.json")
dump_json(data, "output.json")

# JSONL
rows = load_jsonl("data.jsonl")
dump_jsonl(rows, "output.jsonl")

Features

  • JSON / JSONL / Pickle I/Oload_json, dump_json, load_jsonl, dump_jsonl, load_pkl, dump_pkl
  • Text & CSVload_txt, csv2json
  • XML parsingparse_xml, parse_xml_all
  • Regex helpersre_search, find_all
  • Dict / list utilitiessort_dict, get_dist, pd2list, pd2dict
  • File system helpersmkdir_p, list_files, root2files
  • Date & timeget_date, get_cur_time, get_current_time_str
  • Mathcosine_sim

License

MIT

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

gaojie_niceutils-0.1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

gaojie_niceutils-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file gaojie_niceutils-0.1.0.tar.gz.

File metadata

  • Download URL: gaojie_niceutils-0.1.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for gaojie_niceutils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b0c15d60d8acc086ff923a7df13ccd130fc2185cb1ac318e9b0b8ea6ff923a5d
MD5 4dbc981a8942347026bc420046baf7b1
BLAKE2b-256 64c6ba472bdedf8c8884f64fa3633b4f3d088bcdd24ca94c485a5bb1783e6f1d

See more details on using hashes here.

File details

Details for the file gaojie_niceutils-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gaojie_niceutils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69f3406c00c074968890b0b2980364f4ab6094bec5abb662c0cc176ce2f45f5d
MD5 50f703327b490200cc89c7845a095d5d
BLAKE2b-256 2d6302f0d8c4ae60170cd26a93265a290519636929788a8c87c9ff9d9f9d5b73

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