mygene
Python Client for MyGene.Info services.
What it is and what it does
Mygene is a thin Python wrapper around the MyGene.Info REST web service, which provides gene annotation data. Since v3.1.0, it has been built on top of biothings-client, a universal client for BioThings APIs. The package lets you query gene information by ID (Entrez, Ensembl, etc.), retrieve specific fields, and search across multiple species. Results can be returned as dictionaries or as pandas DataFrames.
The package is designed for bioinformatics workflows where you need to look up or cross-reference gene identifiers and their associated metadata. It handles both single-gene queries and batch operations, making it suitable for annotation pipelines and exploratory analysis. The underlying REST API is remote, so network access is required.
Use it for:
- Map gene IDs between different identifier systems (Entrez, Ensembl, gene symbol) for annotation pipelines.
- Retrieve gene metadata such as names, RefSeq accessions, and protein sequences for a list of gene identifiers.
- Search for genes by symbol or name across multiple species to identify orthologs or related genes.
- Export gene annotation results as a pandas DataFrame for downstream analysis or reporting.
- Integrate gene data lookup into bioinformatics workflows without maintaining a local gene database.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Mygene is a Python wrapper for the MyGene.Info REST API that retrieves and queries gene annotation data, including symbols, names, and cross-references across multiple species.
Yes, if you need to query gene annotations and can tolerate dormant maintenance. The package is stable and has low install friction, but verify that the remote MyGene.Info API remains compatible with your use case. For active development, consider using biothings-client directly, which mygene wraps.
Install
mygene on PyPI
pip
pip install mygeneuv
uv add mygenepoetry
poetry add mygeneInstalling mygene
Before you install
Low install friction with a single runtime dependency. Maintenance is dormant—the latest release was in April 2021—but the repository remains active with recent commits and the package is marked Production/Stable.
License in practice
BSD license is permissive, allowing use in both open-source and proprietary projects with minimal restrictions.
Quickstart
pip install mygene
import mygene
mg = mygene.MyGeneInfo()
result = mg.getgene(1017, fields='name,symbol')
print(result)
Verify before relying
- Whether the package continues to work reliably against the current MyGene.Info API despite dormant maintenance status.
- Current compatibility with Python versions beyond 3.9, given classifiers only list up to 3.9 and no recent releases.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — biothings-client |
| Maintenance | dormant — 1,957 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,468,965/month — #3,871 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mygene-3.2.2-py2.py3-none-any.whl
Keywords: biology, gene, annotation, web, service, client, api
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
biothings-clientbiothings_client provides Python wrappers to…
permissive · top 5,000 on PyPI
gprofiler-officialPython interface to g:Profiler toolkit for…
permissive · top 5,000 on PyPI
pyensemblPyEnsembl provides a Python interface to query…
permissive · top 15,000 on PyPI
gtfparseParses GTF (gene transfer format) files into…
permissive · top 15,000 on PyPI
bioA command-line toolkit that simplifies common…
permissive · top 5,000 on PyPI
biotiteBiotite provides a unified Python library for…
permissive · top 5,000 on PyPI
refgenieRefgenie manages standardized folder structures…
permissive · top 15,000 on PyPI
biontyBionty provides access to and management of…
unclear · top 15,000 on PyPI
gseapyPerforms gene set enrichment analysis (GSEA) on…
permissive · top 15,000 on PyPI
logomakerLogomaker creates customized sequence…
permissive · top 15,000 on PyPI