Skip to content

Releases: Liozhang/omim-cli

v2.1.4

Choose a tag to compare

@Liozhang Liozhang released this 28 Jul 04:21

Download

Changes

  • Add 429 rate-limit retry (10s backoff, one retry) for both remote check and download
  • Use HEAD + Last-Modified for fast-path change detection
  • check_updates() returns (need, failed) so users can distinguish confirmed updates from check failures
  • Print full download URL on HTTP errors for manual download
  • Unify request rhythm: 1s sleep before every request

v2.1.3

Choose a tag to compare

@Liozhang Liozhang released this 24 Jul 15:55

What's Changed

Bug fixes

  • Fixed omim-cli query returning empty output due to SQLAlchemy expire_on_commit=True clearing column values after session close
  • Added isinstance(v, str) guard before json.loads(v) to prevent TypeError on NULL JSON fields

Upgrade

pip install -U omim-cli

OMIM-cli v2.1.2

Choose a tag to compare

@Liozhang Liozhang released this 21 Jul 13:36

What's Changed

Bug fixes

  • Fixed omim-cli faq crash (NameError)
  • Fixed omim-cli stats crash on empty database
  • version.json missing/corrupt now raises an error instead of silently falling back to 0.0.0

Improvements

  • omim-cli query: fixed file handle leak, removed duplicate DB queries, JSON output now preserves empty strings and
    0 values
  • omim-cli update: fixed external_links marker so entries without external links are not permanently skipped;
    removed redundant commits during API enrichment
  • Inheritance abbreviations now use short codes (PD, PR, SMu, SMo, Mu, IC, DD, DR)
  • API responses that are not JSON (e.g. CAPTCHA pages) now show a clear error with a link to open in browser
  • Database migration runs only once per session and validates identifiers against a whitelist

Docs

  • Rewrote the outdated web-scraper section in docs/OMIM_API.md

omim-cli v2.1.1

Choose a tag to compare

@Liozhang Liozhang released this 19 Jul 16:04

omim-cli v2.1.1

Fixed

  • Stop cleanly when the OMIM API quota is exhausted (429). Previously, a
    persistent 429 (daily quota used up) was caught as a generic error and the
    bulk update kept retrying every remaining batch — hammering the API and
    wasting a 10s backoff on each. Now a 429 that persists past the single retry
    raises a dedicated QuotaExhausted exception, and omim-cli update --with-api
    / --refresh abort the whole run gracefully:
    • already-fetched entries are committed (per-batch), so re-running later
      resumes from where it stopped (enriched entries are skipped)
    • a clear stopped early … re-run later to resume message is printed
  • Non-429 errors still skip the batch, but 5 consecutive failures also abort
    to avoid endless looping on persistent errors.

Install

pip install -U omim-cli      # → 2.1.1

Full changelog: v2.1.0...v2.1.1

omim-cli v2.1.0

Choose a tag to compare

@Liozhang Liozhang released this 17 Jul 17:48

omim-cli v2.1.0

A client for OMIM (Online Mendelian Inheritance in Man) that obtains data
exclusively through official, legal channels — the OMIM REST API and the
official text-file downloads. No HTML scraping, no bundled/redistributed data.

Highlights

  • Official data sources. mim2gene.txt / mimTitles.txt / genemap2.txt /
    morbidmap.txt provide structured data; the API provides text sections,
    clinical synopsis (with HPO/SNOMED/ICD ontology IDs), allelic variants,
    references, and 30+ external cross-references.
  • Store everything. All source-provided fields are persisted (status,
    external_links, full gene record, dates, contributors, edit history, etc.).
  • Incremental by design.
    • text import is skipped when files are unchanged
    • --with-api only enriches entries not yet enriched
    • --refresh probes dateUpdated in batches of 20 (include=dates) and
      re-fetches only entries OMIM has updated
  • Commands: download, update, query, stats, faq, api
    (entry/search/gene-map/clinical-synopsis/allelic-variants/
    references/batch/config/status).
  • Configurable DB path via OMIM_DB env var or --dbfile.

Install

pip install -U omim-cli          # Python ≥ 3.8
omim-cli api config --set-key YOUR_KEY   # free key from https://omim.org/downloads
omim-cli download
omim-cli update                  # add --with-api for deep content
omim-cli stats

Data & license

  • Code: MIT (see LICENSE). Copyright © suqingdong (original omim) and Liozhang (omim-cli fork).
  • OMIM data is copyrighted by Johns Hopkins University and is not
    redistributed by this package — each user downloads their own copy. Use of
    OMIM data is governed by the OMIM User Agreement.