{ "info": { "author": "Swimlane", "author_email": "info@swimlane.com", "bugtrack_url": null, "classifiers": [], "description": "# py-ews\n\n[![Documentation Status](https://readthedocs.org/projects/py-ews/badge/?version=latest)](https://py-ews.readthedocs.io/en/latest/?badge=latest)\n\n\n```\n.______ ____ ____ ___________ __ ____ _______.\n| _ \\ \\ \\ / / | ____\\ \\ / \\ / / / |\n| |_) | \\ \\/ / ______| |__ \\ \\/ \\/ / | (----`\n| ___/ \\_ _/ |______| __| \\ / \\ \\ \n| | | | | |____ \\ /\\ / .----) | \n| _| |__| |_______| \\__/ \\__/ |_______/ \n``` \nA Python package to interact with Exchange Web Services\n\n**py-ews** is a cross platform python package to interact with both Exchange 2010 to 2019 on-premises and Exchange Online (Office 365). This package will wrap all Exchange Web Service endpoints, but currently is focused on providing eDiscovery endpoints. \n\n\n\n**py-ews** has the following notable features in it's current release:\n\n* Autodiscover support\n* Delegation support\n* Impersonation support\n* Retrieve all mailboxes that can be searched based on credentials provided\n* Search a list of (or single) mailboxes in your Exchange environment using all supported search attributes\n* Delete email items from mailboxes in your Exchange environment\n* Retrieve mailbox inbox rules for a specific account\n\nCurrently this package supports the following ServiceEndpoints:\n\n* Autodiscover\n* DeleteItem\n* GetInboxRules\n* GetSearchableMailboxes\n* ResolveNames\n* SearchMailboxes\n\n\n## Installation\n\nOS X & Linux:\n\n```sh\npip install py-ews\n```\n\nWindows:\n\n```sh\npip install py-ews\n```\n\n## Usage example\n\nThe first step in using **py-ews** is that you need to create a `UserConfiguration` object. Think of this as all the connection information for Exchange Web Services. An example of creating a `UserConfiguration object` using Office 365 `Autodiscover` is:\n\n```python\nfrom pyews import UserConfiguration\n\nuserconfig = UserConfiguration(\n 'myaccount@company.com',\n 'Password1234'\n)\n```\n\n\nIf you would like to use an alternative `Autodiscover` endpoint (or any alternative endpoint) then please provide one using the `endpoint` named parameter:\n\n```python\nfrom pyews import UserConfiguration\n\nuserconfig = UserConfiguration(\n 'myaccount@company.com',\n 'Password1234',\n endpoint='https://outlook.office365.com/autodiscover/autodiscover.svc'\n)\n```\n\nFor more information about creating a `UserConfiguration` object, please see the full documentation on our ReadTheDocs page.\n\nNow that you have a `UserConfiguration` object, we can now use a `ServiceEndpoint`. This example will demonstrate how you can identify which mailboxes you have access to by using the `GetSearchableMailboxes` EWS endpoint.\n\nOnce you have identified a list of mailbox reference ids, then you can begin searching all of those mailboxes by using the `SearchMailboxes` EWS endpoint.\n\nThe returned results will then be deleted (moved to Deleted Items folder) from Exchange using the `DeleteItem` EWS endpoint.\n\n```python\n\nfrom pyews import UserConfiguration\n\nuserconfig = UserConfiguration(\n 'myaccount@company.com',\n 'Password1234'\n)\n\n# get searchable mailboxes based on your accounts permissions\nreferenceid_list = []\nfor mailbox in GetSearchableMailboxes(userconfig).response:\n referenceid_list.append(mailbox['ReferenceId'])\n\n# let's search all the referenceid_list items\nmessages_found = []\nfor search in SearchMailboxes('subject:account', userconfig, referenceid_list).response:\n messages_found.append(search['MessageId'])\n # we can print the results first if we want\n print(search['Subject'])\n print(search['MessageId'])\n print(search['Sender'])\n print(search['ToRecipients'])\n print(search['CreatedTime'])\n print(search['ReceivedTime'])\n #etc.\n\n# if we wanted to now delete a specific message then we would call the DeleteItem \n# class like this but we can also pass in the entire messages_found list\ndeleted_message_response = DeleteItem(messages_found[2], userconfig).response\n\nprint(deleted_message_response)\n```\n\nThe following is an example of the output returned when calling the above code:\n\n```output\nYOUR ACCOUNT IS ABOUT TO EXPIRE! UPGRADE NOW!!!\nAAMkAGZjOTlkOWExLTM2MDEtNGI3MS0..............\nJosh Rickard\nResearch\n2019-02-28T18:28:36Z\n2019-02-28T18:28:36Z\nUpgrade Your Account!\nAAMkADAyNTZhNmMyLWNmZTctNDIyZC0..............\nJosh Rickard\nJosh Rickard \n2019-01-24T18:41:11Z\n2019-01-24T18:41:11Z\nNew or modified user account information\nAAMkAGZjOTlkOWExLTM2MDEtNGI3MS04.............. \nMicrosoft Online Services Team\nResearch\n2019-01-24T18:38:06Z\n2019-01-24T18:38:06Z\n[{'MessageText': 'Succesfull'}]\n```\n\n_For more examples and usage, please refer to the [Wiki][wiki]._\n\n## Development setup\n\nI have provided a [Dockerfile](Dockerfile) with all the dependencies and it is currently calling `bin\\pyews_test.py`. If you want to test new features, I recommend that you use this Dockerfile instead of a virtualenv. You can call the following to build a new container, but keep the dependencies unless they have changed in your requirements.txt or any other changes to the Dockerfile.\n\n```sh\ndocker build --force-rm -t pyews .\n```\n\nTo run the container, use the following:\n\n```sh\ndocker run pyews\n```\n\n## Release History\n\n* 1.0.0\n * Initial release of py-ews to PyPi\n* 1.0.1\n * Updating Documentation with new reference links\n\n## Meta\n\nJosh Rickard \u2013 [@MSAdministrator](https://twitter.com/MSAdministrator) \u2013 rickardja@live.com\n\nDistributed under the MIT license. See ``LICENSE`` for more information.\n\n## Contributing\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/swimlane/pyews", "keywords": "ews,exchange,office365,email,ediscovery,swimlane", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "py-ews", "package_url": "https://pypi.org/project/py-ews/", "platform": "", "project_url": "https://pypi.org/project/py-ews/", "project_urls": { "Homepage": "https://github.com/swimlane/pyews" }, "release_url": "https://pypi.org/project/py-ews/1.0.7/", "requires_dist": [ "requests", "beautifulsoup4", "lxml", "pyyaml" ], "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "summary": "A Python package to interact with both on-premises and Office 365 Exchange Web Services", "version": "1.0.7" }, "last_serial": 5668965, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "ee9149466de7295d2aea4dd9b763f4ed", "sha256": "fb00298db6df020ec9bc5089ceeb03ecc641b3e3583a1e70d9029279bc778e6e" }, "downloads": -1, "filename": "py_ews-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ee9149466de7295d2aea4dd9b763f4ed", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27210, "upload_time": "2019-04-30T14:57:32", "url": "https://files.pythonhosted.org/packages/75/8d/791591c260fce9577f982be30c54609415f82af2f994450815bf3c886b21/py_ews-1.0.0-py3-none-any.whl" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "da85097aa8915d42675f5a77042ff602", "sha256": "61d0b2a4cc79f9ce9755473dfc85662ffed46424cf7bd1be2daa8084d3c60b51" }, "downloads": -1, "filename": "py_ews-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "da85097aa8915d42675f5a77042ff602", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27313, "upload_time": "2019-04-30T15:27:54", "url": "https://files.pythonhosted.org/packages/bb/34/b210b764b0a3d5cb374641c9e69cc188546463874eb808b9068cea12c1a3/py_ews-1.0.1-py3-none-any.whl" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "b7b6f33157ca1e8bbaea43789cc27abc", "sha256": "16a6cdbb866cb21c7d03891c04488a5f7c3410b5c345547be6665c2234f24acf" }, "downloads": -1, "filename": "py_ews-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b7b6f33157ca1e8bbaea43789cc27abc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 27390, "upload_time": "2019-04-30T15:57:09", "url": "https://files.pythonhosted.org/packages/dc/55/885e35fa2357ed7830fb649861721cd11ad80dbc08611a17476ef1aca3a8/py_ews-1.0.2-py3-none-any.whl" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "9bb73709a39577ce166ebad9cf187ee3", "sha256": "bf56555dbfa021204d43ad93166e086ca9a31f2e84e700c1b9aacbbfc50d6512" }, "downloads": -1, "filename": "py_ews-1.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "9bb73709a39577ce166ebad9cf187ee3", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 27450, "upload_time": "2019-05-22T20:45:03", "url": "https://files.pythonhosted.org/packages/49/a5/3537adbe5ab5738c26c778690f3c2f84464be0ee72925281476a471ba337/py_ews-1.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "acdf5af2de2eb4cd46ed2a583ecc2a5f", "sha256": "f33ef50a32ff8fbf51074474e9cbd1d8e11e9aa5d0cf2121fb34c4c402e9810f" }, "downloads": -1, "filename": "py-ews-1.0.3.tar.gz", "has_sig": false, "md5_digest": "acdf5af2de2eb4cd46ed2a583ecc2a5f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 18927, "upload_time": "2019-05-22T20:45:05", "url": "https://files.pythonhosted.org/packages/a6/59/f696eec2486d09aa61a8106ccdbe9816ad7e473d2414114c6380b196bc84/py-ews-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "667d2088bb220c10400bd1e61f8d02a6", "sha256": "57ff9c055af26d15368c8594d46a5265d929043880c3ebd9225f8cbd77a18f56" }, "downloads": -1, "filename": "py_ews-1.0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "667d2088bb220c10400bd1e61f8d02a6", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 27481, "upload_time": "2019-05-30T21:40:48", "url": "https://files.pythonhosted.org/packages/87/c3/ea580f6838890220b890f558c5164ec828acc386e94aa432807536fdc2c4/py_ews-1.0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5ffafda46d4252dadbfc2c0938fe2274", "sha256": "72fd29202b33cef12f5f9e9e2a54d02434e4363aa234d1d2c7abfcb4eb1adc50" }, "downloads": -1, "filename": "py_ews-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "5ffafda46d4252dadbfc2c0938fe2274", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 27480, "upload_time": "2019-05-30T21:40:50", "url": "https://files.pythonhosted.org/packages/1f/34/b7c54bc16f25f80e6169047c6bb7ebf0e5de884d00b78f6e51250c26c3f9/py_ews-1.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a4e001945d408c330c45afc3db78b08b", "sha256": "945922b8f79865737ba33e01d16d4245e014a81e7238f8befa0fe9fa837573b4" }, "downloads": -1, "filename": "py-ews-1.0.4.tar.gz", "has_sig": false, "md5_digest": "a4e001945d408c330c45afc3db78b08b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 17404, "upload_time": "2019-05-30T21:40:51", "url": "https://files.pythonhosted.org/packages/73/80/6ff5bb4a93c8037bc10a3fe34af7476fa2af7770a98cf8e4d95a8d07fc4b/py-ews-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "261d4daa0f6ebe92412e97f1ff77dad0", "sha256": "4eb58c6a92f4744f6cc6b0657fba42da2fbd0f0269d243100c99510fc87e56ae" }, "downloads": -1, "filename": "py_ews-1.0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "261d4daa0f6ebe92412e97f1ff77dad0", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 27540, "upload_time": "2019-06-12T16:30:13", "url": "https://files.pythonhosted.org/packages/44/88/8e7dc05e6efc260619a104d3153dc79a319818a0c8829b6399480ba67d81/py_ews-1.0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "75246b6c969787032f7edbbeb5a352cd", "sha256": "c87755b04ebd8062913c4cfbc05029c9690fad1e8360992ea4aa3e27ab23ecb4" }, "downloads": -1, "filename": "py_ews-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "75246b6c969787032f7edbbeb5a352cd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 27540, "upload_time": "2019-06-12T16:30:15", "url": "https://files.pythonhosted.org/packages/12/dc/adf6af0b7e25c84a5be23e727c7beb03937a4e0477f3fce6d2bafe598dd2/py_ews-1.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2c6a6490939c257fc88183daf73a6e8d", "sha256": "e19c0879b3895401d813c732c948b8cb8c9b728cf15e2e17c0cee3ed14ceaefe" }, "downloads": -1, "filename": "py-ews-1.0.5.tar.gz", "has_sig": false, "md5_digest": "2c6a6490939c257fc88183daf73a6e8d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 17452, "upload_time": "2019-06-12T16:30:16", "url": "https://files.pythonhosted.org/packages/49/de/dc6096b31a96c417ab5bdfeffeff7615efdd79be5233439c81c79c027552/py-ews-1.0.5.tar.gz" } ], "1.0.6": [ { "comment_text": "", "digests": { "md5": "2ee532189b491c8cd9918e7324e206db", "sha256": "b9b94ac2f795457a12de3810ae077463b67f2df63d8e8920c010e5b0462d18e4" }, "downloads": -1, "filename": "py_ews-1.0.6-py2-none-any.whl", "has_sig": false, "md5_digest": "2ee532189b491c8cd9918e7324e206db", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 27187, "upload_time": "2019-06-12T16:44:05", "url": "https://files.pythonhosted.org/packages/70/e7/6f4dc86e7e4461d23daec2c476ec0415e8971aa824ee79628891ff8b2320/py_ews-1.0.6-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a97758a79143cf29f4b0e9e5000dd318", "sha256": "51d2fb0d2dd4dd74c376cded58bd72c445da1343054ba6be4b73c007f8cb4bb0" }, "downloads": -1, "filename": "py_ews-1.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "a97758a79143cf29f4b0e9e5000dd318", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 27187, "upload_time": "2019-06-12T16:44:07", "url": "https://files.pythonhosted.org/packages/ba/db/97d389ab3522e8e7e38ad14aaa9a700e5bd1ec15b57d5b6e4fc1915b93dd/py_ews-1.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7353866e31e95763520aa9647b53e68b", "sha256": "bbcdab8fecc011fefa604072f1300ab115b60c50ed2b6f7f106128121a6c1f4a" }, "downloads": -1, "filename": "py-ews-1.0.6.tar.gz", "has_sig": false, "md5_digest": "7353866e31e95763520aa9647b53e68b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 17076, "upload_time": "2019-06-12T16:44:08", "url": "https://files.pythonhosted.org/packages/4c/cf/8c4fd7787f83ef737c6d74c2b8e24c05a21ea32ac5f32baa973b3419c20e/py-ews-1.0.6.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "a6e1a20d29481a1b4f05f48b3a6cac8b", "sha256": "735118b4242783255a4432f065bd59a694c1770388000d930c8542237a2e75f5" }, "downloads": -1, "filename": "py_ews-1.0.7-py2-none-any.whl", "has_sig": false, "md5_digest": "a6e1a20d29481a1b4f05f48b3a6cac8b", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 27346, "upload_time": "2019-08-12T22:01:03", "url": "https://files.pythonhosted.org/packages/b0/c4/77d49d67551b1be3fd0b384f4e31934a334269ae5795838b20532227d967/py_ews-1.0.7-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "971a3b3f6e069b842cdb488cbbd8366a", "sha256": "a62ddde15b4e569486cd7f46df235cf6fee35e2b84dd64ab09c3e98923fdc70d" }, "downloads": -1, "filename": "py_ews-1.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "971a3b3f6e069b842cdb488cbbd8366a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 27345, "upload_time": "2019-08-12T22:01:05", "url": "https://files.pythonhosted.org/packages/17/c4/b9142a5db7782bc7e6362638a2d00e45d554b3b19176d852d690ebb76d4b/py_ews-1.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ef9f3ca6944e34fa94aa0cdad7c5cd6", "sha256": "64e8dc3eb189fb7db72fd9256796b6cd7c607ed32060942fbab9ea42e6a08271" }, "downloads": -1, "filename": "py-ews-1.0.7.tar.gz", "has_sig": false, "md5_digest": "9ef9f3ca6944e34fa94aa0cdad7c5cd6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 18716, "upload_time": "2019-08-12T22:01:07", "url": "https://files.pythonhosted.org/packages/e7/98/b12e7cbdfc3885ec61cfc55e2a634d65499189c9fd3bd4f46c7e9a2e2821/py-ews-1.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a6e1a20d29481a1b4f05f48b3a6cac8b", "sha256": "735118b4242783255a4432f065bd59a694c1770388000d930c8542237a2e75f5" }, "downloads": -1, "filename": "py_ews-1.0.7-py2-none-any.whl", "has_sig": false, "md5_digest": "a6e1a20d29481a1b4f05f48b3a6cac8b", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 27346, "upload_time": "2019-08-12T22:01:03", "url": "https://files.pythonhosted.org/packages/b0/c4/77d49d67551b1be3fd0b384f4e31934a334269ae5795838b20532227d967/py_ews-1.0.7-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "971a3b3f6e069b842cdb488cbbd8366a", "sha256": "a62ddde15b4e569486cd7f46df235cf6fee35e2b84dd64ab09c3e98923fdc70d" }, "downloads": -1, "filename": "py_ews-1.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "971a3b3f6e069b842cdb488cbbd8366a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 27345, "upload_time": "2019-08-12T22:01:05", "url": "https://files.pythonhosted.org/packages/17/c4/b9142a5db7782bc7e6362638a2d00e45d554b3b19176d852d690ebb76d4b/py_ews-1.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ef9f3ca6944e34fa94aa0cdad7c5cd6", "sha256": "64e8dc3eb189fb7db72fd9256796b6cd7c607ed32060942fbab9ea42e6a08271" }, "downloads": -1, "filename": "py-ews-1.0.7.tar.gz", "has_sig": false, "md5_digest": "9ef9f3ca6944e34fa94aa0cdad7c5cd6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <4", "size": 18716, "upload_time": "2019-08-12T22:01:07", "url": "https://files.pythonhosted.org/packages/e7/98/b12e7cbdfc3885ec61cfc55e2a634d65499189c9fd3bd4f46c7e9a2e2821/py-ews-1.0.7.tar.gz" } ] }