{"id":1828,"library":"etils","title":"etils - Eclectic Python Utilities","description":"etils (eclectic utils) is an open-source collection of Python utilities designed for machine learning and scientific computing workflows. Each top-level submodule is self-contained and independent, prefixed by 'e' (e.g., `epath`, `epy`) to avoid name collisions. This modular design allows users to import only the necessary components, minimizing dependencies. The library is actively maintained, with frequent updates.","status":"active","version":"1.14.0","language":"python","source_language":"en","source_url":"https://github.com/google/etils","tags":["utilities","python-utils","machine-learning","scientific-computing","path-management","dataclasses","numpy","jax","tensorflow"],"install":[{"cmd":"pip install etils","lang":"bash","label":"Base installation (minimal dependencies)"},{"cmd":"pip install etils[array_types,epath,epy,etree]","lang":"bash","label":"Installation with common optional modules"}],"dependencies":[{"reason":"For typing annotations for JAX and NumPy arrays","package":"array_types","optional":true},{"reason":"For pathlib-like API with cloud storage support (gs://, s3://)","package":"epath","optional":true},{"reason":"For general-purpose Python utilities","package":"epy","optional":true},{"reason":"For universal tree manipulation utilities (TensorFlow, JAX, DeepMind tree)","package":"etree","optional":true},{"reason":"For NumPy utilities","package":"enp","optional":true},{"reason":"For Colab/Jupyter utilities","package":"ecolab","optional":true},{"reason":"For dataclass utilities","package":"edc","optional":true},{"reason":"For Absl flags/app utilities","package":"eapp","optional":true}],"imports":[{"wrong":"import etils.epath","symbol":"etils","correct":"import etils"}],"quickstart":{"code":"from etils import epath\n\n# epath provides a pathlib-like API with cloud storage support (gs://, s3://)\n# For local paths, it behaves like pathlib.Path\nlocal_path = epath.Path(\"/tmp/etils_example.txt\")\nlocal_path.write_text(\"Hello from etils epath!\")\nprint(f\"File created at: {local_path}\")\nprint(f\"Content: {local_path.read_text()}\")\n\n# Clean up (optional)\nlocal_path.unlink()","lang":"python","description":"This example demonstrates the usage of `epath` for basic file operations. `epath.Path` extends `pathlib.Path` to seamlessly handle both local and cloud-based file paths (e.g., `gs://`, `s3://`) by integrating with respective cloud storage libraries."},"warnings":[{"fix":"Always use `from etils import <submodule>` for required functionality. Do not expect `import etils` to make all sub-utilities available.","message":"Etils is designed with independent submodules; importing `etils` directly does not expose all functionalities. Users must explicitly `from etils import <submodule>` (e.g., `from etils import epath`) to access specific utilities.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Install `etils` with the specific extras corresponding to the submodules you intend to use, e.g., `pip install etils[epath,epy]`.","message":"Many features are behind optional dependencies (extras). Installing only `pip install etils` will lead to `ModuleNotFoundError` if you attempt to use functionality from submodules like `epath` or `ejax` without installing `pip install etils[epath]` or similar.","severity":"breaking","affected_versions":"All versions"},{"fix":"Carefully review the documentation for `epath.Path.stat()` and adapt code to its specific return structure, or use only commonly available attributes for maximum compatibility.","message":"The return value format of `epath.Path.stat()` might not strictly match `pathlib.Path.stat()`. This can cause subtle incompatibilities or `AttributeError` if code expects specific attributes only present in `pathlib`'s `stat` result.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consult the `etils` release notes or GitHub issues for migration guides. For `epy.cached_property`, consider using standard library `functools.cached_property` if applicable to your Python version.","message":"Previous versions may have included or exposed certain utilities (e.g., `epy.cached_property`) that have since been removed or relocated, leading to `AttributeError` on upgrade.","severity":"deprecated","affected_versions":"<=1.13.0 (potentially)"},{"fix":"Monitor GitHub issues for a resolution. As a workaround, inspect your logging configuration to prevent duplicate handlers or adjust `eapp.better_logging()` parameters if available.","message":"There's an open issue (#756) regarding `eapp.better_logging()` potentially causing double logging output. This can lead to redundant or confusing log messages in applications using `eapp`.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'activ':62 'allow':49 'avoid':43 'collect':13 'collis':45 'compon':56 'comput':23,76 'contain':33 'dataclass':80 'depend':58 'design':17,48 'e':38 'e.g':39 'eclect':2,6 'epath':40 'epi':41 'etil':1,5 'frequent':65 'import':52 'independ':35 'jax':82 'learn':20,73 'level':28 'librari':60 'machin':19,72 'machine-learn':71 'maintain':63 'manag':79 'minim':57 'modular':47 'name':44 'necessari':55 'numpi':81 'open':11 'open-sourc':10 'path':78 'path-manag':77 'prefix':36 'python':3,15,69 'python-util':68 'scientif':22,75 'scientific-comput':74 'self':32 'self-contain':31 'sourc':12 'submodul':29 'tensorflow':83 'top':27 'top-level':26 'updat':66 'user':50 'util':4,7,16,67,70 'workflow':24","created_at":"2026-04-09T05:07:01.810930+00:00","updated_at":"2026-04-16T14:51:59.550131+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.14.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/google/etils","docs":"https://etils.readthedocs.io","changelog":"https://github.com/google/etils/blob/main/CHANGELOG.md","pypi":"https://pypi.org/project/etils/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-08-27","next_check":"2026-08-02","install_tag":null}}