Skip to main content

A collection of useful utilities

Project description

utilki

codecov

utils that are frequently used by me and might be useful for others

installation

pip install utilki

TaskMixin

Mixin class that adds create() classmethod to dataclass you define as your task params. Useful when you have a lot of container based tasks executed on remote clusters (e.g. Kubernetes, Hashicorp Nomad, etc.). It reads task params from environment variables, parses, and validates them.

from utilki import TaskMixin

@dataclass
class Task(TaskMixin):
    ayy: float = 69.69
    lmao: str = "420"

os.environ["ayy"] = "42.42"
os.environ["lmao"] = "69"

t = Task.create()
print(f"ayy: {t.ayy}, type: {type(t.ayy)}")
# ayy: 42.42, type: <class 'float'>
print(f"lmao: {t.lmao}, type: {type(t.lmao)}")
# lmao: 69, type: <class 'str'>

Cli

Venv

$ utilki venv 3.8.10
$ Enter venv name: new_venv
$ Created venv `new_venv` with Python version 3.8.10

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

utilki-0.12.6.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

utilki-0.12.6-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file utilki-0.12.6.tar.gz.

File metadata

  • Download URL: utilki-0.12.6.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.12.2 Linux/6.5.0-1015-azure

File hashes

Hashes for utilki-0.12.6.tar.gz
Algorithm Hash digest
SHA256 67cd83e035682ca833343cd666a3f2aad761f1c4136db262eea284ea57839c6e
MD5 3c8b47dc3fae4db9bbc8e7b1628d22bb
BLAKE2b-256 55cd0d57c81dc970a892161d9c4d2d17ab2bb000079c980bab5eaac7d6749932

See more details on using hashes here.

Provenance

File details

Details for the file utilki-0.12.6-py3-none-any.whl.

File metadata

  • Download URL: utilki-0.12.6-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.12.2 Linux/6.5.0-1015-azure

File hashes

Hashes for utilki-0.12.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ab9a3ae6d573e6380cfd5ca4bcd16efdecb41d47d93d78b2b38eca6409e38752
MD5 f13f244a3338c95563fe4a51d656b175
BLAKE2b-256 f8ba5e12a9aa2633e90c9cd1c9738e0dcd3884c8669fcad9fd22420885ee55b5

See more details on using hashes here.

Provenance

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