aiowc


Nameaiowc JSON
Version 0.2.4 PyPI version JSON
download
home_pagehttps://github.com/vakochetkov/aiowc
SummaryAsynchronous Python wrapper for WooCommerce REST API
upload_time2024-03-19 00:43:30
maintainer
docs_urlNone
authorVladislav Kochetkov
requires_python>=3.8
licenseMIT License
keywords python woocommerce rest api async asyncio aiohttp wcapi
VCS
bugtrack_url
requirements aiohttp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ..................................
aiowc - Asynchronous Python Client
..................................

Asynchronous Python wrapper for WooCommerce REST API.

Gives you asynchronous access to the REST API. 
Based on `aiohttp <https://github.com/aio-libs/aiohttp>`_ and `wc-api-python <https://github.com/woocommerce/wc-api-python>`_.

**PRs are highly appreciated!**

Installation
~~~~~~~~~~~~
``pip install aiowc`` or ``pip install "git+https://github.com/vakochetkov/aiowc"``

Getting started
~~~~~~~~~~~~~~~
* `Generate API credentials <http://woocommerce.github.io/woocommerce-rest-api-docs/#rest-api-keys>`_

* Import aiowc:

.. code-block:: python

    from aiowc import API, APISession

* Set API parameters:
    
.. code-block:: python

    wcapi = API(
        url="https://example.com",
        consumer_key="ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        consumer_secret="cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        version="wc/v3",
        timeout=30
    )

* Make request with aiohttp session:

.. code-block:: python

    async def main():
        async with APISession(wcapi) as session:
            res = await session.get('products/categories', params={'per_page': 5})
            json = await res.json()
            print(json)

    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

Options and request types:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fully compatible with `wc-api-python <https://github.com/woocommerce/wc-api-python>`_ 

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vakochetkov/aiowc",
    "name": "aiowc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "python,woocommerce,rest,api,async,asyncio,aiohttp,wcapi",
    "author": "Vladislav Kochetkov",
    "author_email": "Vladislav Kochetkov <vakochetkov@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/e8/66/49a6febb6a787e4d25081e63878939efc1d7d007f5ac1d49b480d57c4d75/aiowc-0.2.4.tar.gz",
    "platform": null,
    "description": "..................................\r\naiowc - Asynchronous Python Client\r\n..................................\r\n\r\nAsynchronous Python wrapper for WooCommerce REST API.\r\n\r\nGives you asynchronous access to the REST API. \r\nBased on `aiohttp <https://github.com/aio-libs/aiohttp>`_ and `wc-api-python <https://github.com/woocommerce/wc-api-python>`_.\r\n\r\n**PRs are highly appreciated!**\r\n\r\nInstallation\r\n~~~~~~~~~~~~\r\n``pip install aiowc`` or ``pip install \"git+https://github.com/vakochetkov/aiowc\"``\r\n\r\nGetting started\r\n~~~~~~~~~~~~~~~\r\n* `Generate API credentials <http://woocommerce.github.io/woocommerce-rest-api-docs/#rest-api-keys>`_\r\n\r\n* Import aiowc:\r\n\r\n.. code-block:: python\r\n\r\n    from aiowc import API, APISession\r\n\r\n* Set API parameters:\r\n    \r\n.. code-block:: python\r\n\r\n    wcapi = API(\r\n        url=\"https://example.com\",\r\n        consumer_key=\"ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\r\n        consumer_secret=\"cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\r\n        version=\"wc/v3\",\r\n        timeout=30\r\n    )\r\n\r\n* Make request with aiohttp session:\r\n\r\n.. code-block:: python\r\n\r\n    async def main():\r\n        async with APISession(wcapi) as session:\r\n            res = await session.get('products/categories', params={'per_page': 5})\r\n            json = await res.json()\r\n            print(json)\r\n\r\n    loop = asyncio.get_event_loop()\r\n    loop.run_until_complete(main())\r\n\r\nOptions and request types:\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nFully compatible with `wc-api-python <https://github.com/woocommerce/wc-api-python>`_ \r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Asynchronous Python wrapper for WooCommerce REST API",
    "version": "0.2.4",
    "project_urls": {
        "Homepage": "https://github.com/vakochetkov/aiowc",
        "Issues": "https://github.com/vakochetkov/aiowc/issues"
    },
    "split_keywords": [
        "python",
        "woocommerce",
        "rest",
        "api",
        "async",
        "asyncio",
        "aiohttp",
        "wcapi"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3b083a1d14e2b26d251c14619b84dbc666641deee2cfea658b022ec829f2a2a1",
                "md5": "403e46439d0a4a8bb3513c2efdfe86ac",
                "sha256": "3bbc0b696bc812119ab8d0da6ee3ff10cad494e557c69201408a7246acd3d9ad"
            },
            "downloads": -1,
            "filename": "aiowc-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "403e46439d0a4a8bb3513c2efdfe86ac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6591,
            "upload_time": "2024-03-19T00:43:27",
            "upload_time_iso_8601": "2024-03-19T00:43:27.067880Z",
            "url": "https://files.pythonhosted.org/packages/3b/08/3a1d14e2b26d251c14619b84dbc666641deee2cfea658b022ec829f2a2a1/aiowc-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e86649a6febb6a787e4d25081e63878939efc1d7d007f5ac1d49b480d57c4d75",
                "md5": "03e7a67edb7c6d82291d0c1293500993",
                "sha256": "a1190e07c3b8357dff45ce6721d015bd8d9e232e03210880bcfcec63bd0f19fc"
            },
            "downloads": -1,
            "filename": "aiowc-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "03e7a67edb7c6d82291d0c1293500993",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6069,
            "upload_time": "2024-03-19T00:43:30",
            "upload_time_iso_8601": "2024-03-19T00:43:30.212115Z",
            "url": "https://files.pythonhosted.org/packages/e8/66/49a6febb6a787e4d25081e63878939efc1d7d007f5ac1d49b480d57c4d75/aiowc-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-19 00:43:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vakochetkov",
    "github_project": "aiowc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "aiohttp",
            "specs": [
                [
                    ">=",
                    "3.9.3"
                ]
            ]
        }
    ],
    "lcname": "aiowc"
}
        
Elapsed time: 0.21939s