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

Uploaded Source

Built Distribution

utilki-0.1.7-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: utilki-0.1.7.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.10 Darwin/22.4.0

File hashes

Hashes for utilki-0.1.7.tar.gz
Algorithm Hash digest
SHA256 93dd1cc7ec158404830e52647bcce017400aaea36a202b907f963bc6ddee34ac
MD5 0910481a7e5bf23f9d2b7f74c903756d
BLAKE2b-256 e98acfdcb8116dded2eca038e37744256a839ee4eda1786c59433c5b30a595db

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: utilki-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.10 Darwin/22.4.0

File hashes

Hashes for utilki-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 56d424dd0767dd9e895b6862282d2a39e21f5bd3b4b8b16b17f4c0393c971a87
MD5 677950bfeaa967c0e7ada9c92b108e15
BLAKE2b-256 64d53fef5830a6d8ca0e58f30d39bf7d3b23602f6e29758934ff6d209dd66347

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