Skip to content

drawing

dgpy-libs⚓︎

Ruff

Docs: dynamic-graphics-inc.github.io/dgpy-libs

Repo: github.com/dynamic-graphics-inc/dgpy-libs


Dynamic Graphics python libraries, home of:

  • Callable modules and packages
  • Recursive list/gen comprehensions
  • Nutty decorators
  • Secret agent JSON Bourne
  • The best package names around
  • Notebooks with funky python
  • Dynamic imports

Libs⚓︎

libs
├── aiopen
├── asyncify
├── dgpylibs
├── dgpytest
├── fmts
├── funkify
├── h5
├── jsonbourne
├── lager
├── listless
├── requires
├── shellfish
└── xtyping

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 PyPI PyPI - Python Version
asyncify pip install asyncify PyPI PyPI - Python Version
fmts pip install fmts PyPI PyPI - Python Version
funkify pip install funkify PyPI PyPI - Python Version
h5 pip install h5 PyPI PyPI - Python Version
jsonbourne pip install jsonbourne PyPI PyPI - Python Version
lager pip install lager PyPI PyPI - Python Version
listless pip install listless PyPI PyPI - Python Version
requires pip install requires PyPI PyPI - Python Version
shellfish pip install shellfish PyPI PyPI - Python Version
xtyping pip install xtyping PyPI PyPI - Python Version

About⚓︎

This repo (dgpy-libs) are the polished gems formed under intense pressure below the offices of Dynamic Graphics Inc. These pure-python libraries are all published on pip under the listed names.

Design PhilosoPY⚓︎

  • 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
  • Prefer pure-python & compiled-3rd-party-libs over writing packages with compiled extensions
  • 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)

Third party friends⚓︎

  • pydantic; best python lib you will ever use
  • loguru; base of lager
  • httpx ; don't use requests
  • attrs; pydantic alternative
  • poetry; best dep management python has to offer
  • orjson; fastest python json lib (opt 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 lib
  • nox; like tox but less maddening

Notebooks⚓︎

notebooks/
├── cache_money.ipynb
├── filter_none.ipynb
├── json_parsing.ipynb
└── string_fmt.ipynb

Contributor(s)⚓︎

Contributing⚓︎

Plz do! Send me that PR!


TODO⚓︎

  • Have CI/CD auto build n publish
  • Changelog (for real)
  • Figure out why the combine-prs workflow doesn't trigger github actions...
  • Update mkdocs to include all dgpy-libs