Introduction
Tinytools is a collection of small, high-level tools that fill gaps in Python tool sets. The tools are broken up into a set of modules
bunch : Contains an OrderedBunch object class with associated bunchify/unbunchify methods, similar to other bunch implementations but built off an OrderedDict with ipython table-complete overloaded to the data memebers.
files : High-level filter and search functions with configurable search depth, case sensitivity, and search types.
cmd_list : Thin wrapper around subprocess to simplify command line calls.
pvl : Function to read and write PVL files.
class_csv : Functions to move columns in csv files - a common need for moving class-attributed csv files between machine learning tools.
np_img : Numpy operations to flip images - i.e. converting a numpy image array from (4,200,200) to (200,200,4).
py_styles : Display of python style suggestions.
Installing
pip install tinytools
Import
import tinytools
or in a more convenient alias:
import tinytools as tt
Quick Start
import tinytools as tt
## Search function
found = tt.files.search('/path/to/search',['*.til','proj1*.til'],depth=5,
case_sensitive=False)
## OrderedBunch
from collections import OrderedDict
# Create an OrderedBunch from and return it to an OrderedDict
od = OrderedDict({'a':1,'b':2,'c':{'aa':1.23,'bb':'string'}})
ob = tt.bunch.ordered_bunchify(od)
ob.a # Explore the OrderdBunch with tab complete
ob['a'] # Equivalent to above
ob.c.bb # orderd_bunchify is recursive on nested Dict objects
ob['c']['bb'] # Equivalent to above
od2 = tt.bunch.ordered_unbunchify(ob)
## Interacting with PVL files
# Read full PVL file
imd = tt.pvl.read_from_pvl('/path/to/image.IMD')
type(imd) # returns collections.OrderedDict
imdob = tt.bunch.ordered_bunchify(img) # Create an ordered bunch to ease
# interactive exploration
imdob.IMAGE_1.satID # Tab complete through the IMD files
# Read an item from a PVL file
tt.pvl.read_from_pvl('/path/to/image.IMD','satId') # return same as above
tt.pvl.read_from_pvl('/path/to/image.IMD','ULLon') # return a list of all
# items matching key
Metadata
Release files for tinytools 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| tinytools-1.1.1.tar.gz | 24.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tinytools-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.2 kB
Release files / tinytools-1.1.1.tar.gz
| Download URL | tinytools-1.1.1.tar.gz |
|---|---|
| Size | 24.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c6fcbb7dca77d29ab44697ce0a19dcdc40b39801d06f85786424db5c87445a2
|
|
BLAKE2b-256 checksum How to use checksums |
ed2770172a7d6c94157d5b7be7f680a7f0118ac06665eebd99084c6942ecc2a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.16
|
Release files / tinytools-1.1.1-py3-none-any.whl
| Download URL | tinytools-1.1.1-py3-none-any.whl |
|---|---|
| Size | 26.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32ee2e6022ed934482fbbc27e7772ab0f12aca43d4534d498d7531c631487471
|
|
BLAKE2b-256 checksum How to use checksums |
1f1b26f99b024c884a4a49b805f832eb2ab9eaf7cebcbf0a298277eba79e66ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.16
|
Security for tinytools 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.