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/O –
load_json,dump_json,load_jsonl,dump_jsonl,load_pkl,dump_pkl - Text & CSV –
load_txt,csv2json - XML parsing –
parse_xml,parse_xml_all - Regex helpers –
re_search,find_all - Dict / list utilities –
sort_dict,get_dist,pd2list,pd2dict - File system helpers –
mkdir_p,list_files,root2files - Date & time –
get_date,get_cur_time,get_current_time_str - Math –
cosine_sim
License
MIT
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0c15d60d8acc086ff923a7df13ccd130fc2185cb1ac318e9b0b8ea6ff923a5d
|
|
| MD5 |
4dbc981a8942347026bc420046baf7b1
|
|
| BLAKE2b-256 |
64c6ba472bdedf8c8884f64fa3633b4f3d088bcdd24ca94c485a5bb1783e6f1d
|
File details
Details for the file gaojie_niceutils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gaojie_niceutils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69f3406c00c074968890b0b2980364f4ab6094bec5abb662c0cc176ce2f45f5d
|
|
| MD5 |
50f703327b490200cc89c7845a095d5d
|
|
| BLAKE2b-256 |
2d6302f0d8c4ae60170cd26a93265a290519636929788a8c87c9ff9d9f9d5b73
|