Skip to main content

Ensembl Python Base Library

License Coverage CI Release

Centralise generic Python code use across all other project within Ensembl, more particularly database access layers and ORMs, reusable eHive components, etc.

Getting Started

Installing the development environment with venv

python -m venv <VIRTUAL_ENVIRONMENT_NAME>
source <VIRTUAL_ENVIRONMENT_NAME>/bin/activate
git clone https://github.com/Ensembl/ensembl-py.git
cd ensembl-py
pip install -e .[cicd,dev,docs]

Testing with pytest

Run test suite from the root of the repository is as simple as to run:

pytest

To run tests, calculate and display testing coverage stats:

coverage run -m pytest
coverage report -m

Generate documentation via mkdocs

mkdocs build

Open automatically generated documentation page at site/index.html.

Automatic formatting (PEP8 compliance)

black --check .

Use --diff to print a diff of what Black would change, without actually changing the files.

To actually reformat all files in the repository:

black .

Linting and type checking

pylint src/python/ensembl
pylint --recursive=y src/python/tests
mypy src/python/ensembl
mypy src/python/tests

pylint will check the code for syntax, name errors and formatting style. mypy will use type hints to statically type check the code.

It should be relatively easy (and definitely useful) to integrate both pylint and mypy in your IDE/Text editor.

Useful resources

Python Documentation

Python virtual environments management

Auto-generating documentation

Linting, type checking and formatting

Testing

CI/CD

Development tools

Distributing

Metadata

Release files for ensembl-py 3.2.0

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

Source distribution (sdist)

Source distribution for ensembl-py 3.2.0
File Size Uploaded Provenance Actions
ensembl_py-3.2.0.tar.gz 51.6 kB With provenance Details for ensembl_py-3.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ensembl-py 3.2.0
File Interpreter ABI Platform Actions
ensembl_py-3.2.0-py3-none-any.whl Python 3 none any Details for ensembl_py-3.2.0-py3-none-any.whl

Total release size: 78.2 kB

Release files / ensembl_py-3.2.0.tar.gz

Download URL ensembl_py-3.2.0.tar.gz
Size 51.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e182952d192a2716a5f15d073de2a2edc1f9dc2d1e37c0326a0e65be05479c6c
BLAKE2b-256 checksum
How to use checksums
8edd14a38fe730b5b6e6741bf44eadfa02d9fd69cfdd5fafa69aeb216fbda761
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / ensembl_py-3.2.0-py3-none-any.whl

Download URL ensembl_py-3.2.0-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f5ce8bea7b03b51c0da12fdd38016ea49eab2a8dd7cbbea97910fcdf229f924
BLAKE2b-256 checksum
How to use checksums
76f663e4ce5955d655f891837a4ff5a383796f976622d05405d872daf2429e2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for ensembl-py 3.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ensembl_py-3.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

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.

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