Skip to main content

Modernized InterMine WebService client (Python 3.14+)

Project description

intermine314

CI PyPI version License: MIT

Python 3.14+ client for InterMine web services.

Modern InterMine client focused on reliable, high-throughput research workflows.

Ownership and Credit

Copyright (c) 2026 Monash University, Plant Energy and Biotechnology Lab.

Owners:

  • Kris Kari
  • Dr. Maria Ermakova
  • Plant Energy and Biotechnology Lab, Monash University
  • Contact: toffe.kari@gmail.com

Original credit:

  • Original InterMine team and community contributors.

License

Licensed under the MIT License (see LICENSE-LGPL, which now contains the active MIT license text and notice).

Requirements

  • Python 3.14+
  • Core workflow dependencies are required by default: polars, duckdb (Parquet path).

Supported Mines

Priority support is focused on:

  • MaizeMine
  • ThaleMine
  • LegumeMine
  • OakMine
  • WheatMine

WheatMine service endpoint for API clients:

  • https://urgi.versailles.inrae.fr/WheatMine/service (no trailing slash)

MaizeMine service endpoint for API clients:

  • https://maizemine.rnet.missouri.edu/maizemine/service (no trailing slash)
  • fallback: http://maizemine.rnet.missouri.edu:8080/maizemine/service

Installation

pip install intermine314

Optional extras:

# Faster JSON decode path
pip install "intermine314[speed]"

Repository: https://github.com/kriskari/intermine314

Quick Example

from intermine314.webservice import Service

service = Service("https://maizemine.rnet.missouri.edu/maizemine/service")
query = service.new_query("Gene")
query.add_view("Gene.primaryIdentifier", "Gene.symbol", "Gene.length")

parallel_options = {
    "pagination": "auto",
    "profile": "large_query",
    "ordered": "unordered",
    "inflight_limit": 8,
}

for row in query.run_parallel(row="dict", **parallel_options):
    process(row)

Parallel Worker Defaults

intermine314 uses adaptive defaults when max_workers is omitted:

  • LegumeMine: 4 workers.
  • MaizeMine, ThaleMine, OakMine, WheatMine: 16 workers up to 50,000 rows, then 12.
  • Unknown mines: fallback to 16 workers.

Parallel query APIs default to pagination="auto". Tune by hardware/network: 4-8 for constrained systems, 16-32 for high-core systems, and lower workers if the mine rate-limits.

Throughput tip: for highest raw throughput, use ordered=False (or ordered="unordered").

Presets: config/parallel-profiles.toml. Mine policies: config/mine-parallel-preferences.toml.

Configuration Files

  • config/runtime-defaults.toml
    • Runtime defaults for omitted query parameters.
    • Override path: INTERMINE314_RUNTIME_DEFAULTS_PATH=/abs/path/to/runtime-defaults.toml.
  • config/mine-parallel-preferences.toml
    • Mine registry and production worker policies.
    • Shared defaults in [defaults.mine]; per-mine overrides in [mines.<name>].
  • config/parallel-profiles.toml
    • Parallel profile presets.

Settable Parameters

1) Package Runtime Defaults (config/runtime-defaults.toml)

Loaded at import time and used when arguments are omitted:

  • default_parallel_workers
  • default_parallel_page_size
  • default_parallel_pagination (auto|offset|keyset)
  • default_parallel_profile (default|large_query|unordered|mostly_ordered)
  • default_parallel_ordered_mode (ordered|unordered|window|mostly_ordered)
  • default_large_query_mode (true|false)
  • default_parallel_prefetch (integer or "auto")
  • default_parallel_inflight_limit (integer or "auto")
  • default_order_window_pages
  • default_keyset_batch_size
  • keyset_auto_min_size

2) Service Constructor

Set on Service(...):

  • root
  • username, password
  • token
  • prefetch_depth
  • prefetch_id_only

3) Per-call Query Parameters

Set on query calls (run_parallel, iter_batches, dataframe, to_parquet, to_duckdb):

  • start, size, page_size
  • max_workers
  • ordered
  • prefetch
  • inflight_limit
  • ordered_window_pages
  • profile
  • large_query_mode
  • pagination
  • keyset_path
  • keyset_batch_size
  • batch_size (batch helpers / exporters)
  • compression (Parquet: zstd|snappy|gzip|brotli|lz4|uncompressed)

Benchmark and performance-optimization workflows are documented in BENCHMARK.md.

Testing

Run unit tests:

python -m pytest -q tests

Run dataframe/parquet compatibility smoke check:

python setup.py analyticscheck

Run live tests (if endpoint/test credentials are available):

INTERMINE314_RUN_LIVE_TESTS=1 TESTMODEL_URL="https://<mine>/service" python -m pytest -q tests

Run via tox (if installed):

python -m tox -e py314
python -m tox -e py314-analytics
python -m tox -e lint

Notes

Legacy upstream doc/tutorial links are intentionally omitted while this Python 3.14 line is being stabilized. Published sdist is slimmed to runtime-relevant package/config files (docs/tests/samples/benchmarking excluded).

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

intermine314-0.1.4.tar.gz (89.5 kB view details)

Uploaded Source

Built Distribution

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

intermine314-0.1.4-py3-none-any.whl (91.7 kB view details)

Uploaded Python 3

File details

Details for the file intermine314-0.1.4.tar.gz.

File metadata

  • Download URL: intermine314-0.1.4.tar.gz
  • Upload date:
  • Size: 89.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for intermine314-0.1.4.tar.gz
Algorithm Hash digest
SHA256 69050046038dc909e4cccca9441cfea614767159cc22e53e961d98dcc99a6376
MD5 f59c9dd7970b6928951f3d2ffa3a5fae
BLAKE2b-256 335db184785155a457d56ec999842e653fc1035fc5ac90833221b655d1a60fc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for intermine314-0.1.4.tar.gz:

Publisher: publish-pypi.yml on karikris/intermine314

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file intermine314-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: intermine314-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 91.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for intermine314-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b4272a79b121fa93b9ace0fe114c733497eed435433346db77716abaa44ee2be
MD5 505e442b95466a920d67a7c6af8de592
BLAKE2b-256 d72445e56b3cb39d10bae0bd6c0ade2a86b319036635d4a46916fcbd771c3db3

See more details on using hashes here.

Provenance

The following attestation bundles were made for intermine314-0.1.4-py3-none-any.whl:

Publisher: publish-pypi.yml on karikris/intermine314

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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