Work with Strapi from Python via REST API
pip install pystrapi
Quick start:
import asyncio
from pystrapi import StrapiClient
async def main():
strapi = StrapiClient(api_url=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())
python -m venv .env
source .env/bin/activate
poetry install
Run prospector:
prospector
pytest test/unittests
Run Strapi test server (see instructions), and run integration tests:
pytest test/integration
Push changes to 'main' branch following Conventional Commits.