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

Uploaded Source

Built Distribution

utilki-0.7.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: utilki-0.7.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.8.18 Linux/6.2.0-1015-azure

File hashes

Hashes for utilki-0.7.1.tar.gz
Algorithm Hash digest
SHA256 77718a7379b480418b657ccd954ad084bb2c23fe58f77f01df3548a4c02a61cc
MD5 54b0f8f6fea62e1f4c1264e6cba713b4
BLAKE2b-256 75426b91da4dda1a39248a46d16bf7c6076a09ac781f72807de81acc28aca201

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: utilki-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.0 CPython/3.8.18 Linux/6.2.0-1015-azure

File hashes

Hashes for utilki-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0772c694d44bef4b178c2db2e3f8164e44b0cfa15d47f8667225d13e6e4f3d1d
MD5 a9575669b0170b6e2c0dfe1c9dd47058
BLAKE2b-256 09be27abc0e3fd654ca00b251694bda255cac69faa0011e09af60f5b0a82d40d

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