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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
Close
Hashes for wp_client_aio-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01b54bb9c9f95d861c16e35afe71e2b5f78f6b490e26b1494ffb0031fda18ca3 |
|
MD5 | 735add2950c8adcfb517153a8af89356 |
|
BLAKE2b-256 | a9e6ebb398fdc4c7618b7e97781e5edb94e23ef33a901a38271cd2e42e482c8a |