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.1.tar.gz (24.3 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.1-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pote-0.1.1.tar.gz
  • Upload date:
  • Size: 24.3 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.1.tar.gz
Algorithm Hash digest
SHA256 c0b08f5f6e21105323ba4615bc1ead7a9608b819c2f5b7c43113afa182cc95bc
MD5 832c8034f8ed376faaa09100b6896cfa
BLAKE2b-256 d53201f6b5c267dbda2ddd11593c54a495ed195ccbb3bedb4c6804632ec6707e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pote-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 24.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4db6eec5bdfa1797b38599992b573d3527c8543527f8c083b56bed5ffbf7596
MD5 0937e6d02a893d2b367033c10a549f2c
BLAKE2b-256 104c7f35a136b68407577cfad1872befd46452f6c2e60b743e2a152473808339

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