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.18.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

utz-0.3.18-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: utz-0.3.18.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for utz-0.3.18.tar.gz
Algorithm Hash digest
SHA256 2406a4b7b17a8e79262c43484c5d60ffabee8c0fb7565f4004a58c000e681757
MD5 25a194a2d492e7e052142460c36d6ffe
BLAKE2b-256 fd3197ba33d75a78c7cffd7983a163e552b86a0d32ee7a62bae64c7310f3c3a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: utz-0.3.18-py3-none-any.whl
  • Upload date:
  • Size: 38.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.10

File hashes

Hashes for utz-0.3.18-py3-none-any.whl
Algorithm Hash digest
SHA256 3d154e2743941eb861c20b6056e172f09443c9483ce1494f75db86e0365ab260
MD5 4c560292ea31d3dff596e5e81fd1cd67
BLAKE2b-256 ec73ed89a43b6cabdb7eb45976cfd4cab45d2be427bfb5e68788d7c3901cd5b2

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