A collection of basic python utilities.
Project description
bsutils: Basic Python Utilities
A collection of basic python utilities.
Installation
# With pip.
pip install bsutils
# Or pipx.
pipx install bsutils
# Or uv
uv pip install bsutils
Features
Json Utilities (bsutils.json)
get_item_num: Get the number of items in a JSON or JSONL file.iter_json_file: Iterate over a JSON or a JSONL file.load_json_file: Load a JSON or JSONL file.jsonl_to_json: Convert a JSONL file to a JSON file.json_to_jsonl: Convert a JSON file to a JSONL file.write_json_file: Write a JSON or JSONL file.
File Utilities (bsutils.file)
pure_file_name: Get the pure file name from a path, e.g., "document" for "/path/to/ducumnet.pdf".
Result (bsutils.result)
Use Result to get the result of a function rather than exceptions, similar to result.
Result: A class to get the result of a function and handle exceptions.Ok: Contain the return value when functions success.Err: Contain the error information when functions fail.
Option (bsutils.option)
Use Option to express variable which may not contain value rather than None and Any.
Option: A class to express variable which may not contain value.Some: A class to express variable which contains value.None: Python default None.
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
bsutils-0.0.2.post2.tar.gz
(7.4 kB
view details)
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 bsutils-0.0.2.post2.tar.gz.
File metadata
- Download URL: bsutils-0.0.2.post2.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d1ccf2a10783c7fb4d74f4c063068773f61278b6f1a6a6967006df0f1f40d89
|
|
| MD5 |
aaf90686b2fde834e055f1c512b56f51
|
|
| BLAKE2b-256 |
054f6f90ac0e40696aa7aed3d38b61f121920691e19c10a7810d8e9f7a761ff7
|
File details
Details for the file bsutils-0.0.2.post2-py3-none-any.whl.
File metadata
- Download URL: bsutils-0.0.2.post2-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6511d38b3ae904ed762be11c90e80b4feb443274d577de79866ad93bf1130bcd
|
|
| MD5 |
869ab4891504c5651b8a0076fba012d4
|
|
| BLAKE2b-256 |
6ace362a671c719eb7e263bb1db56da25ac23d40b92aa29b1f56eaca6f4d9d89
|