Skip to main content

*("oots")*: imports and utilities for easy wildcard-importing + boilerplate-reduction

Project description

utz

("oots"): imports and utilities for easy wildcard-importing + boilerplate-reduction

Install

pip install utz

Use

Import everything:

from utz import *

See __init__.py, which imports many of the modules below, as well as a many standard-library 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: contextmanager 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
  • plots: plotly 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

This version

0.5.0

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

Uploaded Source

Built Distribution

utz-0.5.0-py3-none-any.whl (47.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: utz-0.5.0.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for utz-0.5.0.tar.gz
Algorithm Hash digest
SHA256 0bd5f5b83513007e95dcebb02b6d061d77ae6ad331692f135553fd52b2b02036
MD5 1f714834da1c565d2ae14953a8a4fca2
BLAKE2b-256 26f7541dacae3c92b1cde9f27fdf2834293e43305dd506083985068cefd67ed2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: utz-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 47.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for utz-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e1eadcb74a61686c03e7fb90d7c44d50ba20b5661cf8735d892ae14a3b1df452
MD5 7bfcba082e7b973c3ac936bfdb8efaf9
BLAKE2b-256 c3773c5d6bba87243e5aedfaebaefa4b3c657ce5039e8eea01f1bc2fddcc3aab

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