Skip to main content

Pluggable backend dispatch for scverse and scientific Python host libraries

Project description

scverse-backends

pre-commit.ci status codecov Documentation Status

⚠️ Under active development. APIs may shift.

The default plugin & dispatch mechanism for scverse. 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.

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.

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scverse_backends-0.0.2.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scverse_backends-0.0.2-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file scverse_backends-0.0.2.tar.gz.

File metadata

  • Download URL: scverse_backends-0.0.2.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scverse_backends-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f7dfc5be7054214101a0ef4e4d5e15046575275016c87b6851418c0d7d3886fa
MD5 61ca1e1faab91d24c72a98854f140a15
BLAKE2b-256 73f765f39c7fca21ffa8fb261b1cfc033a0854180c515b731d0ed1e2f9275f81

See more details on using hashes here.

Provenance

The following attestation bundles were made for scverse_backends-0.0.2.tar.gz:

Publisher: python-publish.yml on scverse/scverse-backends

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scverse_backends-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for scverse_backends-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fcbc1d0c402459f0e1bcf2005b1f0eef6f9b33f5a00920fa73f373e62eff021a
MD5 8357926cd4ddcbd076cfc43beea36b74
BLAKE2b-256 2a1654ba62dd9d647be6402e36c6fe882d7810eef025d317effdf9428c3f81b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for scverse_backends-0.0.2-py3-none-any.whl:

Publisher: python-publish.yml on scverse/scverse-backends

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page