Skip to main content

Python helpers, utils or code not worthy ot its own repo

Project description

pote

pip install pote

A collection of battle-tested (well, by me in my projects) Python utilities extracted from real projects. These are practical helpers that solve common problems across data manipulation, callbacks, configuration, display, and widgets.

What is pote?

pote provides utilities that don’t justify their own library but are too useful to keep copying between projects. Each module is focused, well-tested, and designed for immediate use.

Modules

Core Utilities

Advanced Features

  • callback - Callback system for augmenting objects with side-effects, plus CollBack for tracking iteration with callbacks
  • config - Simple namespace for configuration with context manager for temporary changes
  • display - Jupyter display enhancements: Rich integration, collapsible JSON rendering, CSS generation
  • widgets - ipywidgets utilities: widget cleanup, async support, blocking input helpers (requires pip install pote[widgets])
  • logger_loguru - Loguru configuration helpers for structured logging with hierarchical indentation (requires pip install pote[logging])

Quick Start

from pote.basic import val_at, AD, shorten
from pote.callback import CollBack

# Access nested data with dot notation
data = {'user': {'name': 'Alice', 'scores': [10, 20, 30]}}
val_at(data, 'user.scores.1')  # 20

# Dict with attribute access
config = AD(debug=True, timeout=30)
config.debug  # True

# Track iteration with callbacks
for item in CollBack(range(100)):
    process(item)
    # Progress tracked automatically

Installation

pip install pote

Development

These utilities are developed with notebooks using nbdev. Browse the notebooks to see implementation and examples.

Philosophy

  • Copy-friendly: See something useful? Copy it with my blessing
  • Battle-tested: Extracted from production projects
  • Documented through tests: Examples serve as both tests and documentation

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

pote-0.1.0.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

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

pote-0.1.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file pote-0.1.0.tar.gz.

File metadata

  • Download URL: pote-0.1.0.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for pote-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea7a5d625ea7d3754464d73dcc90cc47d382c025a0eec3bb026bb42ac5a8a37e
MD5 5184e3240b7e473451445b561773033d
BLAKE2b-256 38c64f5cc2f299b7e0898b92cbfe3eaf7e6dcda37cb44958d890c45215e3a18e

See more details on using hashes here.

File details

Details for the file pote-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pote-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for pote-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a28ec09178051cd49648dcd297604b064aa9f48ca3dc06deef8a535d401d2f1
MD5 d900e9d7580316e648de8279da767bbf
BLAKE2b-256 15fe32a899c784ec11b122e3f50028798b17bd92e65ddd88389b86d05aa7d4f8

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