Skip to main content

PyTomUtil

A collection of helpful utilties in Python.

Similar to the tecoradors-elunico package I have but that is just for useful decorators. This is any useful utility: function or class or other

PyPI

https://pypi.org/project/pytomutil-elunico/

Content

frange class works like range but allows floating point values. Requires start, stop, and step to always be specified

class frange:
    def __init__(self, start: float, stop: float, step: float) -> None:
        ...

    def __iter__(self):
        ...

    def __next__(self):
        ...

lerp is a function for linearly interpolating between two values according to a percentage between 0.0 and 1.0.

Linear Interpolation in Wikipedia

def lerp(a: float, b: float, t: float) -> float:
    return (1 - t) * a + t * b

SRGBColor is a class for managing colors in SRGB color space. Works with linear interpolation between colors and luminance values. The class accepts r, g, b and optionally an alpha channel in the range 0.0 to 1.0.

class SRGBColor:
    def __init__(self, r: float, g: float, b: float, a: float = 1.0):
        ...

    def lerp(self, other: "SRGBColor", percent: float) -> "SRGBColor":
        ...

    @property
    def luminance(self) -> float:
        """Given an sRGB color as 3 RGB values between 0 and 1, return their relative luminance"""
        ...

Metadata

Release files for pytomutil-elunico 0.0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytomutil-elunico 0.0.13
File Size Uploaded Provenance Actions
pytomutil_elunico-0.0.13.tar.gz 11.1 kB Without provenance Details for pytomutil_elunico-0.0.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytomutil-elunico 0.0.13
File Interpreter ABI Platform Actions
pytomutil_elunico-0.0.13-py3-none-any.whl Python 3 none any Details for pytomutil_elunico-0.0.13-py3-none-any.whl

Total release size: 23.4 kB

Release files / pytomutil_elunico-0.0.13.tar.gz

Download URL pytomutil_elunico-0.0.13.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
254ae661423a5d571aeda2015edc34cf4e0e2f2c125acf05b3999de0c41af5ed
BLAKE2b-256 checksum
How to use checksums
e941563368a5d32231d0d644c760a232d6e40b45e816256b906c4efced4e1c76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release files / pytomutil_elunico-0.0.13-py3-none-any.whl

Download URL pytomutil_elunico-0.0.13-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb7158b6c8ccfa1e482fa67716bddc761ef6f32e7273c9a800253c243a4ccc20
BLAKE2b-256 checksum
How to use checksums
8fc649db71b7fd81ea3111a3b65af03edea833f0cdbe93b8ba7652dec5b7d4c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Security for pytomutil-elunico 0.0.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page