</>PackageGraphPackageGraph

optree

PyPIv0.20.0

Optimized 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.

1
Direct dependencies

Runtime packages this one declares itself.

1
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

457 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

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.

Used by

Popular packages that depend on optree.

Relationship graph

Dependencies (left) and dependents (right) of optree.

typing-extensionskerasoptree
optree dependencies dependents

Frequently installed together

Release history

10 releases in the last two years, typically about 58 days apart.

Recent versions of optree
VersionPublishedSizeLicense
0.20.0latest20 days ago413 KB
0.19.14 months ago389 KB
0.19.06 months ago383 KB
0.18.09 months ago345 KB
0.17.01 year ago608 KB
0.16.01 year ago592 KB
0.15.01 year ago595 KB
0.14.11 year ago589 KB
0.14.01 year ago586 KB
0.14.0rc11 year ago586 KB
0.13.11 year ago563 KB
0.13.01 year ago530 KB
0.12.12 years ago509 KB
0.12.02 years ago509 KB
0.11.02 years ago498 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

Keywords

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.