Metadata-Version: 2.4
Name: kvcommon
Version: 0.4.9
Summary: Library of miscellaneous common python utils that aren't worthy of their own dedicated libs.
License: MIT
License-File: LICENSE
Author: Rob Voigt
Author-email: code@ravoigt.com
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Provides-Extra: k8s
Provides-Extra: prometheus
Requires-Dist: kubernetes (>=31.0.0,<32.0.0) ; extra == "k8s"
Requires-Dist: prometheus-client (>=0.20.0,<0.21.0) ; extra == "prometheus"
Requires-Dist: toml (>=0.10.2,<0.11.0)
Project-URL: Homepage, https://github.com/RAVoigt/kvcommon
Project-URL: Repository, https://github.com/RAVoigt/kvcommon
Description-Content-Type: text/markdown

# KvCommon Python Utils

Library of miscellaneous common python utils that aren't worthy of their own dedicated libraries yet. Some of these packages will be moved out to their own libs later.

This library isn't likely to be useful to anyone else; it's just a convenience to save me from copy/pasting between various projects I work on.

# PyPi
https://pypi.org/project/kvcommon/

# Installation
### With Poetry:
`poetry add kvcommon`

### With pip:
`pip install kvcommon`

## Packages/Modules

| Package | Description | Example Usage |
|---|---|---|
|`asynchronous`|Various utils for easing use of asyncio stuff + a coroutine/thread-based async job scheduler|#TODO|
|`datastore`|An abstraction for a simple dictionary-based key-value datastore with support for schema versions and files as 'backends' (TOML, YAML, etc.)|#TODO|
|`k8s`|Utils to reduce boilerplate when working with Kubernetes and GKE in Python|`from kvcommon.k8s import K8sAppsClient; K8sAppsClient().rollout_restart_deployment("some_namespace", "some_name")`|
|`logger`|Boilerplate wrapper to get logger with formatting|`from kvcommon import logger as LOG; LOG.get_logger("logger_name")`|
|`misc`|Obligatory 'misc'
|`types`|Utils for either converting types or type-hinting|`from kvcommon import types; types.to_bool("false")`|
|`urls`|Convenience wrappers for URL parsing|`from kvcommon import urls; urls.urlparse_ignore_scheme("github.com")`|

