*("oots")*: imports and utilities for easy wildcard-importing + boilerplate-reduction
Project description
utz
("oots"): imports and utilities for easy wildcard-importing + boilerplate-reduction
Install
pip install utz
Use
Import everything:
from utz import *
See __init__.py
, which imports many of the modules below, as well as a many standard-library methods and objects.
Features
Some noteworthy modules:
- cd: "change directory" contextmanager
- o:
dict
wrapper exposing keys as attrs (e.g.:o({'a':1}).a == 1
) - process: subprocess wrappers for more easily shelling out to commands and parsing their stdout
- docker: DSL for programmatically creating Dockerfiles (and building images from them)
- ssh: SSH tunnel wrapped in a context manager
- time:
now()
/today()
helpers with convenient / no-nonsense ISO string serialization and UTC bias - bases:
int
⟺str
codecs with improvements over standard base64 et al. - tmpdir: make temporary directories with a specific basename
- context: contextmanager helpers, including
ctxs
for composing multiple context managers - escape: escaping split/join helpers
- backoff: simple exponential-backoff utility
- git: git helpers / wrappers around GitPython
- pnds: common pandas imports and helpers
- collections: collection/list helpers
- plots: plotly helpers
auto-setup.py
utz/setup.py
provides defaults for various setuptools.setup()
params:
name
: use parent directory nameversion
: parse from git tag (otherwise fromgit describe --tags
)author_{name,email}
: infer from last commitlong_description
: parseREADME.md
(and set `long_description_content_type)description
: parse first<p>
under opening<h1>
fromREADME.md
license
: parse fromLICENSE
file (MIT and Apache v2 supported)
For an example, see gsmo==0.0.1
(and corresponding release).
It can be installed via a pip extra:
pip install utz[setup]
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
utz-0.6.0.tar.gz
(36.9 kB
view details)
Built Distribution
utz-0.6.0-py3-none-any.whl
(47.7 kB
view details)
File details
Details for the file utz-0.6.0.tar.gz
.
File metadata
- Download URL: utz-0.6.0.tar.gz
- Upload date:
- Size: 36.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a3f2e2a1255c2633302479632cc3b61ef900f8cb49a382e81963b6d1ffcef63 |
|
MD5 | 3aa09a860bf5eccf97b17fe841dab5bf |
|
BLAKE2b-256 | 15afb97f636e87436b8f54de5b67dfeda224cd8f2c4c08fd569cb618d159c05d |
File details
Details for the file utz-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: utz-0.6.0-py3-none-any.whl
- Upload date:
- Size: 47.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7210a1a72f1648ff91e16e05c18875fb8b2f8341cc63fdf162fa576e0b4ad0b7 |
|
MD5 | 69266e3eb202a7d69dd71c407ecec542 |
|
BLAKE2b-256 | 3faf0f25b4c08e868759462ca1d6bf40f8fd8d7cc66288d33475612a8d59b33e |