Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

opencollective-py

A Python client for the OpenCollective GraphQL API.

Features

Installation

# From GitHub
pip install git+https://github.com/MaxGhenis/opencollective-py.git

Quick Example

from opencollective import OpenCollectiveClient

# Initialize with access token
client = OpenCollectiveClient(access_token="your_token")

# Get recent expenses
expenses = client.get_expenses("policyengine", limit=10)
for exp in expenses["nodes"]:
    print(f"{exp['description']}: ${exp['amount']/100:.2f}")

# Approve a pending expense
client.approve_expense("expense_id_here")

Documentation

License

MIT License - see LICENSE for details.