Metadata-Version: 2.4
Name: scverse-backends
Version: 0.0.2
Summary: Pluggable backend dispatch for scverse and scientific Python host libraries
Project-URL: Bug Tracker, https://github.com/scverse/scverse-backends/issues
Project-URL: Source, https://github.com/scverse/scverse-backends
Author: scverse
License-Expression: MIT
License-File: LICENSE
Keywords: backend-dispatch,scverse,single-cell
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Typing :: Typed
Requires-Python: >=3.12
Provides-Extra: dev
Requires-Dist: hatch>=1.9; extra == 'dev'
Requires-Dist: pre-commit>=3; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: ty==0.0.34; extra == 'dev'
Provides-Extra: docs
Requires-Dist: myst-parser>=2; extra == 'docs'
Requires-Dist: scanpydoc[theme]>=0.13; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints>=2; extra == 'docs'
Requires-Dist: sphinx-copybutton>=0.5; extra == 'docs'
Requires-Dist: sphinx-design>=0.5; extra == 'docs'
Requires-Dist: sphinx>=7; extra == 'docs'
Provides-Extra: test
Requires-Dist: pytest-cov>=4; extra == 'test'
Requires-Dist: pytest>=7; extra == 'test'
Description-Content-Type: text/markdown

# scverse-backends

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/scverse/scverse-backends/main.svg)](https://results.pre-commit.ci/latest/github/scverse/scverse-backends/main)
[![codecov](https://codecov.io/gh/scverse/scverse-backends/graph/badge.svg?token=BMSUQWKIN8)](https://codecov.io/gh/scverse/scverse-backends)
[![Documentation Status](https://readthedocs.org/projects/scverse-backends/badge/?version=latest)](https://scverse-backends.readthedocs.io/en/latest/?badge=latest)

> ⚠️ **Under active development.** APIs may shift.

The default plugin & dispatch mechanism for [scverse](https://scverse.org).
Any host library decorates its public functions with `@backend_dispatch`; any
backend — GPU, distributed, JAX, PyTorch, anything
— plugs in via a Python entrypoint and gets picked up automatically.

Want to add a PyTorch backend, a JAX backend, your own custom one?
**You don't need a PR against the host.** Ship a package that exposes
a module or object with `name`, `aliases`, and host-named callables,
register it as an entry point, and users install it next to the host.
That's the whole contract.

```python
import example_host as eh

with eh.settings.use_backend("accelerated"):
    eh.some_function(data)
```

## Status

- Built from backend-dispatch prototypes in scverse host integrations.
- Concrete backend aliases belong in host integrations, not in this infrastructure package.
- Goal: host libraries depend on this package and stop re-rolling their own dispatch.

## Docs

Full docs at [scverse-backends.readthedocs.io](https://scverse-backends.readthedocs.io/en/latest/).

## License

MIT.
