https://github.com/vladimarius/imapy
Imapy: Imap for Humans
https://github.com/vladimarius/imapy
Last synced: about 2 months ago
JSON representation
Imapy: Imap for Humans
- Host: GitHub
- URL: https://github.com/vladimarius/imapy
- Owner: vladimarius
- Created: 2015-05-14T13:08:24.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-08-12T10:33:19.000Z (9 months ago)
- Last Synced: 2024-08-12T11:55:48.845Z (9 months ago)
- Language: Python
- Homepage:
- Size: 235 KB
- Stars: 229
- Watchers: 11
- Forks: 22
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- Authors: AUTHORS.rst
Awesome Lists containing this project
- starred-awesome - imapy - Imapy: Imap for Humans (Python)
README
# Imapy: IMAP for Humans
[](https://codecov.io/github/vladimarius/imapy)
Imapy is a Python library that simplifies working with the IMAP protocol, making it more accessible and user-friendly.
## Features
- Easy-to-use interface for IMAP operations
- Support for searching and filtering emails
- Handling of email attachments
- Folder management capabilities## Requirements
- Python 3.9 or higher
## Installation
You can install Imapy using pip:
```
pip install imapy
```## Quick Start
```python
import imapy# Connect to an IMAP server
em = imapy.connect(
host='imap.example.com',
username='your_username',
password='your_password',
ssl=True
)# List all folders
folders = em.folders()# Select a folder and get emails
emails = em.folder('Inbox').emails()# Perform operations on emails
for email in emails:
print(f"Subject: {email.subject}")
print(f"From: {email.sender}")# Logout
em.logout()
```## Development
This project uses [Poetry](https://python-poetry.org/) for dependency management and [Black](https://github.com/psf/black) for code formatting.
To set up the development environment:
1. Ensure you have Python 3.9 or higher installed
2. Install Poetry
3. Clone the repository
4. Run `poetry install` to install dependencies
5. Run `poetry run pre-commit install` to set up the pre-commit hooksTo format the code, run:
```
poetry run format
```## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License.