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

Uploaded Source

Built Distribution

utilki-0.6.4-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: utilki-0.6.4.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1041-azure

File hashes

Hashes for utilki-0.6.4.tar.gz
Algorithm Hash digest
SHA256 eb205d2dee7510e6b0c929151a4e77cc62ff9dd8c6a3e0a12a3c5f0c18909b3e
MD5 092ef0c686a1dadc123ea49f95d038d1
BLAKE2b-256 c0fc4c00196ab285a9c99d71ae47fc4073d82c110e59cc634d169694df03fd2f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: utilki-0.6.4-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1041-azure

File hashes

Hashes for utilki-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 44d11346adf5a9936f3d6f4fb03916b60332c7456257139461751d45b3f91047
MD5 a6da124268bafa64b7b6c2c7d612cab9
BLAKE2b-256 d4010a4ef09b1c828f2fd93b45818a74dac842c57797d79bb2dd02c1191b934b

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