An open API service indexing awesome lists of open source software.

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

Dynamic Graphics Python libraries/modules
https://github.com/dynamic-graphics-inc/dgpy-libs

dgi library monorepo python3 type-annotations

Last synced: 10 months ago
JSON representation

Dynamic Graphics Python libraries/modules

Awesome Lists containing this project

README

          


drawing

# dgpy-libs

[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

Docs: [dynamic-graphics-inc.github.io/dgpy-libs](https://dynamic-graphics-inc.github.io/dgpy-libs/)

Repo: [github.com/dynamic-graphics-inc/dgpy-libs](https://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 install aiopen asyncify fmts funkify h5 jsonbourne lager listless requires shellfish xtyping`

### [aiopen](./libs/aiopen) ~ `pip install aiopen` ~ [![Wheel](https://img.shields.io/pypi/wheel/aiopen.svg)](https://img.shields.io/pypi/wheel/aiopen.svg) [![Version](https://img.shields.io/pypi/v/aiopen.svg)](https://img.shields.io/pypi/v/aiopen.svg) [![py_versions](https://img.shields.io/pypi/pyversions/aiopen.svg)](https://img.shields.io/pypi/pyversions/aiopen.svg)

### [asyncify](./libs/asyncify) ~ `pip install asyncify` ~ [![Wheel](https://img.shields.io/pypi/wheel/asyncify.svg)](https://img.shields.io/pypi/wheel/asyncify.svg) [![Version](https://img.shields.io/pypi/v/asyncify.svg)](https://img.shields.io/pypi/v/asyncify.svg) [![py_versions](https://img.shields.io/pypi/pyversions/asyncify.svg)](https://img.shields.io/pypi/pyversions/asyncify.svg)

### [dgpylibs](./libs/dgpylibs) ~ `pip install dgpylibs` ~ [![Wheel](https://img.shields.io/pypi/wheel/dgpylibs.svg)](https://img.shields.io/pypi/wheel/dgpylibs.svg) [![Version](https://img.shields.io/pypi/v/dgpylibs.svg)](https://img.shields.io/pypi/v/dgpylibs.svg) [![py_versions](https://img.shields.io/pypi/pyversions/dgpylibs.svg)](https://img.shields.io/pypi/pyversions/dgpylibs.svg)

### [dgpytest](./libs/dgpytest) ~ `pip install dgpytest` ~ [![Wheel](https://img.shields.io/pypi/wheel/dgpytest.svg)](https://img.shields.io/pypi/wheel/dgpytest.svg) [![Version](https://img.shields.io/pypi/v/dgpytest.svg)](https://img.shields.io/pypi/v/dgpytest.svg) [![py_versions](https://img.shields.io/pypi/pyversions/dgpytest.svg)](https://img.shields.io/pypi/pyversions/dgpytest.svg)

### [fmts](./libs/fmts) ~ `pip install fmts` ~ [![Wheel](https://img.shields.io/pypi/wheel/fmts.svg)](https://img.shields.io/pypi/wheel/fmts.svg) [![Version](https://img.shields.io/pypi/v/fmts.svg)](https://img.shields.io/pypi/v/fmts.svg) [![py_versions](https://img.shields.io/pypi/pyversions/fmts.svg)](https://img.shields.io/pypi/pyversions/fmts.svg)

### [funkify](./libs/funkify) ~ `pip install funkify` ~ [![Wheel](https://img.shields.io/pypi/wheel/funkify.svg)](https://img.shields.io/pypi/wheel/funkify.svg) [![Version](https://img.shields.io/pypi/v/funkify.svg)](https://img.shields.io/pypi/v/funkify.svg) [![py_versions](https://img.shields.io/pypi/pyversions/funkify.svg)](https://img.shields.io/pypi/pyversions/funkify.svg)

### [h5](./libs/h5) ~ `pip install h5` ~ [![Wheel](https://img.shields.io/pypi/wheel/h5.svg)](https://img.shields.io/pypi/wheel/h5.svg) [![Version](https://img.shields.io/pypi/v/h5.svg)](https://img.shields.io/pypi/v/h5.svg) [![py_versions](https://img.shields.io/pypi/pyversions/h5.svg)](https://img.shields.io/pypi/pyversions/h5.svg)

### [jsonbourne](./libs/jsonbourne) ~ `pip install jsonbourne` ~ [![Wheel](https://img.shields.io/pypi/wheel/jsonbourne.svg)](https://img.shields.io/pypi/wheel/jsonbourne.svg) [![Version](https://img.shields.io/pypi/v/jsonbourne.svg)](https://img.shields.io/pypi/v/jsonbourne.svg) [![py_versions](https://img.shields.io/pypi/pyversions/jsonbourne.svg)](https://img.shields.io/pypi/pyversions/jsonbourne.svg)

### [lager](./libs/lager) ~ `pip install lager` ~ [![Wheel](https://img.shields.io/pypi/wheel/lager.svg)](https://img.shields.io/pypi/wheel/lager.svg) [![Version](https://img.shields.io/pypi/v/lager.svg)](https://img.shields.io/pypi/v/lager.svg) [![py_versions](https://img.shields.io/pypi/pyversions/lager.svg)](https://img.shields.io/pypi/pyversions/lager.svg)

### [listless](./libs/listless) ~ `pip install listless` ~ [![Wheel](https://img.shields.io/pypi/wheel/listless.svg)](https://img.shields.io/pypi/wheel/listless.svg) [![Version](https://img.shields.io/pypi/v/listless.svg)](https://img.shields.io/pypi/v/listless.svg) [![py_versions](https://img.shields.io/pypi/pyversions/listless.svg)](https://img.shields.io/pypi/pyversions/listless.svg)

### [requires](./libs/requires) ~ `pip install requires` ~ [![Wheel](https://img.shields.io/pypi/wheel/requires.svg)](https://img.shields.io/pypi/wheel/requires.svg) [![Version](https://img.shields.io/pypi/v/requires.svg)](https://img.shields.io/pypi/v/requires.svg) [![py_versions](https://img.shields.io/pypi/pyversions/requires.svg)](https://img.shields.io/pypi/pyversions/requires.svg)

### [shellfish](./libs/shellfish) ~ `pip install shellfish` ~ [![Wheel](https://img.shields.io/pypi/wheel/shellfish.svg)](https://img.shields.io/pypi/wheel/shellfish.svg) [![Version](https://img.shields.io/pypi/v/shellfish.svg)](https://img.shields.io/pypi/v/shellfish.svg) [![py_versions](https://img.shields.io/pypi/pyversions/shellfish.svg)](https://img.shields.io/pypi/pyversions/shellfish.svg)

### [xtyping](./libs/xtyping) ~ `pip install xtyping` ~ [![Wheel](https://img.shields.io/pypi/wheel/xtyping.svg)](https://img.shields.io/pypi/wheel/xtyping.svg) [![Version](https://img.shields.io/pypi/v/xtyping.svg)](https://img.shields.io/pypi/v/xtyping.svg) [![py_versions](https://img.shields.io/pypi/pyversions/xtyping.svg)](https://img.shields.io/pypi/pyversions/xtyping.svg)

## About

This repo (dgpy-libs) are the polished gems formed under intense pressure below the offices of [Dynamic Graphics Inc](http://dgi.com/). 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.6 'n up, baby! (May move to 3.7 for `__future___.annotations`... tbd)
- 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
- Offer integrations with the super-hot-fire modern python packages all the kids are using
- 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](https://pydantic-docs.helpmanual.io/); best python lib you will ever use
- [loguru](https://github.com/Delgan/loguru); base of lager
- [httpx](https://www.python-httpx.org/) ; don't use requests
- [attrs](https://github.com/python-attrs/attrs); pydantic alternative
- [poetry](https://github.com/python-poetry/poetry); best dep management python has to offer
- [orjson](https://github.com/ijl/orjson); fastest python json lib (opt dep of jsonbourne)
- [rapidjson/python-rapidjson](https://github.com/python-rapidjson/python-rapidjson); best mostly drop-in replacement for python's json module
- [h5py](https://github.com/h5py/h5py); base of h5
- [rich](https://github.com/willmcgugan/rich); best python console formatting lib
- [nox](https://github.com/theacodes/nox); like tox but less maddening

---

## Notebooks

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

- [Filtering None and False-y values](./notebooks/filter_none)
- [cache money! `functools.lru_cache`](./notebooks/cache_money)
- [String formatting funks](./notebooks/string_fmt)
- [JSON parsing vs plain-jane dictionaries](./notebooks/json_parsing)

---

## Contributor(s):

- [Jesse Rubin](https://github.com/jessekrubin) ~ `jesse@dgi.com` / `jessekrubin@gmail.com`
- [Dan Costello](https://github.com/dan-costello) ~ `dan@dgi.com` / `dan.costello2@gmail.com`
- Possibly you!?

## 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