Work with Strapi from Python via REST API
Project description
PyStrapi
Work with Strapi from Python via REST API
Install
pip install pystrapi
Examples
Quick start:
import asyncio
from pystrapi import StrapiClient
async def main():
strapi = StrapiClient(strapi_url)
await strapi.authorize(your_identifier, your_password) # optional
users = await strapi.get_entries('users', filters={'username': {'$eq': 'Pavel'}})
user_id = users['data'][0]['id']
await strapi.update_entry('users', user_id, data={'username': 'Mark'})
asyncio.run(main())
Development
Lint
Run prospector:
prospector
Create new release
Push changes to 'main' branch following Conventional Commits.
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
pystrapi-3.1.1.tar.gz
(5.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pystrapi-3.1.1.tar.gz.
File metadata
- Download URL: pystrapi-3.1.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Linux/5.13.0-1029-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40a589a980412fb556635f46021627b998b388793d100ba143b165f5c960d519
|
|
| MD5 |
08f00ab81e1d67e79434440782e94448
|
|
| BLAKE2b-256 |
acdd484f3e35a9b57a13216b5970219eca81242e363fae8d9c6fd0ac2bad1227
|
File details
Details for the file pystrapi-3.1.1-py3-none-any.whl.
File metadata
- Download URL: pystrapi-3.1.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Linux/5.13.0-1029-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ee0cebc826c6f30bf48fb37087ced99c4af0b8df8ca9316ffda07bb2acab166
|
|
| MD5 |
ae0e0be8dba18a126d22d35f5b788409
|
|
| BLAKE2b-256 |
43c41b985721df4591fa850c5c0532be43ca6c5b1b040a3e2de7275a8e3fc337
|