Name | stripe-agent-toolkit JSON |
Version |
0.5.1
JSON |
| download |
home_page | None |
Summary | Stripe Agent Toolkit |
upload_time | 2025-03-03 21:10:20 |
maintainer | None |
docs_url | None |
author | None |
requires_python | None |
license | The MIT License (MIT)
Copyright (c) 2024 Stripe
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
stripe
api
payments
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Stripe Agent Toolkit - Python
The Stripe Agent Toolkit library enables popular agent frameworks including LangChain and CrewAI to integrate with Stripe APIs through function calling. The
library is not exhaustive of the entire Stripe API. It is built directly on top
of the [Stripe Python SDK][python-sdk].
## Installation
You don't need this source code unless you want to modify the package. If you just
want to use the package, just run:
```sh
pip install stripe-agent-toolkit
```
### Requirements
- Python 3.11+
## Usage
The library needs to be configured with your account's secret key which is
available in your [Stripe Dashboard][api-keys].
```python
from stripe_agent_toolkit.crewai.toolkit import StripeAgentToolkit
stripe_agent_toolkit = StripeAgentToolkit(
secret_key="sk_test_...",
configuration={
"actions": {
"payment_links": {
"create": True,
},
}
},
)
```
The toolkit works with LangChain and CrewAI and can be passed as a list of tools. For example:
```python
from crewai import Agent
stripe_agent = Agent(
role="Stripe Agent",
goal="Integrate with Stripe",
backstory="You are an expert at integrating with Stripe",
tools=[*stripe_toolkit.get_tools()]
)
```
Examples for LangChain and CrewAI are included in `/examples`.
[python-sdk]: https://github.com/stripe/stripe-python
[api-keys]: https://dashboard.stripe.com/account/apikeys
#### Context
In some cases you will want to provide values that serve as defaults when making requests. Currently, the `account` context value enables you to make API calls for your [connected accounts](https://docs.stripe.com/connect/authentication).
```python
stripe_agent_toolkit = StripeAgentToolkit(
secret_key="sk_test_...",
configuration={
"context": {
"account": "acct_123"
}
}
)
```
## Development
```
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
Raw data
{
"_id": null,
"home_page": null,
"name": "stripe-agent-toolkit",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "stripe, api, payments",
"author": null,
"author_email": "Stripe <support@stripe.com>",
"download_url": "https://files.pythonhosted.org/packages/76/4c/d26e1d1016d053df3562e957f4fe550acb8fdc016e8a671bd81ad70a1728/stripe_agent_toolkit-0.5.1.tar.gz",
"platform": null,
"description": "# Stripe Agent Toolkit - Python\n\nThe Stripe Agent Toolkit library enables popular agent frameworks including LangChain and CrewAI to integrate with Stripe APIs through function calling. The\nlibrary is not exhaustive of the entire Stripe API. It is built directly on top\nof the [Stripe Python SDK][python-sdk].\n\n## Installation\n\nYou don't need this source code unless you want to modify the package. If you just\nwant to use the package, just run:\n\n```sh\npip install stripe-agent-toolkit\n```\n\n### Requirements\n\n- Python 3.11+\n\n## Usage\n\nThe library needs to be configured with your account's secret key which is\navailable in your [Stripe Dashboard][api-keys].\n\n```python\nfrom stripe_agent_toolkit.crewai.toolkit import StripeAgentToolkit\n\nstripe_agent_toolkit = StripeAgentToolkit(\n secret_key=\"sk_test_...\",\n configuration={\n \"actions\": {\n \"payment_links\": {\n \"create\": True,\n },\n }\n },\n)\n```\n\nThe toolkit works with LangChain and CrewAI and can be passed as a list of tools. For example:\n\n```python\nfrom crewai import Agent\n\nstripe_agent = Agent(\n role=\"Stripe Agent\",\n goal=\"Integrate with Stripe\",\n backstory=\"You are an expert at integrating with Stripe\",\n tools=[*stripe_toolkit.get_tools()]\n)\n```\n\nExamples for LangChain and CrewAI are included in `/examples`.\n\n[python-sdk]: https://github.com/stripe/stripe-python\n[api-keys]: https://dashboard.stripe.com/account/apikeys\n\n#### Context\n\nIn some cases you will want to provide values that serve as defaults when making requests. Currently, the `account` context value enables you to make API calls for your [connected accounts](https://docs.stripe.com/connect/authentication).\n\n```python\nstripe_agent_toolkit = StripeAgentToolkit(\n secret_key=\"sk_test_...\",\n configuration={\n \"context\": {\n \"account\": \"acct_123\"\n }\n }\n)\n```\n\n## Development\n\n```\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n",
"bugtrack_url": null,
"license": "The MIT License (MIT)\n \n Copyright (c) 2024 Stripe\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "Stripe Agent Toolkit",
"version": "0.5.1",
"project_urls": {
"Bug Tracker": "https://github.com/stripe/agent-toolkit/issues",
"Source Code": "https://github.com/stripe/agent-toolkit"
},
"split_keywords": [
"stripe",
" api",
" payments"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8935e778b7c3628a0df0d253ce1647db5508316d4d076287edbadd456c0f7a83",
"md5": "3b2d674806a9f8158b5a597d7dc08354",
"sha256": "4c7598586185b4822516f609cb33dbb6d44d5aa8d9f3da3c2be75138c4306ee2"
},
"downloads": -1,
"filename": "stripe_agent_toolkit-0.5.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3b2d674806a9f8158b5a597d7dc08354",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 13095,
"upload_time": "2025-03-03T21:10:17",
"upload_time_iso_8601": "2025-03-03T21:10:17.761153Z",
"url": "https://files.pythonhosted.org/packages/89/35/e778b7c3628a0df0d253ce1647db5508316d4d076287edbadd456c0f7a83/stripe_agent_toolkit-0.5.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "764cd26e1d1016d053df3562e957f4fe550acb8fdc016e8a671bd81ad70a1728",
"md5": "51f0a981647fb37ef3c62657da11343f",
"sha256": "6b53aa446dcaa6e731e1662f37febc870d2c0b947c0be7c3eb089a80a5637759"
},
"downloads": -1,
"filename": "stripe_agent_toolkit-0.5.1.tar.gz",
"has_sig": false,
"md5_digest": "51f0a981647fb37ef3c62657da11343f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12112,
"upload_time": "2025-03-03T21:10:20",
"upload_time_iso_8601": "2025-03-03T21:10:20.468016Z",
"url": "https://files.pythonhosted.org/packages/76/4c/d26e1d1016d053df3562e957f4fe550acb8fdc016e8a671bd81ad70a1728/stripe_agent_toolkit-0.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-03-03 21:10:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "stripe",
"github_project": "agent-toolkit",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "stripe-agent-toolkit"
}