Docs: dynamic-graphics-inc.github.io/dgpy-libs
Repo: github.com/dynamic-graphics-inc/dgpy-libs
Dynamic Graphics python libraries, home of:
- Callable modules/packages
- Recursive list/generator comprehensions
- Many decorators
- Secret agent JSON-Bourne
libs
├── aiopen - async file-io
├── asyncify - async/await utilities
├── dgpylibs - dgpy-libs mega package
├── dgpytest - pytest plugin (WIP)
├── fmts - string formatting tools
├── funkify - callable modules
├── h5 - hdf5 tools
├── jsonbourne - JSON tools/wrappers
├── lager - logging library built on loguru
├── listless - generator tools
├── requires - dynamic import(s)
├── shellfish - shell and filesystem tools
└── xtyping - types
Install:
# pip
pip install aiopen asyncify fmts funkify h5 jsonbourne lager listless requires shellfish xtyping
# uv
uv add aiopen asyncify fmts funkify h5 jsonbourne lager listless requires shellfish xtyping
Package | Install | Version | Python Versions |
---|---|---|---|
aiopen | pip install aiopen |
||
asyncify | pip install asyncify |
||
fmts | pip install fmts |
||
funkify | pip install funkify |
||
h5 | pip install h5 |
||
jsonbourne | pip install jsonbourne |
||
lager | pip install lager |
||
listless | pip install listless |
||
requires | pip install requires |
||
shellfish | pip install shellfish |
||
xtyping | pip install xtyping |
This repo (dgpy-libs) are the polished gems formed under intense geological pressure below the offices of Dynamic Graphics Inc. These python libraries are all published on pip under the listed names.
- dgpy-libs must have excellent names and be published on pip
- Embrace
async/await
- Python 3.9+ 'n up, baby!
- Use type annotations everywhere
- No dead or commented out code
- Use optional compiled-3rd-party-libs as optional dependencies to sneakily speed things up if present
- Optional dependencies are good! Missing optional deps should trigger an error msg that is helpful to installing the relevant dependency ONLY IF THE DEPENDENCY IS NEEDED.
- Test coverage is usually a dumb metric and 100% test coverage
!=
bug-free code (tests of dgpy-libs are slowly being migrated from internal/private repos to this repo)
- uv: the greatest thing since sliced bread
- ruff: python linter and formatter
- pydantic: no need for explanation
- loguru: very nice python logging library
- httpx: http client library
- attrs; class decorators library
- orjson; fastest python json library (optional dep of jsonbourne)
- rapidjson/python-rapidjson; best mostly drop-in replacement for python's json module
- h5py; base of h5
- rich; best python console formatting library
- nox; truly a work of art
notebooks/
├── cache_money.ipynb
├── filter_none.ipynb
├── json_parsing.ipynb
└── string_fmt.ipynb
- Filtering None and False-y values
- cache money!
functools.lru_cache
- String formatting funks
- JSON parsing vs plain-jane dictionaries
-
Jesse Rubin ~
jesse@dgi.com
/jessekrubin@gmail.com
-
Dan Costello ~
dan@dgi.com
/dan.costello2@gmail.com
- Possibly you!?
Plz do! Send me that PR!
All dgpy-libs are MIT licensed
dgpy-libs
The MIT License (MIT)
Copyright (c) 2019-2025 Dynamic Graphics Inc (dgi)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.