Skip to main content

Add a short description here

Project description

wp-client-aio

WordPress REST API Python Client based on aiohttp library

Installation

pip install wp-client-aio

Usage

Create new client

wp_client = WordpressRestApiClient(
    os.environ.get("URL"),
    os.environ.get("WP_USER"),
    os.environ.get("WP_PASS")
)

Call API

    await asyncio.gather(
        wp_client.get(client, endpoint = 2),
        wp_client.delete(client, endpoint = 3),
        wp_client.get(client),
        wp_client.post(client,
            payload =
                {
                    "title": "Lorem Ipsum",
                    "content": "Lorem ipsum sit amet",
                    "status": "publish"
                }
            ),

        wp_client.patch(client, endpoint=4, payload = {
            "title": "Съешь ещё этих мягких французских булок",
        }),
        wp_client.put(client, endpoint=4,
            payload =
                {
                    "title": "съешь ещё этих мягких французских булок",
                    "content": "Да выпей чаю",
                    "status": "publish"
                }
            ),
    )

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

wp_client_aio-1.0.5.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

wp_client_aio-1.0.5-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file wp_client_aio-1.0.5.tar.gz.

File metadata

  • Download URL: wp_client_aio-1.0.5.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for wp_client_aio-1.0.5.tar.gz
Algorithm Hash digest
SHA256 b218ea2f4dae0bfb5a1fb1c00fe5ae6b35ee90eb9628fa8af48361b43dbf1e3b
MD5 60b09060e9663b13a7f6047b0924a7a5
BLAKE2b-256 f58345ff794cd91051d136774d7916f38157d4ac30f0e27d0357954af88a938c

See more details on using hashes here.

File details

Details for the file wp_client_aio-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: wp_client_aio-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for wp_client_aio-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 01b54bb9c9f95d861c16e35afe71e2b5f78f6b490e26b1494ffb0031fda18ca3
MD5 735add2950c8adcfb517153a8af89356
BLAKE2b-256 a9e6ebb398fdc4c7618b7e97781e5edb94e23ef33a901a38271cd2e42e482c8a

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