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.2
git push origin v0.1.2

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.2.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.2-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: outline_python-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 f4bb6dcd4a1ea3fe0ddc8de5d9420af97c896cdaf0889c2cb6135ce2f734064a
MD5 3510b893a871928aac45b6b498ae9287
BLAKE2b-256 1901b0ff376dda48f80a02bfdd43fde666ffd9a360737a6d4489ed58834ea2ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for outline_python-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: outline_python-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c72659b5276e4afaa41ab32002701fc60f830dc078c216401dbe715a5c365b45
MD5 35e6cfa065ccf08f2dcea2d651764de6
BLAKE2b-256 9c715dc9feacb45e4a42a41e9240631758c768cb5449d654ebbcf58462930d22

See more details on using hashes here.

Provenance

The following attestation bundles were made for outline_python-0.1.2-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