("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.26.tar.gz
(36.1 kB
view details)
Built Distribution
utz-0.3.26-py3-none-any.whl
(45.6 kB
view details)
File details
Details for the file utz-0.3.26.tar.gz
.
File metadata
- Download URL: utz-0.3.26.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bed5d01b7241328991e9001b6fde6d1f97fb67ae395ae4cd8a020bb88ae81c0 |
|
MD5 | d2599075b29b8209884cb0a28cb9116a |
|
BLAKE2b-256 | 51163c90db9481d9adffdb9c9655760dc7ce16e1ad82a4d2e24e828336e8cca7 |
File details
Details for the file utz-0.3.26-py3-none-any.whl
.
File metadata
- Download URL: utz-0.3.26-py3-none-any.whl
- Upload date:
- Size: 45.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4904bafb08de497c721a2b8b82134c2a9e4f3f96cd1e7a3ae4ba61bdb8a87bda |
|
MD5 | f2f9c0e6ddd3db3cff34aeca60f87627 |
|
BLAKE2b-256 | 99c6b995a28eb058fc52e1f79f17099c26e6fbc88fafde839121050da5302b66 |