Skip to main content

pyimporters-mesh

license version PyPI - Python Version

Sherpa knowledge import plugin for the MeSH thesaurus (NLM XML descriptor files).

It registers one parser through the pyimporters.plugins entry point group:

Plugin Class Extensions
mesh pyimporters_mesh.mesh:MeSHKnowledgeParser xml, zip

Each DescriptorRecord becomes a Term with the TreeNumber, Branch and Category properties. A zip archive may hold one or several XML files.

The user documentation (French and English) lives in docs/sherpa.

Requirements

  • Python 3.12+
  • pyimporters_plugins (>=1.6.0,<1.7.0), lxml, collections-extended

Installation

pip install pyimporters-mesh

Usage

from pathlib import Path

from progress.bar import Bar

from pyimporters_mesh.mesh import MeSHKnowledgeParser, MeSHOptions

parser = MeSHKnowledgeParser()
options = MeSHOptions(branches="C,D")  # diseases, chemicals and drugs
terms = list(parser.parse(Path("desc2026.zip"), options.model_dump(), Bar("Processing")))
Option Default Description
branches all branches Comma-separated MeSH branch letters (case-insensitive); an unknown letter raises ValueError

Development

The build is driven by Task and uv, with the shared stages coming from the python-archetype submodule:

git submodule update --init
task stages          # print the pipeline stages, in order
task                 # run the pipeline up to (but excluding) py:publish
task -- --skip-tests # same, without the test stage
task up-to -- lint   # run the pipeline up to and including one stage
task jenkins         # run every stage, exactly what Jenkins runs

Individual stages:

Task Description
task py:sync Install the workspace and its dependencies (uv sync)
task py:lint ruff check and ruff format --check
task py:format Reformat the code with ruff
task py:test Run the test suite (also records the help examples)
task py:help Update the generated blocks of the Sherpa help pages
task py:help-check Check that the help pages match the code
task py:sbom Generate a CycloneDX SBOM of the resolved environment
task py:check-vulnerabilities Check for known CVEs
task py:check-updates Check for dependency updates
task py:build Build the wheel and sdist (uv build)
task py:publish Publish the distributions (uv publish)

uv.lock is not versioned here, so py:sync always resolves dependencies from scratch.

Metadata

Release files for pyimporters-mesh 1.6.278

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyimporters-mesh 1.6.278
File Size Uploaded Provenance Actions
pyimporters_mesh-1.6.278.tar.gz 72.8 kB Without provenance Details for pyimporters_mesh-1.6.278.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyimporters-mesh 1.6.278
File Interpreter ABI Platform Actions
pyimporters_mesh-1.6.278-py3-none-any.whl Python 3 none any Details for pyimporters_mesh-1.6.278-py3-none-any.whl

Total release size: 78.5 kB

Release files / pyimporters_mesh-1.6.278.tar.gz

Download URL pyimporters_mesh-1.6.278.tar.gz
Size 72.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b398a773116cdaae3b4cd4e0aecaeed70770c28b4127890f8fd438ddd817277d
BLAKE2b-256 checksum
How to use checksums
d1d5599438a4a28fd03f0508e9c46c6f6e6f042733b00a1b3aa9d0f848823892
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pyimporters_mesh-1.6.278-py3-none-any.whl

Download URL pyimporters_mesh-1.6.278-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d41c85694eb922b0e092c261bd3608761cb3de2db5ff2789e1e7666f0ffdf9e
BLAKE2b-256 checksum
How to use checksums
2abb27c90310f3664f73d424e0680c91fce904fe73247156c562d7972b99d7ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pyimporters-mesh 1.6.278

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.

Release history Release notifications | RSS feed

This release

1.6.278 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page