How can I interact with the backend API using a Python client?

Prefect 2.0

You can interact with the Orion REST API using an asynchronous client:

from prefect.client import get_client

async with get_client() as client:
    response = await client.hello()

Prefect 1.0

Prefect 1.0 is based on GraphQL API which can be accessed using prefect.Client():

from prefect import Client

client = Client()
response = client.graphql("query string...")