{ "info": { "author": "Ross Hodapp", "author_email": "ross.hodapp@drip.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Topic :: Communications :: Email", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Utilities", "Typing :: Typed" ], "description": "# drip-python [![Coverage Status](https://coveralls.io/repos/github/Ishamyyl/drip-python/badge.svg?branch=master)](https://coveralls.io/github/Ishamyyl/drip-python?branch=master) [![CircleCI](https://circleci.com/gh/Ishamyyl/drip-python.svg?style=svg)](https://circleci.com/gh/Ishamyyl/drip-python)\nPython wrapper for the Drip REST API at [developer.drip.com](https://developer.drip.com)\n\n----\n# Installation\n\n```sh\npip install drip-python\n```\n\n# Usage\n\nInitialize the client\n\n```py\n>>> from drip import Client\n>>> d = Client(API_TOKEN, ACCOUNT_ID)\n```\n\nUse the client's methods\n\n```py\n>>> d.fetch_user()\n{'email': 'ross.hodapp@drip.com', 'name': 'Ross Hodapp', 'time_zone': 'America/Chicago'}\n```\n\n# Main Concepts\n\nBe sure to check out [the Wiki](https://github.com/Ishamyyl/drip-python/wiki)!\n\n## 1. Additional Options\n\nBeyond the required arguments, any additional keyword arguments will be added to the call as well. Check the docs for what's available.\n\n```py\n>>> cfs = {'first_name': 'Ross'}\n>>> d.create_or_update_subscriber('ross.hodapp@drip.com', custom_fields=cfs)\n{'email': 'ross.hodapp+test@drip.com', 'custom_fields': {'first_name': 'Ross'}, ... }\n```\n\n## 2. Unpacking the response\n\nThe Drip REST API often returns extra data along side the results you're asking for.\n\nThe Client takes care of unpacking that data for you, returning lists, dictionaries, or strings as necessary. If the response doesn't have a body, result will return `True` or `False` if the call was [successful or not](http://docs.python-requests.org/en/master/user/quickstart/#response-status-codes).\n\nIf you'd like the raw [response](http://docs.python-requests.org/en/master/user/quickstart/#response-content), pass the keyward argument `marshall=False` to the method call.\n\n```py\n>>> d.fetch_user(marshall=False)\n\n```\n\n## 3. Pagination\n\nMost calls that return a list are paginated. By default, the Client automatically gets the maximum amount of objects per page and automatically gets all available pages.\n\nUse the `page` and `per_page` keyword arguments. If a valid `page` is passed to the function, then this will fetch that page only (or the single Response if not `marshall`ed per above).\n\nOtherwise-- that is, if `page` is 0 (default) or negative-- then this will fetch the entire collection and return the full list. This will ignore the `per_page` keyword argument and use `1000` for maximum efficiency.\n\nCurrently, I won't support getting all pages of 1 object per page for example, since I don't see a valid use-case for this.\n\nThis means essentially that `per_page` only makes sense when asking for a specific 'page'.\nThis also means that you can only `marshall` a specific `page` (this may change in the future).\n\nAnyway, the default case will be what you want most of the time, so don't worry about this too much.\n\n```py\n>>> all_subscribers = d.subscribers()\n>>> len(all_subscribers)\n1234\n\n>>> first_page = d.subscribers(page=1)\n>>> len(first_page)\n100\n\n>>> last_page = d.subscribers(page=13)\n>>> len(last_page)\n34\n\n>>> big_first_page = d.subscribers(page=1, per_page=1000)\n>>> len(big_first_page)\n1000\n\n>>> big_last_page = d.subscribers(page=2, per_page=1000)\n>>> len(big_last_page)\n234\n\n>>> marshall_without_page = d.subscribers(marshall=False)\n>>> len(marshall_without_a_page)\n1234\n\n>>> marshall_with_page = d.subscribers(page=1, marshall=False)\n>>> marshall_with_page\n\n```\n\n# FAQ\n\n# Status - v0.3.0 Beta\nWhile devotedly and enthusiastically maintained, this is an un-official side-project and Drip Support is unable to fix issues you run into. Create an Issue on GitHub here instead. Thanks!\n\nPurpose\n\n- [x] Full API coverage, including \"v3\" Shopper Activity and future endpoints\n- [x] Full unittest code coverage\n- [x] Every endpoint tested live\n- [x] Documentation ~~(readthedocs? github wiki?)~~ wiki!\n- [ ] Web framework support, namely Django and [Responder](https://python-responder.org/en/latest/)\n- [ ] NoSQL utilities\n- [X] ~~AsyncIO support~~ Basically needs a differend repo?\n\n# Changelog\n\n### `v0.3.0`\n\n* Repostiry updates\n\n### `v0.1.4`\n\n* Added raising Errors for when the HTTP call is successful but the API returned that there were errors\n\n### `v0.1.3`\n\n* Added Product support for the Shopper Activity API! Check that out here: [Product Activity](https://developer.drip.com/?shell#product-activity)\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://developer.drip.com/", "keywords": "drip,api,ecrm,ecommerce,automation", "license": "MIT", "maintainer": "Ross Hodapp", "maintainer_email": "ross.hodapp@drip.com", "name": "drip-python", "package_url": "https://pypi.org/project/drip-python/", "platform": "", "project_url": "https://pypi.org/project/drip-python/", "project_urls": { "Homepage": "https://developer.drip.com/", "Repository": "https://github.com/DripEmail/drip-python" }, "release_url": "https://pypi.org/project/drip-python/0.3.1/", "requires_dist": [ "requests (>=2.22,<3.0)", "requests-toolbelt (>=0.9.1,<0.10.0)" ], "requires_python": ">=3.7,<4.0", "summary": "Python wrapper for Drip's REST API", "version": "0.3.1", "yanked": false, "yanked_reason": null }, "last_serial": 6049544, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "3a747ea1f2147d0cc6b1c98b230be7a2", "sha256": "7543c6bd8e27652bd9c1b1504bbe677f62aef94cdcd1a99462858741963ea0d5" }, "downloads": -1, "filename": "drip_python-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3a747ea1f2147d0cc6b1c98b230be7a2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 20385, "upload_time": "2019-10-26T21:09:37", "upload_time_iso_8601": "2019-10-26T21:09:37.724991Z", "url": "https://files.pythonhosted.org/packages/6e/ce/524d4fef50449d43ffe9a6c8dc444d281fe94c0dab5baf4ed0ff281db910/drip_python-0.3.0-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "7eb88e738dbe9d91e550c7d60a18f1eb", "sha256": "a410b2776334fc069fdad4a0edd0ff1a097de72ef1f005ea2c40659ff0c8fa72" }, "downloads": -1, "filename": "drip-python-0.3.0.tar.gz", "has_sig": false, "md5_digest": "7eb88e738dbe9d91e550c7d60a18f1eb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 12866, "upload_time": "2019-10-26T21:09:36", "upload_time_iso_8601": "2019-10-26T21:09:36.620364Z", "url": "https://files.pythonhosted.org/packages/1c/35/2ff017a1b0429356730e0e25645bf9cc573ea3b7df5fff6a21d57667cf5d/drip-python-0.3.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "3d79bf7e1785d577a4d6b3d5e07b395a", "sha256": "544863633e6c571b61a8d26270c87e34f1b8253505947252f1aef2a0e7925798" }, "downloads": -1, "filename": "drip_python-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3d79bf7e1785d577a4d6b3d5e07b395a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 20536, "upload_time": "2019-10-29T22:16:37", "upload_time_iso_8601": "2019-10-29T22:16:37.492414Z", "url": "https://files.pythonhosted.org/packages/36/c6/ecfda63b875fa040a0e0ba1cfeea559de7081e6897b25454318b973edeb5/drip_python-0.3.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "c40cd37a9a1d917f9283a523c7b0c9f3", "sha256": "766f71efac58386ecbe200b981a18221a25ef02e05a94f261f1b0d4217e1ae4e" }, "downloads": -1, "filename": "drip-python-0.3.1.tar.gz", "has_sig": false, "md5_digest": "c40cd37a9a1d917f9283a523c7b0c9f3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 14839, "upload_time": "2019-10-29T22:16:35", "upload_time_iso_8601": "2019-10-29T22:16:35.671430Z", "url": "https://files.pythonhosted.org/packages/8f/cf/1cd7fd97deb9095ef7b9c51e6624f6d543575509e8a6d6188b515c078e29/drip-python-0.3.1.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3d79bf7e1785d577a4d6b3d5e07b395a", "sha256": "544863633e6c571b61a8d26270c87e34f1b8253505947252f1aef2a0e7925798" }, "downloads": -1, "filename": "drip_python-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "3d79bf7e1785d577a4d6b3d5e07b395a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7,<4.0", "size": 20536, "upload_time": "2019-10-29T22:16:37", "upload_time_iso_8601": "2019-10-29T22:16:37.492414Z", "url": "https://files.pythonhosted.org/packages/36/c6/ecfda63b875fa040a0e0ba1cfeea559de7081e6897b25454318b973edeb5/drip_python-0.3.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "c40cd37a9a1d917f9283a523c7b0c9f3", "sha256": "766f71efac58386ecbe200b981a18221a25ef02e05a94f261f1b0d4217e1ae4e" }, "downloads": -1, "filename": "drip-python-0.3.1.tar.gz", "has_sig": false, "md5_digest": "c40cd37a9a1d917f9283a523c7b0c9f3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7,<4.0", "size": 14839, "upload_time": "2019-10-29T22:16:35", "upload_time_iso_8601": "2019-10-29T22:16:35.671430Z", "url": "https://files.pythonhosted.org/packages/8f/cf/1cd7fd97deb9095ef7b9c51e6624f6d543575509e8a6d6188b515c078e29/drip-python-0.3.1.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }