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 coordinax

  • Extend coordinax functionality in your own packages

  • Avoid 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:

  1. Minimal dependencies: Only depends on plum for the dispatch mechanism

  2. Abstract interfaces: Defines what can be done, not how to do it

  3. Extension friendly: Easy for third-party packages to extend

  4. Type-safe: Uses Python’s type system for dispatch

When to Use#

Use coordinax.api when you:

  • Want to implement coordinax protocols in your own package

  • Need coordinax integration without the full coordinax dependency

  • Are 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