Skip to main content

Anatomic location ontology navigation

Project description

anatomic-locations

Python library for anatomic location ontology navigation: hierarchy traversal, laterality variants, and semantic search.

Installation

pip install anatomic-locations

Features

  • Hybrid Search: Combined full-text and semantic vector search
  • Hierarchy Navigation: Traverse parent/child relationships with tree visualization
  • Laterality Variants: Generate left, right, bilateral variants
  • Auto-Download: Database downloads automatically on first use
  • Flexible Lookup: Use location IDs (RID*) or names/synonyms

Quick Start

The database auto-downloads on first use. No setup required.

from anatomic_locations import AnatomicLocationIndex

with AnatomicLocationIndex() as index:
    location = index.get("RID2772")  # Kidney
    print(location.description)       # "kidney"
    print(location.region.value)      # "Abdomen"

Configuration

Override the default database path via environment variable or constructor:

# Environment variable
export ANATOMIC_DB_PATH=/path/to/custom.duckdb
# Or specify directly
index = AnatomicLocationIndex(db_path="/path/to/custom.duckdb")

CLI

The anatomic-locations CLI provides search, hierarchy navigation, and lookup commands. Use location IDs (e.g., RID2772) or names (e.g., "stomach"):

# Semantic search
anatomic-locations search "posterior cruciate ligament"

# Show full hierarchy tree
anatomic-locations hierarchy stomach

See the full CLI reference for all commands.

Related Packages

Documentation

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

anatomic_locations-0.2.1.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

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

anatomic_locations-0.2.1-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file anatomic_locations-0.2.1.tar.gz.

File metadata

  • Download URL: anatomic_locations-0.2.1.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for anatomic_locations-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f99b6c3e855ba96f5f009c542e9b3e074a932de1a8c7674213a5c9d53a91c7c9
MD5 967e13d7eb528e338399b3002f08258b
BLAKE2b-256 45deae64a29a401e2002e3c8ccc4be2b09d9ca1671f14aa87899b90760e24b8b

See more details on using hashes here.

File details

Details for the file anatomic_locations-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: anatomic_locations-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for anatomic_locations-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8bc8fa5df0e999258adc3574f7f883912ecf07824bd1d229f275095cc6a81ce3
MD5 7768ce4e0401cb4df304597a2c37655d
BLAKE2b-256 b90ea83757efba5496883f3806ed114740c117785712b80aea5a20577593bf5a

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