{ "info": { "author": "Claudio Sanches @ Automattic", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "WooCommerce API - Python Client\n===============================\n\nA Python wrapper for the WooCommerce REST API. Easily interact with the WooCommerce REST API using this library.\n\n.. image:: https://secure.travis-ci.org/woocommerce/wc-api-python.svg\n :target: http://travis-ci.org/woocommerce/wc-api-python\n\n.. image:: https://img.shields.io/pypi/v/woocommerce.svg\n :target: https://pypi.python.org/pypi/WooCommerce\n\n\nInstallation\n------------\n\n.. code-block:: bash\n\n pip install woocommerce\n\nGetting started\n---------------\n\nGenerate API credentials (Consumer Key & Consumer Secret) following this instructions http://woocommerce.github.io/woocommerce-rest-api-docs/#rest-api-keys.\n\nCheck out the WooCommerce API endpoints and data that can be manipulated in http://woocommerce.github.io/woocommerce-rest-api-docs/.\n\nSetup\n-----\n\n.. code-block:: python\n\n from woocommerce import API\n\n wcapi = API(\n url=\"http://example.com\",\n consumer_key=\"ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n consumer_secret=\"cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n version=\"wc/v3\"\n )\n\nOptions\n~~~~~~~\n\n+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+\n| Option | Type | Required | Description |\n+=======================+=============+==========+=======================================================================================================+\n| ``url`` | ``string`` | yes | Your Store URL, example: http://woo.dev/ |\n+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+\n| ``consumer_key`` | ``string`` | yes | Your API consumer key |\n+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+\n| ``consumer_secret`` | ``string`` | yes | Your API consumer secret |\n+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+\n| ``version`` | ``string`` | no | API version, default is ``wc/v3`` |\n+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+\n| ``timeout`` | ``integer`` | no | Connection timeout, default is ``5`` |\n+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+\n| ``verify_ssl`` | ``bool`` | no | Verify SSL when connect, use this option as ``False`` when need to test with self-signed certificates |\n+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+\n| ``query_string_auth`` | ``bool`` | no | Force Basic Authentication as query string when ``True`` and using under HTTPS, default is ``False`` |\n+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+\n| ``oauth_timestamp`` | ``integer`` | no | Custom timestamp for requests made with oAuth1.0a |\n+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+\n| ``wp_api`` | ``bool`` | no | Set to ``False`` in order to use the legacy WooCommerce API (deprecated) |\n+-----------------------+-------------+----------+-------------------------------------------------------------------------------------------------------+\n\nMethods\n-------\n\n+--------------+----------------+------------------------------------------------------------------+\n| Params | Type | Description |\n+==============+================+==================================================================+\n| ``endpoint`` | ``string`` | WooCommerce API endpoint, example: ``customers`` or ``order/12`` |\n+--------------+----------------+------------------------------------------------------------------+\n| ``data`` | ``dictionary`` | Data that will be converted to JSON |\n+--------------+----------------+------------------------------------------------------------------+\n| ``**kwargs`` | ``dictionary`` | Accepts ``params``, also other Requests arguments |\n+--------------+----------------+------------------------------------------------------------------+\n\nGET\n~~~\n\n- ``.get(endpoint, **kwargs)``\n\nPOST\n~~~~\n\n- ``.post(endpoint, data, **kwargs)``\n\nPUT\n~~~\n\n- ``.put(endpoint, data), **kwargs``\n\nDELETE\n~~~~~~\n\n- ``.delete(endpoint, **kwargs)``\n\nOPTIONS\n~~~~~~~\n\n- ``.options(endpoint, **kwargs)``\n\nResponse\n--------\n\nAll methods will return `Response `_ object.\n\nExample of returned data:\n\n.. code-block:: bash\n\n >>> r = wcapi.get(\"products\")\n >>> r.status_code\n 200\n >>> r.headers['content-type']\n 'application/json; charset=UTF-8'\n >>> r.encoding\n 'UTF-8'\n >>> r.text\n u'{\"products\":[{\"title\":\"Flying Ninja\",\"id\":70,...' // Json text\n >>> r.json()\n {u'products': [{u'sold_individually': False,... // Dictionary data\n\nRequest with `params` example\n-----------------------------\n\n.. code-block:: python\n\n from woocommerce import API\n\n wcapi = API(\n url=\"http://example.com\",\n consumer_key=\"ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n consumer_secret=\"cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\n version=\"wc/v3\"\n )\n\n # Force delete example.\n print(wcapi.delete(\"products/100\", params={\"force\": True}).json())\n\n # Query example.\n print(wcapi.get(\"products\", params={\"per_page\": 20}).json())\n\n\nChangelog\n---------\n\n2.1.0 - 2019/01/15\n~~~~~~~~~~~~~~~~~~\n\n- Uses WP REST API by default, need to force ``wp_api`` as ``False`` in order to use the legacy WooCommerce API.\n- Updated default REST API version to ``wc/v3``.\n\n2.0.0 - 2019/01/15\n~~~~~~~~~~~~~~~~~~\n\n- Updated \"Requests\" library to version 2.20.0.\n- Added support for custom timestamps in oAuth1.0a requests with ``oauth_timestamp``.\n- Allow pass custom arguments to \"Requests\" library.\n\n1.2.1 - 2016/12/14\n~~~~~~~~~~~~~~~~~~\n\n- Fixed WordPress 4.7 compatibility.\n\n1.2.0 - 2016/06/22\n~~~~~~~~~~~~~~~~~~\n\n- Added option ``query_string_auth`` to allow Basic Auth as query strings.\n\n1.1.1 - 2016/06/03\n~~~~~~~~~~~~~~~~~~\n\n- Fixed oAuth signature for WP REST API.\n\n1.1.0 - 2016/05/09\n~~~~~~~~~~~~~~~~~~\n\n- Added support for WP REST API.\n- Added method to do HTTP OPTIONS requests.\n\n1.0.5 - 2015/12/07\n~~~~~~~~~~~~~~~~~~\n\n- Fixed oAuth filters sorting.\n\n1.0.4 - 2015/09/25\n~~~~~~~~~~~~~~~~~~\n\n- Implemented ``timeout`` argument for ``API`` class.\n\n1.0.3 - 2015/08/07\n~~~~~~~~~~~~~~~~~~\n\n- Forced utf-8 encoding on ``API.__request()`` to avoid ``UnicodeDecodeError``\n\n1.0.2 - 2015/08/05\n~~~~~~~~~~~~~~~~~~\n\n- Fixed handler for query strings\n\n1.0.1 - 2015/07/13\n~~~~~~~~~~~~~~~~~~\n\n- Fixed support for Python 2.6\n\n1.0.1 - 2015/07/12\n~~~~~~~~~~~~~~~~~~\n\n- Initial version\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/woocommerce/wc-api-python", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "WooCommerce", "package_url": "https://pypi.org/project/WooCommerce/", "platform": "any", "project_url": "https://pypi.org/project/WooCommerce/", "project_urls": { "Homepage": "https://github.com/woocommerce/wc-api-python" }, "release_url": "https://pypi.org/project/WooCommerce/2.1.1/", "requires_dist": [ "ordereddict", "requests" ], "requires_python": "", "summary": "A Python wrapper for the WooCommerce REST API", "version": "2.1.1" }, "last_serial": 5569698, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "99725ae25fe8ff7d3a701ba81b71d817", "sha256": "8bdd6261208efcae1a627718edf62e92c49b31c4ecbf5ed7450ff74996a997bb" }, "downloads": -1, "filename": "WooCommerce-1.0.0.tar.gz", "has_sig": false, "md5_digest": "99725ae25fe8ff7d3a701ba81b71d817", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4737, "upload_time": "2015-07-13T08:49:02", "url": "https://files.pythonhosted.org/packages/47/30/54fcc2a9caf42cf2f057aef2431486fdec96e2b469e170641f3d2a1ce8af/WooCommerce-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "7334a15047361864e173f8e74bef2b76", "sha256": "9f9be0ca5c383ab477912d1912ca0ca4f3873b38d244dfb8742891a784049c14" }, "downloads": -1, "filename": "WooCommerce-1.0.1.tar.gz", "has_sig": false, "md5_digest": "7334a15047361864e173f8e74bef2b76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4900, "upload_time": "2015-07-13T12:56:08", "url": "https://files.pythonhosted.org/packages/a5/5a/c911c672193abd08aa1d55748d0a507f8943e80d0e13b6fe6deb9c4750a5/WooCommerce-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "c2900a16b736cc3e530176dbe4bd1255", "sha256": "97ef16793c4b79dfae2725ef1c1a926a89fc79cb3c34b86e10bd7f14a2693fd5" }, "downloads": -1, "filename": "WooCommerce-1.0.2.tar.gz", "has_sig": false, "md5_digest": "c2900a16b736cc3e530176dbe4bd1255", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4935, "upload_time": "2015-08-05T17:44:33", "url": "https://files.pythonhosted.org/packages/7e/db/e4430ef8314b75c452dab10622f4273cf5d6c397f63be4e4b4adc7615e8b/WooCommerce-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "9342e7b881180b181d06f350dd82bfdb", "sha256": "576ff19b32699ac28ab46076f1828404b7568c84882060fbc58b5a3c897e8122" }, "downloads": -1, "filename": "WooCommerce-1.0.3.tar.gz", "has_sig": false, "md5_digest": "9342e7b881180b181d06f350dd82bfdb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5058, "upload_time": "2015-08-07T11:35:26", "url": "https://files.pythonhosted.org/packages/c8/c1/b17f8147b4868379459a1f1aa96365bee6f4c01c2feaeefcb934c6b468e2/WooCommerce-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "d839bb38f00c0a0ef24b98c489450928", "sha256": "89652e4e4cf358e7a4449b50030880c08566541024f37d76bbab4abde0ba52f9" }, "downloads": -1, "filename": "WooCommerce-1.0.4.tar.gz", "has_sig": false, "md5_digest": "d839bb38f00c0a0ef24b98c489450928", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5161, "upload_time": "2015-09-25T14:07:01", "url": "https://files.pythonhosted.org/packages/ee/ca/57a996ccfefae40817d12a198097fee91209445eab315cd995763b06ab79/WooCommerce-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "bcad625b996221b14a849ad658a7ee66", "sha256": "8f5cde4ac4634044c6a72d8caaf236a3889942c4d64ac0f4c9cb3c462db263b9" }, "downloads": -1, "filename": "WooCommerce-1.0.5.tar.gz", "has_sig": false, "md5_digest": "bcad625b996221b14a849ad658a7ee66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5215, "upload_time": "2015-12-07T20:19:22", "url": "https://files.pythonhosted.org/packages/48/31/ba944bc194411f7c016b99bfaa479f6c6b6f8b70e70ec3944b49d3ab53e5/WooCommerce-1.0.5.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "801de65671c83eed109957b90348d1d2", "sha256": "e269050a03fd3ff60d3265f2f7d9764e99be1cd8107d1be1f13adf5b425e3908" }, "downloads": -1, "filename": "WooCommerce-1.1.0.tar.gz", "has_sig": false, "md5_digest": "801de65671c83eed109957b90348d1d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5487, "upload_time": "2016-05-09T22:46:27", "url": "https://files.pythonhosted.org/packages/48/9d/0369733b52d6de0911c1160ef94cf4e5091f480e44927598b59f45072510/WooCommerce-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "ebc17fff9c7ca6638850a98237433f0c", "sha256": "ee8b8fa996ae10aeffa5dbd5e2a8fcde3f5772b3200baba49be17225ef2a3086" }, "downloads": -1, "filename": "WooCommerce-1.1.1.tar.gz", "has_sig": false, "md5_digest": "ebc17fff9c7ca6638850a98237433f0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5519, "upload_time": "2016-06-03T16:44:06", "url": "https://files.pythonhosted.org/packages/a4/34/b22a8774d5a4a35063fc61e588a8170a09cb183c2fff6a86f875e2376cdf/WooCommerce-1.1.1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "151a8693d3cd01384aa50e1638c179e7", "sha256": "0a914650171f43e1f4181a5b0ce89a725c86930d76483cb5146086db911e4b29" }, "downloads": -1, "filename": "WooCommerce-1.2.0.tar.gz", "has_sig": false, "md5_digest": "151a8693d3cd01384aa50e1638c179e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5707, "upload_time": "2016-06-22T23:30:24", "url": "https://files.pythonhosted.org/packages/ae/f3/cb661855c48e58d58a3309139cccd357a2f24fca0b45523c815035af0fb2/WooCommerce-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "dae7997e1d67963667278d5957b4bf7f", "sha256": "03c9e1f46d9a94426ad599ed59f65929c0dee3eb6ac444a3ce7274e08853ec38" }, "downloads": -1, "filename": "WooCommerce-1.2.1.tar.gz", "has_sig": false, "md5_digest": "dae7997e1d67963667278d5957b4bf7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5764, "upload_time": "2016-12-14T18:54:12", "url": "https://files.pythonhosted.org/packages/b6/22/11a1a49d17edf8ab966d56cc994ae57f544bd315ecca832120e33017e655/WooCommerce-1.2.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "96cd3b99eff52b27a2acc03a6bb316c1", "sha256": "f6136804730c15a435f80ff284fe3bba3bb93bec9e0eb9243dfa3951a89bc445" }, "downloads": -1, "filename": "WooCommerce-2.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "96cd3b99eff52b27a2acc03a6bb316c1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7148, "upload_time": "2019-01-15T19:11:52", "url": "https://files.pythonhosted.org/packages/4f/bb/a6a629647d99c8ca1a9ba4b381d2273011518d77b0d6c602c9a6e3ba4fd2/WooCommerce-2.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "09f2d5e6d4d54351c5c08134ef3024ce", "sha256": "9ce51583cf0e68a09b0ea7d91b21d2cb366179251f39bf9f1688e599038855a6" }, "downloads": -1, "filename": "WooCommerce-2.0.0.tar.gz", "has_sig": false, "md5_digest": "09f2d5e6d4d54351c5c08134ef3024ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5974, "upload_time": "2019-01-15T19:11:53", "url": "https://files.pythonhosted.org/packages/cb/e3/156a189203fda9c35174596609e552939864ee18bcb33bb301b6ca97f835/WooCommerce-2.0.0.tar.gz" } ], "2.1.1": [ { "comment_text": "", "digests": { "md5": "db67093501a0e06213274b9cc765d673", "sha256": "68661ec4d6ebf4fa57450b1d363ec7a282775c60ac62dd9bbe4270858c9a8cc2" }, "downloads": -1, "filename": "WooCommerce-2.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "db67093501a0e06213274b9cc765d673", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7270, "upload_time": "2019-07-22T23:57:40", "url": "https://files.pythonhosted.org/packages/7b/67/37757cb879c531eb2f4c5660d28a89c3e4d6d128cca29fd25521c97670b1/WooCommerce-2.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d515569909764bd49894485469d47735", "sha256": "9980f3cec3051830062bf1e5e101f759dd3a6db7b00e7f605355ce8f8f6e16ca" }, "downloads": -1, "filename": "WooCommerce-2.1.1.tar.gz", "has_sig": false, "md5_digest": "d515569909764bd49894485469d47735", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6758, "upload_time": "2019-07-22T23:57:42", "url": "https://files.pythonhosted.org/packages/bd/44/abdc600cba81bc8987545569263be4422cbb98cdb0dcef3b92a9a1623b53/WooCommerce-2.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "db67093501a0e06213274b9cc765d673", "sha256": "68661ec4d6ebf4fa57450b1d363ec7a282775c60ac62dd9bbe4270858c9a8cc2" }, "downloads": -1, "filename": "WooCommerce-2.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "db67093501a0e06213274b9cc765d673", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7270, "upload_time": "2019-07-22T23:57:40", "url": "https://files.pythonhosted.org/packages/7b/67/37757cb879c531eb2f4c5660d28a89c3e4d6d128cca29fd25521c97670b1/WooCommerce-2.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d515569909764bd49894485469d47735", "sha256": "9980f3cec3051830062bf1e5e101f759dd3a6db7b00e7f605355ce8f8f6e16ca" }, "downloads": -1, "filename": "WooCommerce-2.1.1.tar.gz", "has_sig": false, "md5_digest": "d515569909764bd49894485469d47735", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6758, "upload_time": "2019-07-22T23:57:42", "url": "https://files.pythonhosted.org/packages/bd/44/abdc600cba81bc8987545569263be4422cbb98cdb0dcef3b92a9a1623b53/WooCommerce-2.1.1.tar.gz" } ] }