Skip to main content

Python client and CLI for the Outline API.

Project description

outline-py

Python client and CLI for the Outline API.

PyPI distribution: outline-python Import package: outline_py CLI command: outline-py

outline-py provides:

  • A typed synchronous Python client
  • A typed asynchronous Python client
  • A Typer-based CLI
  • Full current Outline API surface coverage, plus typed convenience commands for common workflows

Install

uv sync --extra dev

For consumers:

pip install outline-python

Setup

uv venv .venv
uv sync --extra dev
source .venv/bin/activate

Python usage

from outline_py import OutlineClient

with OutlineClient(api_key="ol_api_...", base_url="https://app.getoutline.com/api") as client:
    response = client.documents.search(query="hiring", limit=10)
    print(response.data)

Async Python usage

import asyncio

from outline_py import AsyncOutlineClient


async def main() -> None:
    async with AsyncOutlineClient(api_key="ol_api_...") as client:
        response = await client.documents.search(query="hiring", limit=10)
        print(response.data)


asyncio.run(main())

CLI usage

The CLI exposes two layers:

  1. Typed commands for common workflows
  2. Full API coverage through grouped --payload commands
outline-py common whoami
outline-py common search "hiring" --limit 10
outline-py common doc-info hDYep1TPAM
outline-py common doc-show hDYep1TPAM
outline-py common collection-create Engineering
outline-py common share-create 3b6d8f9a-...

The grouped commands remain available for the full surface:

outline-py auth info
outline-py documents search --payload '{"query":"hiring","limit":10}'
outline-py collections create --payload '{"name":"Engineering"}'

Configuration can be provided through flags or environment variables:

export OUTLINE_API_KEY="ol_api_..."
export OUTLINE_BASE_URL="https://app.getoutline.com/api"
outline-py documents info --payload '{"id":"doc_123"}'
outline-py common doc-info doc_123

The --payload value uses the Python client's snake_case parameter names.

Development

uv run ruff check .
uv run pytest
uv build

Release

The repository includes a GitHub Actions workflow at .github/workflows/workflow.yaml that publishes to PyPI when you push a tag matching v*.

Example:

git tag v0.1.0
git push origin v0.1.0

For publishing to work, configure PyPI Trusted Publishing for the singularcurio/outline-py GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

outline_python-0.1.0.tar.gz (56.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

outline_python-0.1.0-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file outline_python-0.1.0.tar.gz.

File metadata

  • Download URL: outline_python-0.1.0.tar.gz
  • Upload date:
  • Size: 56.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for outline_python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0ac5a7116c98f1b0859c07fcbfa1d8282ff283f0ca53a0775012f4e4f5f38d10
MD5 3dab5f129c15d19ec9260fb32e23105a
BLAKE2b-256 256473390d5c22c59f31944cddea21565ab83ef869a5c6f32bea69f39c1229ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for outline_python-0.1.0.tar.gz:

Publisher: workflow.yaml on singularcurio/outline-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file outline_python-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: outline_python-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 34.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for outline_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b5d1a83a683b65e86d507c6ea35da3e113f426962cf2245bea8485b92d707e1
MD5 a03fdb06b72ed2340445650215f6aca6
BLAKE2b-256 18e66dd808f76e852f33ca656a805f8fd35360693df5c973948bd9068cf00ae2

See more details on using hashes here.

Provenance

The following attestation bundles were made for outline_python-0.1.0-py3-none-any.whl:

Publisher: workflow.yaml on singularcurio/outline-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page