Skip to main content

Python client for Clappia API integration

Project description

Clappia API Tools

Clappia APIs SDK

PyPI - Python Version License: MIT


Overview

Clappia API Tools is a Python package that provides a set of clients for seamless integration with the Clappia API. It enables developers to automate workflows, manage submissions, and interact with Clappia apps programmatically. The package is designed for use in automation, data integration, and agent-based systems (e.g., LangChain agents, MCP).


Features

  • Multiple API Clients: Dedicated clients for each Clappia API operation.
  • Submission Management: Create, edit, update owners, and change status of submissions.
  • App Definition Retrieval: Fetch complete app structure and metadata and manage the app structure via fields and sections updates.
  • Workflow Management: Retrieve, create, modify, and manage workflow definitions and steps.
  • Analytics Management: Add, update, and reorder charts and analytics configurations.

Available Clients

  • SubmissionClient: Manage submissions (create, edit, update owners, change status)
  • AppDefinitionClient: Retrieve app definitions and metadata and Manage app structure (fields, sections, creation)
  • WorkflowDefinitionClient: Manage workflow definitions (get, add, update, reorder workflow steps)
  • AnalyticsClient: Manage analytics and charts (add, update, reorder charts)

Documentation


Installation

pip install clappia-api-tools

Or, for development:

git clone https://github.com/clappia-dev/clappia-api-tools.git
cd clappia-api-tools
pip install -e ."[dev]"

Configuration

You must provide your Clappia API credentials and workspace information directly when initializing any client:

  • api_key: Your Clappia API key
  • base_url: The base URL for the Clappia API (e.g., https://api.clappia.com)

Usage

SubmissionClient Example

from clappia_api_tools.client.submission_client import SubmissionClient

client = SubmissionClient(
    api_key="your-api-key",
    base_url="https://api.clappia.com",
)

# Create a submission
result = client.create_submission(
    app_id="MFX093412",
    data={"employee_name": "John Doe", "department": "Engineering"},
)
print(result)

AppDefinitionClient Example

from clappia_api_tools.client.app_definition_client import AppDefinitionClient

client = AppDefinitionClient(
    api_key="your-api-key",
    base_url="https://api.clappia.com",
)

# Get app definition
result = client.get_definition(app_id="MFX093412")
print(result)

WorkflowDefinitionClient Example

from clappia_api_tools.client.workflow_definition_client import WorkflowDefinitionClient

client = WorkflowDefinitionClient(
    api_key="your-api-key",
    base_url="https://api.clappia.com",
)

# Get workflow definition
result = client.get_workflow(
    app_id="MFX093412",
    trigger_type="submissionCreated",
)
print(result)

# Add a workflow step
add_result = client.add_step(
    app_id="MFX093412",
    trigger_type="submissionCreated",
    node_type="Email",
)
print(add_result)

AnalyticsClient Example

from clappia_api_tools.client.analytics_client import AnalyticsClient

client = AnalyticsClient(
    api_key="your-api-key",
    base_url="https://api.clappia.com",
)

# Add a chart
result = client.add_chart(
    app_id="MFX093412",
    chart_type="Bar",
    chart_title="Sales Overview"
)
print(result)

# Update chart configuration
update_data = {
    "chart_title": "Updated Sales Overview",
    "dimensions": ["region"],
    "metrics": ["sales_amount"]
}
update_result = client.update_chart(
    app_id="MFX093412",
    chart_index=0,
    update_data=update_data
)
print(update_result)

Contributing

  1. Fork the repository and create your branch.
  2. Write clear, well-documented code and tests.
  3. Run pytest and ensure all tests pass.
  4. Submit a pull request with a clear description of your changes.

License

This project is licensed under the MIT License. See LICENSE for details.

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

clappia_api_tools-2.0.0.tar.gz (71.4 kB view details)

Uploaded Source

Built Distribution

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

clappia_api_tools-2.0.0-py3-none-any.whl (89.9 kB view details)

Uploaded Python 3

File details

Details for the file clappia_api_tools-2.0.0.tar.gz.

File metadata

  • Download URL: clappia_api_tools-2.0.0.tar.gz
  • Upload date:
  • Size: 71.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for clappia_api_tools-2.0.0.tar.gz
Algorithm Hash digest
SHA256 f3b96a44f6559bdd9e42bde786823c3e7ed3f668bcd8a401f549a2259d4d3429
MD5 76fb5c63c154af205cb12a221057b4bf
BLAKE2b-256 b52d60c083346bed9151ccf9f81a9cadb57dca44c72a1d634b1cd16643a27045

See more details on using hashes here.

Provenance

The following attestation bundles were made for clappia_api_tools-2.0.0.tar.gz:

Publisher: publish.yml on clappia-dev/clappia-tools

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

File details

Details for the file clappia_api_tools-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for clappia_api_tools-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a9fc66b586614907d4c920d5c7aeb63d73972e7a0b8c00be36a875aa3d465e0e
MD5 0924d933f85aea16c727f34fb8d88979
BLAKE2b-256 eb7f9f09d7f4162f5ddfdd31036ddc0f2f488e016705f02fb7542c716f75eacb

See more details on using hashes here.

Provenance

The following attestation bundles were made for clappia_api_tools-2.0.0-py3-none-any.whl:

Publisher: publish.yml on clappia-dev/clappia-tools

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