EMDB Python Client
A Python client for accessing and interacting with the Electron Microscopy Data Bank (EMDB).
This package provides an easy-to-use interface to query EMDB entries, access metadata, and download associated files.
🚀 Features
- Retrieve EMDB entries by ID
- Query metadata such as resolution, sample description, and related PDBs
- Download associated files (maps, images, metadata)
- Utility models for plotting and file handling
- Access to validation analysis and annotation data
📚 Documentation
Full API documentation is available at:
👉 https://emdb.readthedocs.io/en/latest/
🔧 Installation
You can install the EMDB client via pip:
pip install emdb
✨ Quick Start
from emdb.client import EMDB
from emdb.exceptions import EMDBNotFoundError
client = EMDB()
try:
# Retrieve an entry by ID
entry = client.get_entry("EMD-8117")
print(entry.resolution)
# Access cross-reference annotations
annotations = entry.get_annotations()
for annotation in annotations:
print(annotation)
# Access validation data and plot FSC
validation = entry.get_validation()
validation.plots.fsc.plot()
# Download all files
entry.download_all_files(output_dir="/tmp/emd1234/")
# Perform a query to return EMDB entries
results = client.search("HIV")
for entry in results:
print(entry.id, entry.method, entry.resolution)
# Perform a query to return a DataFrame
table = client.csv_search("HIV")
print(table)
except EMDBNotFoundError:
print("Entry not found.")
🛠 Requirements
- Python 3.10+ See requirements.txt for full dependencies.
🤝 Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.
For detailed contributing guidelines, see CONTRIBUTING.md.
Running Tests
This project uses pytest for testing. To run the tests:
# Install test dependencies
pip install -e ".[test]"
# Run all tests
pytest
# Run with coverage report
pytest --cov=emdb --cov-report=html
# Run specific test file
pytest tests/test_client.py
📄 License
This project is licensed under the Apache License 2.0.
📧 Contact
For questions or feedback, please open an issue on GitHub or contact the maintainers.
Metadata
Release files for emdb 0.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| emdb-0.1.12.tar.gz | 24.8 kB | Without provenance | Details for emdb-0.1.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| emdb-0.1.12-py3-none-any.whl | Python 3 | none | any | Details for emdb-0.1.12-py3-none-any.whl |
Total release size: 47.2 kB
Release files / emdb-0.1.12.tar.gz
| Download URL | emdb-0.1.12.tar.gz |
|---|---|
| Size | 24.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a921676e1ac52e4115f8a79e10e946824233cfaebfac963d9f8c11ba95c00771
|
|
BLAKE2b-256 checksum How to use checksums |
b2d261efca40d0f215750a0ab2c86f5d5b0b90a2c96b52a530179103dbb95b51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / emdb-0.1.12-py3-none-any.whl
| Download URL | emdb-0.1.12-py3-none-any.whl |
|---|---|
| Size | 22.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bac2f2c828d9614e37a937e4c147e918641c6e30c0d85da0a7038829c46f9a57
|
|
BLAKE2b-256 checksum How to use checksums |
7578d5ad38af5a35a823a4e528333c9128e87a662eff839a2ee1588cf3a3c2fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for emdb 0.1.12
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.