("yoots"): common imports and utilities exposed for easy wildcard-importing + boilerplate-reduction
Project description
utz
("yoots"): common imports and utilities exposed for easy wildcard-importing + boilerplate-reduction
Install
pip install utz
Use
Import the whole kitchen sink:
from utz import *
See init.py, which imports many of the modules below, as well as a bevy of handy stdlib 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: context-manager helpers, including
ctxs
for composing multiple context managers - backoff: simple exponential-backoff utility
- git: git helpers / wrappers around GitPython
- pnds: common pandas imports and helpers
- collections: collection/list 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.3.12.tar.gz
(29.0 kB
view details)
Built Distribution
utz-0.3.12-py3-none-any.whl
(37.0 kB
view details)
File details
Details for the file utz-0.3.12.tar.gz
.
File metadata
- Download URL: utz-0.3.12.tar.gz
- Upload date:
- Size: 29.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04205219e11521e30a7c9240b79ed2cc11d60deb31aedce39981d86506708162 |
|
MD5 | bab98cfd16756660eaf9d8b8ea727103 |
|
BLAKE2b-256 | 0c61e4ebee4e8f323534132bdaf478f3f5b18afb13e41cb4221d70014e1377bf |
File details
Details for the file utz-0.3.12-py3-none-any.whl
.
File metadata
- Download URL: utz-0.3.12-py3-none-any.whl
- Upload date:
- Size: 37.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2cf05807c12ec3acada0087da3c086c0780fcf884c6955a539660017c0a2c5d |
|
MD5 | 68842556e5fbe4f7f02a451ae3f312ec |
|
BLAKE2b-256 | 5d1ac116a817d33f28864e421f8e913fa75ebd69469ac625b5b4806f90dcfb91 |