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

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

utz-0.3.28-py3-none-any.whl (51.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for utz-0.3.28.tar.gz
Algorithm Hash digest
SHA256 bf796748aa2845da45bf50276b49793fcd785dceb3ac3c1797c887455b7e8329
MD5 c3a8670c5e4181d09fb0663d87778d41
BLAKE2b-256 68b01019c1fbbd99f7bd0a9bac6d40c4c8b5d2c5397bb271315b2ac0502859ac

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for utz-0.3.28-py3-none-any.whl
Algorithm Hash digest
SHA256 7719679bc58ad9d3528b4bb85f2b006c088475ac7f7db0694e6384d93b7abed9
MD5 f2e04c839e2c4112598bf09e214e79d3
BLAKE2b-256 1c046d14a4acc2f21db7720c1f3db064ef52468775b1579f1302565d7b71bbd1

See more details on using hashes here.

Supported by

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