coordinax.api#
Abstract dispatch API definitions for coordinax.
This package provides the abstract dispatch interfaces for coordinaxβs core functionality, enabling third-party packages to implement coordinax protocols without depending on the full coordinax package. This is particularly useful for library authors who want to provide coordinax integration without introducing a heavy dependency.
Installation#
pip install coordinax.api
uv add coordinax.api
Overview#
The coordinax.api package defines abstract dispatch functions that form the public API contract for coordinax. By depending only on this lightweight package, you can:
Implement custom types that work with
coordinaxExtend
coordinaxfunctionality in your own packagesAvoid circular dependencies when integrating with
coordinax
See the Usage Guide for detailed examples and the API Reference for the list of all public API.
Design Philosophy#
The coordinax.api package follows these principles:
Minimal dependencies: Only depends on
plumfor the dispatch mechanismAbstract interfaces: Defines what can be done, not how to do it
Extension friendly: Easy for third-party packages to extend
Type-safe: Uses Pythonβs type system for dispatch
When to Use#
Use coordinax.api when you:
Want to implement
coordinaxprotocols in your own packageNeed
coordinaxintegration without the fullcoordinaxdependencyAre building a library that provides vector types compatible with
coordinax
Use the full coordinax package when you:
Need concrete vector implementations (Cart3D, Spherical3D, etc.)
Want to perform actual coordinate transformations
Are writing application code rather than library code