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

Uploaded Source

Built Distribution

utilki-0.9.3-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: utilki-0.9.3.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.18 Linux/6.2.0-1018-azure

File hashes

Hashes for utilki-0.9.3.tar.gz
Algorithm Hash digest
SHA256 0d7be6359faa8d52a50f0cc99f306b6f7d01a31349f978a5fd72e7406653fbf8
MD5 edcb7c7f11ecb50db415f94a2fd64ea9
BLAKE2b-256 0108c0a9aff6e8250f68a12da22a5acec76ef10dcba9045a232f0b0823f58a5b

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for utilki-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a6d4a685bb20ce88240bab0c41e7a21c01fe4f1fc13bbabfdf39a0935420305
MD5 2b170996183b4a77fb4bde5c0c7d464e
BLAKE2b-256 84c2293d72a077628a949f3f579f638a4dedd2e1d09986bc44cef92efcb23f15

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