{ "info": { "author": "Einar Forselv", "author_email": "eforselv@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "[![pypi](https://badge.fury.io/py/postal-admin-client.svg)](https://pypi.python.org/pypi/postal-admin-client) [![travis](https://api.travis-ci.org/ZettaIO/postal-admin-client.svg?branch=master)](https://travis-ci.org/ZettaIO/postal-admin-client)\n\n# postal-admin-client\n\nA python 3.5+ admin client for the open source mail delivery platform\n[postal](https://github.com/atech/postal).\n\nThis package is only for postal administrators\nand do not include support for the message and send API.\n\nPostal currently don't have a proper HTTP API for administation\nso we rely on faking a brower filling forms and dealing with\ncsrf tokens to make rails happy.\n\nThis can for example be used to manage and create new organizations.\n\nThis package can be installed from PyPI\n\n```bash\npip install postal-admin-client\n```\n\n## Example\n\nInitalize client\n\n```python\n>> import postal_admin_client\n>>\n>> client = postal_admin_client.Client(\n>> 'https://postal.example.com',\n>> email='user@example.com',\n>> password='myhopefullysecurepassword',\n>> )\n```\n\nList/create/delete organization\n\n```python\n>> client.list_organizations()\n[{'name': 'Anansi Technologies', 'shortname': 'at'},\n {'name': 'Council of Venice', 'shortname': 'cov'},\n {'name': 'Orochi Group', 'shortname': 'og'}]\n>> client.create_organization('Illuminati')\n{'name': 'Illuminati', 'shortname': 'il'}\n>> client.delete_organization('li')\n```\n\nList and create/invite users\n\n```python\n>> client.list_users()\n[{'name': 'Kirsten Geary', 'email': 'kirsten.geary@illuminati.test'},\n {'name': 'Alex McCall', 'email': 'alex.mccall@illuminati.test'}]\n>> client.create_user('il', 'nadia.shestova@illuminati.test', admin=False)\n```\n\n## Supported Operations\n\n* List organizations\n* Create organization\n* Delete organization\n* List users in organization\n* Invite user to organization\n\n## Dev Setup\n\nBasic Setup\n\n```bash\npython -m virtualenv .venv\n. .venv/bin/activate\npython setup.py develop\n```\n\nTests\n\n```bash\npip install -r tests/requirements.txt\ntox\n```\n\n## Improvements\n\n* Properly parse out validation errors. For example: `create_user`\n raises `HTTPError(422)` in three different cases and it would be useful\n for the user to easily be able to separate between them.\n* Add CLI support\n* Support more operations\n\n## Logging\n\nThis package is using `logging`. You can configure logging behaviour\n(handler, log level, propagation etc) by obtaining the logger for this package.\n\n```python\nlogger = logging.getLogger('postal_admin_client')\n```\n\n## Contributing\n\nDo not hesistate creating pull requests with completed or\npartial work or create issues. There are very likely many\nthings to improve.\n\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/ZettaIO/postal-admin-client", "keywords": "posta,admin,client", "license": "", "maintainer": "", "maintainer_email": "", "name": "postal-admin-client", "package_url": "https://pypi.org/project/postal-admin-client/", "platform": "", "project_url": "https://pypi.org/project/postal-admin-client/", "project_urls": { "Homepage": "https://github.com/ZettaIO/postal-admin-client" }, "release_url": "https://pypi.org/project/postal-admin-client/0.1.1/", "requires_dist": [ "requests (>=2.22)", "beautifulsoup4 (>=4.7)" ], "requires_python": "", "summary": "Python admin client for the open source mail delivery platform Postal", "version": "0.1.1" }, "last_serial": 5418876, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "33028c238d4c29c4c50b30e0f169c0d1", "sha256": "466a2d06d4910d5ee6465ba43fac124d9029cfa73e52ceed7d5b4ae19e4875e1" }, "downloads": -1, "filename": "postal_admin_client-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "33028c238d4c29c4c50b30e0f169c0d1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7309, "upload_time": "2019-06-19T06:32:28", "url": "https://files.pythonhosted.org/packages/7d/47/16a1a7eff0aa4d8f0af5433167132c7c2af9059556a48c6c3a1134ee34c5/postal_admin_client-0.1-py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "65fcc158f2e046f449fd301a8234069d", "sha256": "04cab1d84f054c1886773310a71b2199f65b4681517e94f3500af1a7b653398d" }, "downloads": -1, "filename": "postal_admin_client-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "65fcc158f2e046f449fd301a8234069d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7326, "upload_time": "2019-06-19T06:39:41", "url": "https://files.pythonhosted.org/packages/2b/54/d2e9e5f93bf194a25841abb0535ffa0ed40da43f30f33d97f18324701dec/postal_admin_client-0.1.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "65fcc158f2e046f449fd301a8234069d", "sha256": "04cab1d84f054c1886773310a71b2199f65b4681517e94f3500af1a7b653398d" }, "downloads": -1, "filename": "postal_admin_client-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "65fcc158f2e046f449fd301a8234069d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7326, "upload_time": "2019-06-19T06:39:41", "url": "https://files.pythonhosted.org/packages/2b/54/d2e9e5f93bf194a25841abb0535ffa0ed40da43f30f33d97f18324701dec/postal_admin_client-0.1.1-py3-none-any.whl" } ] }