Skip to main content

("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: intstr 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 name
  • version: parse from git tag (otherwise from git describe --tags)
  • author_{name,email}: infer from last commit
  • long_description: parse README.md (and set `long_description_content_type)
  • description: parse first <p> under opening <h1> from README.md
  • license: parse from LICENSE 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.20.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

utz-0.3.20-py3-none-any.whl (39.3 kB view details)

Uploaded Python 3

File details

Details for the file utz-0.3.20.tar.gz.

File metadata

  • Download URL: utz-0.3.20.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for utz-0.3.20.tar.gz
Algorithm Hash digest
SHA256 9e910a088cdfcf958211d7f5e0998f592b96a32b14a264a45c6e7086ea94cb73
MD5 d999c55e96d7afcad9d7e6679fa2cdb3
BLAKE2b-256 5cdf06066c0774c4bb5bd45e3f3e88b0fd3b25a56bf388c5fdd327087dbad22c

See more details on using hashes here.

File details

Details for the file utz-0.3.20-py3-none-any.whl.

File metadata

  • Download URL: utz-0.3.20-py3-none-any.whl
  • Upload date:
  • Size: 39.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for utz-0.3.20-py3-none-any.whl
Algorithm Hash digest
SHA256 d0d09ed5885a82cb5c2be2b7f4c0e3ea46ab8a2ebea5fa071996e5b64f49f1b3
MD5 a8d937bf1a3202c0068a628e890abf3a
BLAKE2b-256 f4d27c35efae9e6c025285f46762a919a7192cbd5af8edf2ad24d3518271aae9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page