{"library":"mail-parser-reply","title":"mail-parser-reply","description":"mail-parser-reply is a Python library (current version 1.36) designed to parse and split incoming email messages into individual replies. It supports multiple languages and makes it easier to extract relevant text content, with options to strip headers, signatures, and disclaimers. The library is actively maintained, providing an improved, fully type-annotated implementation over older email reply parsing tools.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install mail-parser-reply"],"cli":null},"imports":["from mailparser_reply import EmailReplyParser"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from mailparser_reply import EmailReplyParser\n\nmail_body = \"\"\"Awesome! I haven't had another problem with it. Thanks, alfonsrv\n\nOn Wed, Dec 20, 2023 at 13:37, RAUSYS <info@rausys.de> wrote:\n> The good news is that I've found a much better query for lastLocation.\n> It should run much faster now. Can you double-check?\n\"\"\"\n\n# Instantiate the parser with desired languages\nparser = EmailReplyParser(languages=['en', 'de'])\n\n# Parse the entire email and get a list of EmailReply objects\nemail_message = parser.read(text=mail_body)\nprint(\"All replies:\")\nfor reply in email_message.replies:\n    print(f\"- {reply.text}\")\n\n# Or get only the latest reply as a string\nlatest_reply = parser.parse_reply(text=mail_body)\nprint(\"\\nLatest reply:\")\nprint(latest_reply)","lang":"python","description":"This quickstart demonstrates how to instantiate `EmailReplyParser` with a list of languages and then use `read()` to get all parsed replies or `parse_reply()` to extract only the most recent reply from a given email body text.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}