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
- Batch Search: One embedding API call for multiple queries via
search_batch() - 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*), descriptions, or synonyms
Quick Start
The database auto-downloads on first use. No setup required.
from anatomic_locations import AnatomicLocationIndex
# Auto-open: no explicit open() or context manager needed for simple queries
index = AnatomicLocationIndex()
location = index.get("RID2772") # by RID
location = index.get("kidney") # by description (case-insensitive)
location = index.get("renal") # by synonym (case-insensitive)
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")
Semantic Search
Set OPENAI_API_KEY (or ANATOMIC_OPENAI_API_KEY) to enable embedding-based semantic search. Without it, search uses keyword matching only (FTS), which may miss conceptual matches for multi-word queries.
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
- findingmodel-ai: AI-assisted anatomic location discovery
- findingmodel: Core finding model library
Documentation
- Anatomic Locations Guide - Full CLI reference, Python API, and configuration
Metadata
Release files for anatomic-locations 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anatomic_locations-0.2.5.tar.gz | 20.5 kB | Without provenance | Details for anatomic_locations-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anatomic_locations-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for anatomic_locations-0.2.5-py3-none-any.whl |
Total release size: 44.6 kB
Release files / anatomic_locations-0.2.5.tar.gz
| Download URL | anatomic_locations-0.2.5.tar.gz |
|---|---|
| Size | 20.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75587b21ce1defc1592c83d31f7cc4d2a5595adf009a0248cbca75d8010243da
|
|
BLAKE2b-256 checksum How to use checksums |
130dc413fc75359e53b3e46a52872cb8e9a044b5f6eac6ed198d1d9943ba418c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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}
|
Release files / anatomic_locations-0.2.5-py3-none-any.whl
| Download URL | anatomic_locations-0.2.5-py3-none-any.whl |
|---|---|
| Size | 24.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b6cba343676b935e55d1171c10fe887a31f5d8b84f146adc122e45428205b2d
|
|
BLAKE2b-256 checksum How to use checksums |
921149df021ce54ea6bad9d93fad8b80b09b8fd938d141305851a2e8541f3c3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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}
|
Security for anatomic-locations 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.