Ensembl Python Base Library
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.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ensembl_py-3.1.0.tar.gz | 51.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ensembl_py-3.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 78.2 kB
Release files / ensembl_py-3.1.0.tar.gz
| Download URL | ensembl_py-3.1.0.tar.gz |
|---|---|
| Size | 51.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
319cb31e8a176aa1e09d336cfdd4ed84ec0dc7448aa313b96846387d9405e24a
|
|
BLAKE2b-256 checksum How to use checksums |
fcf86b1a8363b27f221137369c6914bc9bd114d0526e0b1b6c6b88908f21ced2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 13, 2026.
Transparency logRelease files / ensembl_py-3.1.0-py3-none-any.whl
| Download URL | ensembl_py-3.1.0-py3-none-any.whl |
|---|---|
| Size | 26.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bfc2591041b41029a0f6817be6ade719fa3faa6b15d0cbeeb736163c260ea0da
|
|
BLAKE2b-256 checksum How to use checksums |
d4da01a057e7e1acbc98724f9a9195722d17453f6ad4add5e0a46c3ab7b0b26f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Jul 13, 2026.
Transparency log