Metadata-Version: 2.4
Name: emdb
Version: 0.1.7
Summary: A Python client for accessing the Electron Microscopy Data Bank (EMDB)
Author-email: Neli Fonseca <neli@ebi.ac.uk>
License: Apache 2
Project-URL: Homepage, https://www.ebi.ac.uk/emdb/
Project-URL: Documentation, https://emdb.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/emdb-empiar/emdb-api-wrapper
Project-URL: Bug Tracker, https://github.com/emdb-empiar/emdb-api-wrapper/issues
Keywords: EMDB,Electron Microscopy,Bioinformatics,Client
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests<3.0,>=2.0
Requires-Dist: matplotlib<4.0,>=3.5
Requires-Dist: pandas<3.0,>=2.3
Requires-Dist: pydantic<3.0,>=2.0
Requires-Dist: sphinx<9.0,>=8.0
Dynamic: license-file

# EMDB Python Client

A Python client for accessing and interacting with the [Electron Microscopy Data Bank (EMDB)](https://www.ebi.ac.uk/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/](https://emdb.readthedocs.io/en/latest/)

## 🔧 Installation
You can install the EMDB client via pip:

```bash
pip install emdb
```

## ✨ Quick Start
```python
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.")
```

## 🧪 Tests
COMING SOON

## 🛠 Requirements
- Python 3.8+
See [requirements.txt](requirements.txt) for full dependencies.

## 🤝 Contributing
Contributions are welcome!
Feel free to open issues or submit pull requests.

## 📄 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.

