("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 - 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
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.23.tar.gz
(34.2 kB
view details)
Built Distribution
utz-0.3.23-py3-none-any.whl
(43.2 kB
view details)
File details
Details for the file utz-0.3.23.tar.gz
.
File metadata
- Download URL: utz-0.3.23.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b23ac9fc7def996a27288a734af01a3574d9eac29f80774bad31f60a220934c5 |
|
MD5 | e800c0c2c13d46fa6b675853a8005259 |
|
BLAKE2b-256 | 948db46afa3be913a5d995b07bd739265368af6ac2c5cf880571b7b4f97941ad |
File details
Details for the file utz-0.3.23-py3-none-any.whl
.
File metadata
- Download URL: utz-0.3.23-py3-none-any.whl
- Upload date:
- Size: 43.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df6485586638b5f49885e897e80d8ffa57c34afc037404a779f9af67cc8aaccd |
|
MD5 | c42c662c05464f9e1cf9ed614f2291c6 |
|
BLAKE2b-256 | b6dd076acc3e327196c5db9335220360663541aa5ae4e956f54cc2a506862007 |