plone-client

Contents

plone-client#

plone-client is a Python library and a command line client for Plone sites, built on plone.restapi.

As a library, it gives your code a client with one manager per REST API service. Use it to sync content from an external source, to migrate content, or to automate site maintenance.

from plone_client import PloneClient

with PloneClient.from_profile("production") as client:
    for item in client.search.iter("/news", portal_type="News Item", review_state="published"):
        print(item["@id"], item["title"])

As a command line client, it manages any number of Plone sites, each one a named profile whose password stays in your operating system’s keyring. It prints JSON and uses stable exit codes, so shell scripts and coding agents can use it as well as people.

plone-client -p production ls /news -f @id,title,review_state

It works with Plone 6.0, 6.1, and 6.2; see Compatibility.

Where to go next#

Tutorials

New to plone-client? Write your first script, or run your first command line session, against a Plone site in Docker.

Tutorials
How-to guides

Solve a specific problem: connect to a site, manage profiles, sync content, upload files, or set up a coding agent.

How-to guides
Reference

Look something up: compatibility with Plone and plone.restapi, the client and its managers, commands, configuration, and errors.

Reference
Explanation

Understand the design: one client per site, retries that never repeat a change, secrets outside the configuration file.

Explanation