etils (eclectic utils) is an open-source collection of utils for python.
Each top-level submodule is a self-contained independent module (with its
own BUILD
rule), meant to be imported individually. To avoid collisions with
other modules/variables, module names are prefixed by e
(arbitrary
convention):
from etils import epath # Path utils
from etils import epy # Python utils
from etils import ejax # Jax utils
...
Becauses each module is independent, only the minimal required libraries are
imported (for example, importing epy
won't suffer the cost of importing TF,
jax,...)
etils.epath
: pathlib-like API forgs://
,s3://
,...etils.etree
: Tree utils fortf.nest
,jax.tree_utils
, DeepMindtree
.etils.enp
: Numpy utils.etils.ecolab
: Colab utils.etils.array_types
: Typing annotations for jax, numpy,... arraysetils.edc
: Dataclasses utils.etils.epy
: Collection of generic python utils.etils.eapp
: Absl flags/app utils.- API design guide.
Because each module is independent and require different dependencies, you can select which modules deps to install:
pip install etils[array_types,epath,epy]
This is not an official Google product.