{ "info": { "author": "Zach \"theY4Kman\" Kanzler", "author_email": "they4kman@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries" ], "description": "infusionsoft-client\n===================\n\n.. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg\n :target: https://github.com/theY4Kman/infusionsoft-client/blob/master/LICENSE\n \n.. image:: https://badges.gitter.im/they4kman/infusionsoft-client.png\n :target: https://gitter.im/infusionsoft-client/Lobby\n \n.. image:: https://badge.fury.io/py/infusionsoft-client.svg\n :target: https://badge.fury.io/py/infusionsoft-client\n\nA simple-to-use `Infusionsoft XML-RPC API `_ client, with included stubs for code sense. Python 3.5+ only (but pull requests welcome :smirk:).\n\n\n\nInstallation\n------------\n\n.. code-block:: bash\n\n pip install infusionsoft-client\n\n\n\nQuickstart\n----------\n\nFirst, initialize the client with your app name and API key:\n\n.. code-block:: python\n\n import infusionsoft\n infusionsoft.initialize('myapp', '098f6bcd4621d373cade4e832627b4f6')\n\n\nAnd use the ``infusionsoft`` like a regular `xmlrpc.client.ServerProxy `_:\n\n.. code-block:: python\n\n import infusionsoft\n contact_id = infusionsoft.ContactService.add({'FirstName': 'Johnny'})\n\n\n\nSetting XML-RPC Client Options\n------------------------------\n\nAny extra kwargs passed to ``initialize()`` will be passed along to ``xmlrpc.client.ServerProxy``.\n\n.. code-block:: python\n\n import infusionsoft\n infusionsoft.initialize('myapp', '098f6bcd4621d373cade4e832627b4f6', use_builtin_types=True)\n\nSome kwargs of interest are:\n\n- ``use_builtin_types``: whether to utilize native Python types, rather than wrappers such as ``xmlrpc.client.DateTime`` or ``xmlrpc.client.Binary``. **I recommend turning this on**. It will be turned on by default in the next major/breaking release.\n- ``verbose``: set to ``True`` to print out the request and response bodies for each RPC call.\n- ``allow_none``: whether to allow ``None`` to be sent over the wire. Infusionsoft, in general, doesn't allow ``None`` (which is ``nil`` in XML-RPC parlance). If a field in a response is null, Infusionsoft will simply not send it.\n- ``retries``: number of times to retry failed requests. Requests are retried on connection/socket errors, and \"InvalidConfig\" faults (if you've never seen them, I envy you). Any other type of fault will still raise an exception.\n\nSee `the docs `_ for more info.\n\n\n\nUsage with Django\n-----------------\n\n``infusionsoft-client`` includes a Django integration out of the box. Just add it to your ``INSTALLED_APPS``:\n\n.. code-block:: python\n\n INSTALLED_APPS = (\n # ...\n 'infusionsoft.contrib.django',\n )\n\nAnd add your app name and API key to your settings:\n\n.. code-block:: python\n\n INFUSIONSOFT_APP_NAME = 'myapp'\n INFUSIONSOFT_API_KEY = '098f6bcd4621d373cade4e832627b4f6'\n\n\nPass extra configuration to the XML-RPC client with ``INFUSIONSOFT_CLIENT_OPTIONS``:\n\n.. code-block:: python\n\n INFUSIONSOFT_CLIENT_OPTIONS = {\n 'use_builtin_types': True,\n }\n\n\n\nGetting All Rows of a Query\n---------------------------\n\nSome API calls are paginated, and require multiple calls to retrieve all results. This can be a pain, and you may find yourself writing the same code over and over. To this end, ``infusionsoft-client`` provides a ``consume()`` generator function, which will consume all pages of any query function.\n\nTo use it, create a lambda (or regular) function taking ``page`` and ``limit`` as arguments which performs your paginated API call, and pass it to ``consume()``:\n\n.. code-block:: python\n\n import infusionsoft\n from infusionsoft.query import consume\n\n query_fn = lambda page, limit: (\n infusionsoft.DataService.query('mytable', limit, page, ['Id']))\n\n # Use with a for-loop, to avoid storing all rows in memory:\n for row in consume(query_fn):\n do_stuff(row)\n\n # Or retrieve all rows at once\n all_rows = list(consume(query_fn))\n\n\nGenerate Code Stubs\n-------------------\n\nShipped with ``infusionsoft-client`` is code to download the official Infusionsoft XML-RPC docs, parse them with `BeautifulSoup `_, and generate Python 3.5-compatible stubs for all methods.\n\nTo generate these yourself, first install the extra requirements:\n\n.. code-block:: bash\n\n pip install -r stub-requirements.txt\n\nThen run the ``generate_stubs()`` function, which will return a string:\n\n.. code-block:: python\n\n from infusionsoft.gen_stubs import generate_stubs\n source = generate_stubs()", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/theY4Kman/infusionsoft-client", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "infusionsoft-client", "package_url": "https://pypi.org/project/infusionsoft-client/", "platform": "", "project_url": "https://pypi.org/project/infusionsoft-client/", "project_urls": { "Homepage": "https://github.com/theY4Kman/infusionsoft-client" }, "release_url": "https://pypi.org/project/infusionsoft-client/1.5.1/", "requires_dist": null, "requires_python": "", "summary": "Sexy Infusionsoft XML-RPC API client", "version": "1.5.1" }, "last_serial": 3121062, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "acce9f02ae12489736e05e923cfdedae", "sha256": "4b7de20ffa97fd7da9a1ec376b0e2002a4e9dcdacfe63a43dedd6c2aff4c62c6" }, "downloads": -1, "filename": "infusionsoft-client-1.0.0.tar.gz", "has_sig": false, "md5_digest": "acce9f02ae12489736e05e923cfdedae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11261, "upload_time": "2017-04-10T21:34:48", "url": "https://files.pythonhosted.org/packages/41/fb/c869ac5b32019fbde48452c55c3e010a5e54e6c3cffe036fa151041c9e33/infusionsoft-client-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "ab82acd96ed208e0693c8a2ef66c14b8", "sha256": "c46d87927f5e2165c73a1521ab6fb8e306928dbd3376d31609c6b359a17088cb" }, "downloads": -1, "filename": "infusionsoft-client-1.1.0.tar.gz", "has_sig": false, "md5_digest": "ab82acd96ed208e0693c8a2ef66c14b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13610, "upload_time": "2017-04-11T15:54:33", "url": "https://files.pythonhosted.org/packages/98/a2/74a4b587b38fe0ff352357b7810007ca3b5e6e838108384bb26cae650af1/infusionsoft-client-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "810ed2e33c23798a0f302439d2775d26", "sha256": "7fe3fc75240558055b53be84c3b443de0c8079e2f0f35528731dbf2c099faf8d" }, "downloads": -1, "filename": "infusionsoft-client-1.2.0.tar.gz", "has_sig": false, "md5_digest": "810ed2e33c23798a0f302439d2775d26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15595, "upload_time": "2017-04-11T18:01:45", "url": "https://files.pythonhosted.org/packages/58/63/8ebf8546e88972b1750122347dabc259946514f33fc23b00f90bd664c8bb/infusionsoft-client-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "64b90c3b44374538757f5e1c88af6b55", "sha256": "993a28e51b34ab38cba8ee625aeeb8ca41548b01d82c824e8b4b39a3c296bab5" }, "downloads": -1, "filename": "infusionsoft-client-1.3.0.tar.gz", "has_sig": false, "md5_digest": "64b90c3b44374538757f5e1c88af6b55", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15735, "upload_time": "2017-04-11T18:49:10", "url": "https://files.pythonhosted.org/packages/3c/06/15e286b77b341056ee603227975505ca4e257cd69710b5581fc85d236557/infusionsoft-client-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "5194aca906bcd9ea0d9ed5260a04ba9b", "sha256": "f4d95b610de072e46411afac79a9682e492eebd9d007362cdfed41490a63f778" }, "downloads": -1, "filename": "infusionsoft-client-1.3.1.tar.gz", "has_sig": false, "md5_digest": "5194aca906bcd9ea0d9ed5260a04ba9b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16328, "upload_time": "2017-07-26T14:56:09", "url": "https://files.pythonhosted.org/packages/18/10/3fae45147cc214a98588301e736f56dd931a41c7d34af5609f1079be4258/infusionsoft-client-1.3.1.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "9916cd616dc3451a6f39ef3ae25a699e", "sha256": "ac76fc0fd700f0577cbf45c66a86c81e1cddd5850f142f7a9da269499c2fba9f" }, "downloads": -1, "filename": "infusionsoft-client-1.4.0.tar.gz", "has_sig": false, "md5_digest": "9916cd616dc3451a6f39ef3ae25a699e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17531, "upload_time": "2017-08-16T18:32:24", "url": "https://files.pythonhosted.org/packages/60/18/bc505f3005db5f544ce66dcc7cb1400aa54f71fbef7a31fd4b863d199514/infusionsoft-client-1.4.0.tar.gz" } ], "1.5.0": [ { "comment_text": "", "digests": { "md5": "0f5f66f1378b2941b8219a1257dbf62f", "sha256": "037bcfe695ea503262337138cad093c02e9cb1eb3d3c2f9f62c1bfd9cb464be1" }, "downloads": -1, "filename": "infusionsoft-client-1.5.0.tar.gz", "has_sig": false, "md5_digest": "0f5f66f1378b2941b8219a1257dbf62f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18506, "upload_time": "2017-08-17T15:24:44", "url": "https://files.pythonhosted.org/packages/21/8e/57f8f62ba76d8622f8965ca244b40b7e3f6b3b6cf0ab8f802e8b30b624d8/infusionsoft-client-1.5.0.tar.gz" } ], "1.5.1": [ { "comment_text": "", "digests": { "md5": "7568b2c7c987631dae50409e687ce4ec", "sha256": "9e6e3ae7c350476edef59319b4cf314bab73db89d84cc216ecc887417deaf01e" }, "downloads": -1, "filename": "infusionsoft-client-1.5.1.tar.gz", "has_sig": false, "md5_digest": "7568b2c7c987631dae50409e687ce4ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18815, "upload_time": "2017-08-24T17:16:47", "url": "https://files.pythonhosted.org/packages/cc/de/5f47d703636dd8766c89de7292882ed9fe2fbfcfd53f6263b9e1ecba0fbd/infusionsoft-client-1.5.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7568b2c7c987631dae50409e687ce4ec", "sha256": "9e6e3ae7c350476edef59319b4cf314bab73db89d84cc216ecc887417deaf01e" }, "downloads": -1, "filename": "infusionsoft-client-1.5.1.tar.gz", "has_sig": false, "md5_digest": "7568b2c7c987631dae50409e687ce4ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18815, "upload_time": "2017-08-24T17:16:47", "url": "https://files.pythonhosted.org/packages/cc/de/5f47d703636dd8766c89de7292882ed9fe2fbfcfd53f6263b9e1ecba0fbd/infusionsoft-client-1.5.1.tar.gz" } ] }