Abstract dispatch API definitions for unxt
Project description
unxt-api
Abstract dispatch API definitions for unxt.
This package defines the abstract dispatch interfaces that unxt and other packages can implement. It provides a minimal dependency set for packages that want to define or use unxt's dispatch-based API without pulling in the full unxt implementation.
Installation
pip install unxt-api
Usage
This package is typically used as a dependency by unxt and related packages. It defines abstract dispatch signatures using plum-dispatch that concrete implementations register against.
For comprehensive documentation, examples, and extension guides, see:
Quick Example
from plum import dispatch
import unxt as u
class Temperature:
def __init__(self, value, unit="K"):
self.value = value
self.unit_str = unit
@dispatch
def unit_of(obj: Temperature, /):
return u.unit(obj.unit_str)
@dispatch
def dimension_of(obj: Temperature, /):
return u.dimension("temperature")
# Now Temperature works with unxt!
temp = Temperature(300, "K")
u.unit_of(temp) # Unit("K")
u.dimension_of(temp) # PhysicalType('temperature')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unxt_api-1.8.0.tar.gz.
File metadata
- Download URL: unxt_api-1.8.0.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a44ae40034c3fd6fcd917bf0b71a80bfc96b2e631f4843919838c99c58c37efd
|
|
| MD5 |
da0c152b7ccf895d8207c93c861c4a01
|
|
| BLAKE2b-256 |
6a7abdccacc4a5a300869ebb6012eac493b8e31548c7d2a668316d85777281a7
|
Provenance
The following attestation bundles were made for unxt_api-1.8.0.tar.gz:
Publisher:
cd-unxt-api.yml on GalacticDynamics/unxt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unxt_api-1.8.0.tar.gz -
Subject digest:
a44ae40034c3fd6fcd917bf0b71a80bfc96b2e631f4843919838c99c58c37efd - Sigstore transparency entry: 773814686
- Sigstore integration time:
-
Permalink:
GalacticDynamics/unxt@296dd3cdaa3183a073f75095996fb24125da5ce2 -
Branch / Tag:
refs/tags/unxt-api-v1.8.0 - Owner: https://github.com/GalacticDynamics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd-unxt-api.yml@296dd3cdaa3183a073f75095996fb24125da5ce2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file unxt_api-1.8.0-py3-none-any.whl.
File metadata
- Download URL: unxt_api-1.8.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b40f6c91b23e303ccee9e1ee931f1745a1d80a55e789c2b01c317d6cd0e3b2e
|
|
| MD5 |
dff78e8a7bd240a44d648e38ecaed7a0
|
|
| BLAKE2b-256 |
b8b246404fbf8d562d52a3883728c0148c379b05c51aa414cd44644fc093404c
|
Provenance
The following attestation bundles were made for unxt_api-1.8.0-py3-none-any.whl:
Publisher:
cd-unxt-api.yml on GalacticDynamics/unxt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unxt_api-1.8.0-py3-none-any.whl -
Subject digest:
5b40f6c91b23e303ccee9e1ee931f1745a1d80a55e789c2b01c317d6cd0e3b2e - Sigstore transparency entry: 773814691
- Sigstore integration time:
-
Permalink:
GalacticDynamics/unxt@296dd3cdaa3183a073f75095996fb24125da5ce2 -
Branch / Tag:
refs/tags/unxt-api-v1.8.0 - Owner: https://github.com/GalacticDynamics
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd-unxt-api.yml@296dd3cdaa3183a073f75095996fb24125da5ce2 -
Trigger Event:
release
-
Statement type: