Skip to main content

Asynchronous Python wrapper for WooCommerce REST API

Project description

Asynchronous Python wrapper for WooCommerce REST API.

Gives you asynchronous access to the REST API. Based on aiohttp and wc-api-python.

PRs are highly appreciated!

Installation

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

Getting started

from aiowc import API, APISession
  • Set API parameters:

wcapi = API(
    url="https://example.com",
    consumer_key="ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    consumer_secret="cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    version="wc/v3",
    timeout=30
)
  • Make request with aiohttp session:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiowc-0.2.4.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiowc-0.2.4-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file aiowc-0.2.4.tar.gz.

File metadata

  • Download URL: aiowc-0.2.4.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.6

File hashes

Hashes for aiowc-0.2.4.tar.gz
Algorithm Hash digest
SHA256 a1190e07c3b8357dff45ce6721d015bd8d9e232e03210880bcfcec63bd0f19fc
MD5 03e7a67edb7c6d82291d0c1293500993
BLAKE2b-256 e86649a6febb6a787e4d25081e63878939efc1d7d007f5ac1d49b480d57c4d75

See more details on using hashes here.

File details

Details for the file aiowc-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: aiowc-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.6

File hashes

Hashes for aiowc-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3bbc0b696bc812119ab8d0da6ee3ff10cad494e557c69201408a7246acd3d9ad
MD5 403e46439d0a4a8bb3513c2efdfe86ac
BLAKE2b-256 3b083a1d14e2b26d251c14619b84dbc666641deee2cfea658b022ec829f2a2a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page