Skip to main content

Canonical anatomy domain dataset and Neo4j graph builder.

Project description

anatomy-graphdb

anatomy-graphdb is a Python package for loading, validating, and exporting a structured human anatomy graph from YAML configuration.

It provides:

  • canonical anatomy config data under config/
  • typed Python loaders and domain models in anatomy_graphdb/
  • a CLI (anatomy-graphdb) for validation, catalog export, and Neo4j ingestion
  • packaged overlay SVG assets (anatomy_graphdb/assets/)

What You Can Do With It

  • Validate cross-references across anatomy entities (muscles, heads, bones, nerves, arteries, actions)
  • Load region-scoped or multi-region anatomy models in Python
  • Export canonical catalog JSON for downstream systems
  • Export Neo4j CSV artifacts or ingest directly via Bolt
  • Refresh a Neo4j graph using Make against any running Neo4j instance

Install

pip install anatomy-graphdb

With Neo4j ingestion support:

pip install "anatomy-graphdb[neo4j]"

For development:

poetry install

Quick Start

Python API

from anatomy_graphdb.databases.anatomy.loader import AnatomyLoader
from anatomy_graphdb.domain import build_anatomy_model

loader = AnatomyLoader()
region = loader.load_region("chest")
model = build_anatomy_model(region)

print(model.region)
print(len(model.muscles))

CLI

List regions:

poetry run anatomy-graphdb --list-regions

Validate all regions:

poetry run anatomy-graphdb --region all --validate-only

Export Neo4j CSV artifacts:

poetry run anatomy-graphdb --region all --output data/neo4j --validate

Export canonical catalog JSON:

poetry run anatomy-graphdb --export-catalog --region all --catalog-output data/catalog/anatomy_catalog.json

Direct Bolt ingestion (requires neo4j extra):

poetry run anatomy-graphdb --region all --mode bolt --validate

Neo4j Refresh Workflow

Run an end-to-end graph refresh into a running Neo4j instance:

make neo4j-refresh REGION=all NEO4J_URI=bolt://localhost:7687 NEO4J_AUTH=neo4j/password

Override defaults if needed:

make neo4j-refresh REGION=chest NEO4J_URI=bolt://localhost:7688 NEO4J_AUTH=neo4j/password

Assets

Packaged assets:

  • manifest: anatomy_graphdb/assets/overlay_manifest.json
  • SVG files: anatomy_graphdb/assets/anatomy/*.svg

Source SVG layout (referenced by config/body/muscles.yaml overlays):

  • svgs/front/muscles/*.svg
  • svgs/rear/muscles/*.svg
  • templates: svgs/front/front_template.svg, svgs/rear/rear_template.svg

Frontend muscle overlay flow:

poetry run anatomy-graphdb --export-catalog --region all --catalog-output data/catalog/anatomy_catalog.json

Use muscle_overlays and muscle_groups from the catalog JSON so a selected group or muscle slug maps directly to one or more SVG overlay paths.

Development

Run tests:

poetry run pytest

Docs

  • API stability: docs/API_STABILITY.md
  • Changelog: CHANGELOG.md
  • Releasing: docs/RELEASING.md
  • Asset attribution: docs/ASSET_ATTRIBUTION.md

Package Metadata

  • Distribution: anatomy-graphdb
  • Import namespace: anatomy_graphdb
  • Python: 3.12+
  • 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

anatomy_graphdb-1.2.0.tar.gz (287.9 kB view details)

Uploaded Source

Built Distribution

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

anatomy_graphdb-1.2.0-py3-none-any.whl (374.8 kB view details)

Uploaded Python 3

File details

Details for the file anatomy_graphdb-1.2.0.tar.gz.

File metadata

  • Download URL: anatomy_graphdb-1.2.0.tar.gz
  • Upload date:
  • Size: 287.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.17.0-14-generic

File hashes

Hashes for anatomy_graphdb-1.2.0.tar.gz
Algorithm Hash digest
SHA256 c8b71b24f3ebff1351c3134b57def12e8bda3e23d78756eb33a6d7344c3eee01
MD5 9b407eb1036a36a481187d93519ac820
BLAKE2b-256 d0ca9c202c95d4a5697792c910e5d1268c9daf53a1f5defc26c1d080fa47df98

See more details on using hashes here.

File details

Details for the file anatomy_graphdb-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: anatomy_graphdb-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 374.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.17.0-14-generic

File hashes

Hashes for anatomy_graphdb-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 800e37957268c8505b639469c2e4e460590ee8eccd68594b391c31f50d94ef19
MD5 581134f1810249d8bc64d61aeb1af0ff
BLAKE2b-256 6beeca4929f2a43c89bdb864c5d13a9777585ade2c6ab7022863699950aafdfd

See more details on using hashes here.

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