{"id":16096855,"url":"https://github.com/miksus/red-box","last_synced_at":"2025-04-10T02:23:21.528Z","repository":{"id":60139860,"uuid":"541225970","full_name":"Miksus/red-box","owner":"Miksus","description":"Next generation email box manager","archived":false,"fork":false,"pushed_at":"2024-01-18T12:04:24.000Z","size":100,"stargazers_count":104,"open_issues_count":12,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-03T00:05:13.207Z","etag":null,"topics":["email","email-parsing","imap","imaplib","python"],"latest_commit_sha":null,"homepage":"https://red-box.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Miksus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"Miksus"}},"created_at":"2022-09-25T15:58:42.000Z","updated_at":"2025-02-22T18:28:46.000Z","dependencies_parsed_at":"2024-10-26T19:31:24.997Z","dependency_job_id":"8dc91a5e-1ede-4633-a92d-ebfe323925c0","html_url":"https://github.com/Miksus/red-box","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"07a865c3b7000324ce582fecb0ec24e3ef6203f1"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miksus%2Fred-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miksus%2Fred-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miksus%2Fred-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Miksus%2Fred-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Miksus","download_url":"https://codeload.github.com/Miksus/red-box/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143338,"owners_count":21054761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","email-parsing","imap","imaplib","python"],"created_at":"2024-10-09T17:44:01.202Z","updated_at":"2025-04-10T02:23:21.494Z","avatar_url":"https://github.com/Miksus.png","language":"Python","funding_links":["https://github.com/sponsors/Miksus"],"categories":[],"sub_categories":[],"readme":"\n# Red Box: Advanced Email Box Reader\n\u003e Next generation email box reader/manager\n\n---\n\n[![Pypi version](https://badgen.net/pypi/v/redbox)](https://pypi.org/project/redbox/)\n[![build](https://github.com/Miksus/red-box/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/Miksus/red-box/actions/workflows/main.yml)\n[![codecov](https://codecov.io/gh/Miksus/red-box/branch/master/graph/badge.svg?token=IMR1CQT9PY)](https://codecov.io/gh/Miksus/red-box)\n[![Documentation Status](https://readthedocs.org/projects/red-box/badge/?version=latest)](https://red-box.readthedocs.io)\n[![PyPI pyversions](https://badgen.net/pypi/python/redbox)](https://pypi.org/project/redbox/)\n\n- [Documentation](https://red-box.readthedocs.io)\n- [Source code](https://github.com/Miksus/red-box)\n- [Releases](https://pypi.org/project/redbox/)\n\n## What is it?\nRed Box is an advanced email box reader library. It is a sister library for [Red Mail, advanced email sender](https://github.com/Miksus/red-mail). It makes managing your email box in Python very easy.\n\nCore features:\n\n- Easy email searching\n- Intuitive message manipulation\n- Intuitive email box manipulation\n\nInstall it from PyPI:\n\n```shell\npip install redbox\n```\n\n## Why Red Box?\n\nImaplib from standard library is complex to use and unintuitive. \nRed Box makes reading email boxes easy. \n\nWith Red Box, it is simple as this:\n\n```python\nfrom redbox import EmailBox\n\n# Create an email box instance\nbox = EmailBox(host=\"localhost\", port=0)\n\n# Select an email folder\ninbox = box['INBOX']\n\n# Get emails\nemails = inbox.search(\n    from_=\"mikael.koli@example.com\",\n    subject=\"Red Box released\",\n    unseen=True\n)\n```\n\n## More Examples\n\nThere is also a query language for arbitrary search queries:\n\n```python\nfrom redbox.query import FROM, UNSEEN, FLAGGED\n\nemails = inbox.search(\n    FROM('mikael.koli@example.com') \u0026 (UNSEEN | FLAGGED)\n)\n```\n\nRed Box also makes reading different parts of the email messages\neasy:\n\n```python\n# Get one email\nemail = emails[0]\n\n# String representation of the message\nprint(email.content)\n\n# Email contents\nprint(email.text_body)\nprint(email.html_body)\n\n# Email headers\nprint(email.from_)\nprint(email.to)\nprint(email.date)\n```\n\nHere is a complete example:\n\n```python\n\nfrom redbox import EmailBox\n\nbox = EmailBox(host=\"localhost\", port=0)\ninbox = box['INBOX']\n\nfor msg in inbox.search(subject=\"example 2\", unseen=True):\n\n    # Process the message\n    print(msg.subject)\n    print(msg.text_body)\n\n    # Set the message as read/seen\n    msg.read()\n```\n\n---\n\nSee more from the documentation.\n\nIf the library helped you save time, consider buying a coffee for the maintainer ☕.\n\n## Author\n\n* **Mikael Koli** - [Miksus](https://github.com/Miksus) - koli.mikael@gmail.com\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiksus%2Fred-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiksus%2Fred-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiksus%2Fred-box/lists"}