Skip to main content

Vanilla python utilities, for humans.

Project description

Yumako Yumako

Vanilla Python utilities for humans.

PyPI version Python Versions License: MIT Code style: black Ruff Checked with mypy Imports: isort Typed Downloads pre-commit security: bandit Sourcery pylint: errors-only

What Yumako Includes

  • Human-friendly utilities.
  • Utilities for generic use cases, not domain-specific.
  • High performance utilities.
  • Utilities based on vanilla Python with no external dependencies.

Installation

pip install yumako

# Yumako utilities are based on vanilla python: no other dependencies.

Usage

import yumako
# Yumako submodules are loaded only when needed

# ---------------------------------------
# Yumako utilities are highly performant
# ---------------------------------------
from yumako.lru import LRUDict, LRUSet
lru = LRUDict()
lru[1] = True
lru["hello"] = "mortal"
lru["ユマ果"] = "💖"
print(lru)

lru_set = LRUSet()
lru_set.add("ユマ果")
print(lru_set)


# ---------------------------------------
# Yumako utilities are handy
# ---------------------------------------
from yumako.state import state_file

context = state_file(".state")
context.k1 = "v1"   # Persisted to disk
print(context.k1)   # But also cached in RAM


# ---------------------------------------
# Yumako utilities are designed for humans
# ---------------------------------------
print(yumako.time.of("2025-01-17H23:00:00.000-05:00"))  # Popular standard time formats
print(yumako.time.of("-3d"))  # Popular intuitive human-friendly formats

seconds = yumako.time.duration("3m4s")  # "3m4s" -> 184 seconds
delta = timedelta(seconds=seconds)
print(yumako.time.display(delta))  # "3m4s"

More examples.

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

yumako-0.1.37.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yumako-0.1.37-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file yumako-0.1.37.tar.gz.

File metadata

  • Download URL: yumako-0.1.37.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.9.6 Darwin/24.6.0

File hashes

Hashes for yumako-0.1.37.tar.gz
Algorithm Hash digest
SHA256 419c560e222670e2a8db4141f975af8abb3130377af0b7cd64534e09beb17d37
MD5 a5fffd326535ba3a7d0c4691c99bc52a
BLAKE2b-256 44a6840d87b5e444c1c57e33804a62a1d2184eccd1a0dc7cfe9e2a78cdeb0ab2

See more details on using hashes here.

File details

Details for the file yumako-0.1.37-py3-none-any.whl.

File metadata

  • Download URL: yumako-0.1.37-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.9.6 Darwin/24.6.0

File hashes

Hashes for yumako-0.1.37-py3-none-any.whl
Algorithm Hash digest
SHA256 5568c13c02362f75523f1ef8bec363075369a569e3770f4f7299bc5fa59f8317
MD5 18af845f63c699514179f35fa34963a3
BLAKE2b-256 765a1a311ed0a244718ba7a48dff9b5509b79d593b6758666bf0d453a1b03ae2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page