# Clappia Tools
**LangChain integration for Clappia API**
[](https://pypi.org/project/clappia-tools/)
[](LICENSE)
---
## Overview
Clappia Tools is a Python package that provides a unified client and a set of tools for seamless integration with the [Clappia API](https://www.clappia.com/). 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).
---
## Features
- **Unified API Client**: One client for all Clappia API operations.
- **Submission Management**: Create, edit, update owners, and change status of submissions.
- **App Definition Retrieval**: Fetch complete app structure and metadata.
- **Input Validation**: Built-in validation for IDs, emails, and status objects.
- **Extensible Tools**: Modular functions for each operation, easily integrated into agents or scripts.
- **Comprehensive Testing**: Includes unit and integration tests.
---
## Installation
```bash
pip install clappia-tools
```
Or, for development:
```bash
git clone https://github.com/clappia-dev/clappia-tools.git
cd clappia-tools
pip install -e .[dev]
```
---
## Configuration
You must provide your Clappia API credentials and workspace information directly when initializing the `ClappiaClient`:
- `api_key`: Your Clappia API key
- `base_url`: The base URL for the Clappia API (e.g., `https://api.clappia.com`)
- `workplace_id`: Your Clappia workplace ID
**Example:**
```python
from clappia_tools import ClappiaClient
client = ClappiaClient(
api_key="your-api-key",
base_url="https://api.clappia.com",
workplace_id="your-workplace-id"
)
```
---
## Usage
### Basic Client Usage
```python
from clappia_tools import ClappiaClient
client = ClappiaClient(
api_key="your-api-key",
base_url="https://api.clappia.com",
workplace_id="your-workplace-id"
)
# Create a submission
result = client.create_submission(
app_id="MFX093412",
data={"employee_name": "John Doe", "department": "Engineering"},
email="user@example.com"
)
print(result)
# Edit a submission
result = client.edit_submission(
app_id="MFX093412",
submission_id="HGO51464561",
data={"department": "Marketing"},
email="user@example.com"
)
print(result)
# Get app definition
result = client.get_app_definition(app_id="MFX093412")
print(result)
```
### Tool Functions
You can also use the modular tool functions directly:
```python
from clappia_tools._tools import (
create_clappia_submission,
edit_clappia_submission,
get_app_definition,
update_clappia_submission_owners,
update_clappia_submission_status,
)
# Create a submission
data = {"employee_name": "Jane Doe", "department": "HR"}
response = create_clappia_submission("MFX093412", data, "user@example.com")
print(response)
# Update submission owners
response = update_clappia_submission_owners(
"MFX093412", "HGO51464561", "admin@example.com", ["user1@company.com", "user2@company.com"]
)
print(response)
# Update submission status
response = update_clappia_submission_status(
"MFX093412", "HGO51464561", "admin@example.com", {"statusName": "Approved", "comments": "Reviewed."}
)
print(response)
```
---
## Available Tools
- `create_clappia_submission(app_id, data, email)`
- `edit_clappia_submission(app_id, submission_id, data, email)`
- `get_app_definition(app_id, language="en", strip_html=True, include_tags=True)`
- `update_clappia_submission_owners(app_id, submission_id, requesting_user_email_address, email_ids)`
- `update_clappia_submission_status(app_id, submission_id, requesting_user_email_address, status)`
See docstrings in each tool for detailed argument and return value descriptions.
---
## Input Validation
- **App ID**: Must be uppercase letters and numbers (e.g., `MFX093412`).
- **Submission ID**: Must be uppercase letters and numbers (e.g., `HGO51464561`).
- **Email**: Must be a valid email address.
- **Status**: Must be a dictionary with a non-empty `statusName` or `name` field.
Invalid inputs will return descriptive error messages.
---
## Testing
Run all tests (unit and integration):
```bash
pytest
```
---
## 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](LICENSE) for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "clappia-api-tools",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "clappia, client, mcp, rest-apis, tools, workchat, agents",
"author": null,
"author_email": "Rishabh Verma <rishabh.v@clappia.com>",
"download_url": "https://files.pythonhosted.org/packages/44/3e/244bede4cead78902a042e4a7e0a1d4b4eccdec52251fc22e8fcc7f75772/clappia_api_tools-1.0.0.tar.gz",
"platform": null,
"description": "# Clappia Tools\n\n**LangChain integration for Clappia API**\n\n[](https://pypi.org/project/clappia-tools/)\n[](LICENSE)\n\n---\n\n## Overview\n\nClappia Tools is a Python package that provides a unified client and a set of tools for seamless integration with the [Clappia API](https://www.clappia.com/). 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).\n\n---\n\n## Features\n\n- **Unified API Client**: One client for all Clappia API operations.\n- **Submission Management**: Create, edit, update owners, and change status of submissions.\n- **App Definition Retrieval**: Fetch complete app structure and metadata.\n- **Input Validation**: Built-in validation for IDs, emails, and status objects.\n- **Extensible Tools**: Modular functions for each operation, easily integrated into agents or scripts.\n- **Comprehensive Testing**: Includes unit and integration tests.\n\n---\n\n## Installation\n\n```bash\npip install clappia-tools\n```\n\nOr, for development:\n\n```bash\ngit clone https://github.com/clappia-dev/clappia-tools.git\ncd clappia-tools\npip install -e .[dev]\n```\n\n---\n\n## Configuration\n\nYou must provide your Clappia API credentials and workspace information directly when initializing the `ClappiaClient`:\n\n- `api_key`: Your Clappia API key\n- `base_url`: The base URL for the Clappia API (e.g., `https://api.clappia.com`)\n- `workplace_id`: Your Clappia workplace ID\n\n**Example:**\n\n```python\nfrom clappia_tools import ClappiaClient\n\nclient = ClappiaClient(\n api_key=\"your-api-key\",\n base_url=\"https://api.clappia.com\",\n workplace_id=\"your-workplace-id\"\n)\n```\n---\n\n## Usage\n\n### Basic Client Usage\n\n```python\nfrom clappia_tools import ClappiaClient\n\nclient = ClappiaClient(\n api_key=\"your-api-key\",\n base_url=\"https://api.clappia.com\",\n workplace_id=\"your-workplace-id\"\n)\n\n# Create a submission\nresult = client.create_submission(\n app_id=\"MFX093412\",\n data={\"employee_name\": \"John Doe\", \"department\": \"Engineering\"},\n email=\"user@example.com\"\n)\nprint(result)\n\n# Edit a submission\nresult = client.edit_submission(\n app_id=\"MFX093412\",\n submission_id=\"HGO51464561\",\n data={\"department\": \"Marketing\"},\n email=\"user@example.com\"\n)\nprint(result)\n\n# Get app definition\nresult = client.get_app_definition(app_id=\"MFX093412\")\nprint(result)\n```\n\n### Tool Functions\n\nYou can also use the modular tool functions directly:\n\n```python\nfrom clappia_tools._tools import (\n create_clappia_submission,\n edit_clappia_submission,\n get_app_definition,\n update_clappia_submission_owners,\n update_clappia_submission_status,\n)\n\n# Create a submission\ndata = {\"employee_name\": \"Jane Doe\", \"department\": \"HR\"}\nresponse = create_clappia_submission(\"MFX093412\", data, \"user@example.com\")\nprint(response)\n\n# Update submission owners\nresponse = update_clappia_submission_owners(\n \"MFX093412\", \"HGO51464561\", \"admin@example.com\", [\"user1@company.com\", \"user2@company.com\"]\n)\nprint(response)\n\n# Update submission status\nresponse = update_clappia_submission_status(\n \"MFX093412\", \"HGO51464561\", \"admin@example.com\", {\"statusName\": \"Approved\", \"comments\": \"Reviewed.\"}\n)\nprint(response)\n```\n\n---\n\n## Available Tools\n\n- `create_clappia_submission(app_id, data, email)`\n- `edit_clappia_submission(app_id, submission_id, data, email)`\n- `get_app_definition(app_id, language=\"en\", strip_html=True, include_tags=True)`\n- `update_clappia_submission_owners(app_id, submission_id, requesting_user_email_address, email_ids)`\n- `update_clappia_submission_status(app_id, submission_id, requesting_user_email_address, status)`\n\nSee docstrings in each tool for detailed argument and return value descriptions.\n\n---\n\n## Input Validation\n\n- **App ID**: Must be uppercase letters and numbers (e.g., `MFX093412`).\n- **Submission ID**: Must be uppercase letters and numbers (e.g., `HGO51464561`).\n- **Email**: Must be a valid email address.\n- **Status**: Must be a dictionary with a non-empty `statusName` or `name` field.\n\nInvalid inputs will return descriptive error messages.\n\n---\n\n## Testing\n\nRun all tests (unit and integration):\n\n```bash\npytest\n```\n\n---\n\n## Contributing\n\n1. Fork the repository and create your branch.\n2. Write clear, well-documented code and tests.\n3. Run `pytest` and ensure all tests pass.\n4. Submit a pull request with a clear description of your changes.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python client for Clappia API integration",
"version": "1.0.0",
"project_urls": {
"Bug Tracker": "https://github.com/clappia-dev/clappia-tools/issues",
"Documentation": "https://github.com/clappia-dev/clappia-tools#readme",
"Homepage": "https://github.com/clappia-dev/clappia-tools",
"Repository": "https://github.com/clappia-dev/clappia-tools.git"
},
"split_keywords": [
"clappia",
" client",
" mcp",
" rest-apis",
" tools",
" workchat",
" agents"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7c0228863f811e3c7ea1d2d3196db384aa1fb0b514df2814f82635c33e7b4a8d",
"md5": "2f5c69c07dbb1418ac2a91f9fb1c8c30",
"sha256": "610c05437f77dc78814c9df56e0bd64a48f6dc5e2d97a65c179202370cc35a39"
},
"downloads": -1,
"filename": "clappia_api_tools-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2f5c69c07dbb1418ac2a91f9fb1c8c30",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 29736,
"upload_time": "2025-07-08T10:39:13",
"upload_time_iso_8601": "2025-07-08T10:39:13.986167Z",
"url": "https://files.pythonhosted.org/packages/7c/02/28863f811e3c7ea1d2d3196db384aa1fb0b514df2814f82635c33e7b4a8d/clappia_api_tools-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "443e244bede4cead78902a042e4a7e0a1d4b4eccdec52251fc22e8fcc7f75772",
"md5": "a91f8050c80bee1e5682c496e9462cf9",
"sha256": "caf0e3aac90dec8837bb68dd29a3a942e4e3a24bb412c492eb54ae8480c245a8"
},
"downloads": -1,
"filename": "clappia_api_tools-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "a91f8050c80bee1e5682c496e9462cf9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 23128,
"upload_time": "2025-07-08T10:39:14",
"upload_time_iso_8601": "2025-07-08T10:39:14.983338Z",
"url": "https://files.pythonhosted.org/packages/44/3e/244bede4cead78902a042e4a7e0a1d4b4eccdec52251fc22e8fcc7f75772/clappia_api_tools-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-08 10:39:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "clappia-dev",
"github_project": "clappia-tools",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "clappia-api-tools"
}