optree
PyPIv0.20.0Optimized PyTree Utilities.
Not recommended for new projects
No — optree should not be adopted for new projects. No license declared — you have no explicit right to use this code.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- AMaintenance: grade A, Excellent.
Last published 20 days ago. 12 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 1 transitive package, about 457 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- FLicense: grade F, Failing.
No license declared — you have no explicit right to use this code.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding optree to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Python
- python >=3.9
Quick start
A usage example from the optree README.
>>> tree = {'b': (2, [3, 4]), 'a': 1, 'c': 5, 'd': 6}
>>> optree.tree_flatten(tree)
([1, 2, 3, 4, 5, 6], PyTreeSpec({'a': *, 'b': (*, [*, *]), 'c': *, 'd': *}))
>>> optree.tree_flatten(1)
([1], PyTreeSpec(*))
>>> optree.tree_flatten(None)
([], PyTreeSpec(None))
>>> optree.tree_map(lambda x: x**2, tree)
{'b': (4, [9, 16]), 'a': 1, 'c': 25, 'd': 36}Dependencies
Declared by optree v0.20.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (1)
Used by
Popular packages that depend on optree.
Relationship graph
Dependencies (left) and dependents (right) of optree.
Frequently installed together
Fundamental package for array computing in Python
Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal
Core utilities for Python packages
Abseil Python Common Libraries, see https://github.com/abseil/abseil-py.
Read and write HDF5 files from Python
ml_dtypes is a stand-alone implementation of several NumPy dtype extensions used in machine learning.
A simple utility to separate the implementation of your Python package and its public API surface.
Release history
10 releases in the last two years, typically about 58 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 0.20.0latest | 20 days ago | 413 KB | — |
| 0.19.1 | 4 months ago | 389 KB | — |
| 0.19.0 | 6 months ago | 383 KB | — |
| 0.18.0 | 9 months ago | 345 KB | — |
| 0.17.0 | 1 year ago | 608 KB | — |
| 0.16.0 | 1 year ago | 592 KB | — |
| 0.15.0 | 1 year ago | 595 KB | — |
| 0.14.1 | 1 year ago | 589 KB | — |
| 0.14.0 | 1 year ago | 586 KB | — |
| 0.14.0rc1 | 1 year ago | 586 KB | — |
| 0.13.1 | 1 year ago | 563 KB | — |
| 0.13.0 | 1 year ago | 530 KB | — |
| 0.12.1 | 2 years ago | 509 KB | — |
| 0.12.0 | 2 years ago | 509 KB | — |
| 0.11.0 | 2 years ago | 498 KB | — |
Overview
optree is an PyPI package that optimized PyTree Utilities. It has 1 known dependents in the graph. The latest version is 0.20.0.
Who should use it
Teams working in the PyPI ecosystem who need optimized PyTree Utilities and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your PyPI stack.
Pros
- Lean dependency tree (1 direct dependencies).
Cons
- No license detected — review usage terms before adopting.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use optree?
No — optree should not be adopted for new projects. No license declared — you have no explicit right to use this code.
How do I install optree?
Run `pip install optree` to add optree to your PyPI project.
How many dependencies does optree have?
optree declares 1 direct dependency and pulls in 1 packages in total once its runtime tree is resolved totalling about 457 KB on disk.
What license is optree released under?
No license was detected in optree's metadata; review the repository before use.
How popular is optree?
PyPI does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on optree.
Is optree still maintained?
The most recent release of optree (v0.20.0) was published 20 days ago.