toolboks utility library
Project description
toolboks
toolboks is a lightweight utility library.
Installation
Install with pip:
pip install toolboks
Usage
Most functions are available by simply importing toolboks directly:
> import toolboks as tb
> nested_list = [1,2,3,[4,5,[6,7,8]]]
> tb.expand(nested_list, depth=1)
[1, 2, 3, 4, 5, [6, 7, 8]]
Modules can also be imported separately:
from toolboks import xdg
# get user base dirs according to the XDG base directory specification
base_dirs = xdg.base_dirs()
Module Overview
| Module | Description | Classes | Functions |
|---|---|---|---|
| config | Configuration file functions | read_config | |
| listlib | List manipulation & helpers | expand, flatten | |
| modifiers | Common data modifiers | filter_abs_path | |
| system | Common system related functions | context, getenv | |
| xdg | Functions for XDG base dirs | base_dirs, cache_home, config_dirs, config_home, data_dirs, data_home, runtime_dir, state_home, user_dirs, user_home |
Command Line Interface
toolboks has a command line interface with shell commands for relevant functions from the toolboks library.
It is available as a separate package: toolboks-cli
Install it with pip:
pip install toolboks-cli
See documentation of toolboks-cli for more information on available commands.
License
GPL-3.0-only
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 toolboks-0.0.2.tar.gz.
File metadata
- Download URL: toolboks-0.0.2.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
882cba6a353ed45040a07c1a891b3040eb75748c5c28d904d1bed3681c5e91d1
|
|
| MD5 |
c708a059ed7d7055a5dc9bf8796338d2
|
|
| BLAKE2b-256 |
afc493895b6c55ad6a40cc1125d327f32d2e1905a9e77a0722ecdde4da5c7727
|
File details
Details for the file toolboks-0.0.2-py3-none-any.whl.
File metadata
- Download URL: toolboks-0.0.2-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ff6079da8c60117517dddee4319142d39cf7e0140cff0f1b7d8bf8243126a7c
|
|
| MD5 |
4103daa83c5ad2a82d03695fd5c8d2f7
|
|
| BLAKE2b-256 |
ccfb0d28f2ba1e6c6062cd5bcc579333f6135374713bd7443107611ff4e7f941
|