myBasis: A Python Toolkit#
myBasis is a library built to provide a variety of useful doodads for high-level Python development of all kinds, with a special eye towards ergonomics, Unix-style composability, and thorough documentation & testing.
It’s aimed at Python developers of all kinds, but it’s especially worth a perusal if you’re…
…iteratively modifying text files, e.g. while setting up a RAG corpus, converting files between formats, or cleaning up a dataset.
…convinced Python has accidentally become the best functional language ever released, and thus always on the lookout for ways to write more readable, concise functional code.
…building AI agents where “vibe” typing can save you thousands of tokens per slightly-mistaken tool call.
…looking for a clean, easily-extensible way to interact with Google Sheets.
…interested in generic caching mechanisms in order to satisfy the guilty pleasure of premature optimization.
…looking for some code snippets to lift out of this repo directly, saving you an import!
The package is organized into seven subpackages, which are (in rough order from most- to least-general):
- 1. My Utilities
- 2. Type Casting
- 3. Useful Types
Buffer: A Performant, Mutable Text BufferCommand: A Normalized, Programatically-defined Shell CommandMyEnum: AbstractBaseClass for Flexible EnumerationsPlatform: An Enumeration of Supported Operating SystemsPredicate: A General, Highly-serializable Data StructureSpan: An Ergonomic Wrapper fortuple[int, int]UniqueId: A Minimal Wrapper arounduuid4
- 4. Regex Stores
- 5. Local Caches
- 6. API Wrappers
- 7. File Formats