Packaging (pyproject.toml)
Status & scope
- Module: project root
- Milestone: Phase 3
Purpose
Prism started as a standalone library axonis-lens (per the original draft of
this spec). It has since evolved into a dual-mode package: still importable
as a leaf library (from lens import ...), but also shippable as a microservice
(REST + MCP, under server/ and mcp_server/). The packaging reflects that
evolution:
- Project name is
axonis-prism(wasaxonis-lens) - Build backend is
hatchling(wassetuptools) - Base dependency is
axonis-corefor shared platform primitives (auth, gateway, logger, schema, UDS, LLM) - A new
serviceoptional group pulls in FastAPI / uvicorn / torch for the microservice surface - Math/geo dependencies remain split into
traversal/observation/threat/geoextras so importers can install only what they use
Public API
# After `pip install axonis-prism`, these work from any project:
from lens import parse_lens, run_lens, compare_coas
from lens import MobilitySurface, CostGrid
from lens import create_evidence_block, evaluate_threshold
from lens.traversal.router import route
from lens.observation.propagator import parse_tle_file
from lens.runtime import init_dataspace, execute_lens, sync_evidence # SPEC-05
from lens.scenario import run_scenario # SPEC-16
pyproject.toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "axonis-prism"
version = "1.0.2"
description = "Prism — Axonis multi-factor cost computation microservice"
requires-python = ">=3.10,<3.13"
dependencies = [
"axonis-core>=4.0.6", # auth, gateway, llm, logger, schema, uds
]
[project.optional-dependencies]
# Service surface — REST + MCP. Heaviest; only installed when running prism
# as a microservice (server/__main__).
service = [
"axonis-core[otel,memory]>=4.0.6",
"fastapi>=0.110.0",
"uvicorn[standard]>=0.29.0",
"starlette>=0.36.0",
"torch>=2.0.0,<2.5",
"torchvision>=0.15.0,<0.20",
]
# Per-engine math/geo deps — install only what you import.
threat = ["numpy>=1.24"]
observation = ["numpy>=1.24", "sgp4>=2.22"]
traversal = ["numpy>=1.24", "rustworkx>=0.14"]
geo = ["numpy>=1.24", "rasterio>=1.3", "osmium>=3.7", "shapely>=2.0"]
all = [
"numpy>=1.24",
"sgp4>=2.22",
"rustworkx>=0.14",
"rasterio>=1.3",
"osmium>=3.7",
"shapely>=2.0",
"geojson>=3.0",
]
Install Patterns
# Library-only (parser + orchestrator + primitives + adapters + runtime)
pip install axonis-prism
# With routing
pip install "axonis-prism[traversal]"
# With satellite propagation
pip install "axonis-prism[observation]"
# Full microservice (REST + MCP + every engine)
pip install "axonis-prism[service,all]"
# Editable, inside another venv (cortex, beacon, titan)
pip install -e /path/to/prism[all]
Rebrand history
| Was | Is | Why |
|---|---|---|
axonis-lens (name) |
axonis-prism |
Product rebrand; "Prism" is the shipping name |
setuptools.build_meta |
hatchling.build |
Faster, simpler config — aligns with axonis-core |
dependencies = [pyyaml, jsonschema, numpy] |
dependencies = [axonis-core>=4.0.6] |
axonis-core re-exports yaml/jsonschema/numpy and adds shared auth/gateway/logger/schema |
(no service extra) |
service = [fastapi, uvicorn, torch, ...] |
Prism now ships REST + MCP surfaces under server/ and mcp_server/ |
DO NOT
- Include demo data in the wheel —
data/stays out - Require all optional deps by default — library mode stays small
- Re-vendor
axonis-coreshapes — depend on the published wheel - Add new top-level extras without updating this spec + the
allrollup
Required by: component.prism.bayesian-posterior-engine, component.prism.integration-test, component.prism.platform-integration