# MoneyKit
MoneyKit is the next generation connection for the world's money.
This is an autogenerated python SDK for OpenFGA. It provides a wrapper around the [MoneyKit API definition](https://docs.moneykit.com).
## Installation & Usage
### Poetry
Install via [Poetry](https://python-poetry.org/).
```sh
poetry add moneykit
```
Then import the package:
```python
import moneykit
```
### pip install
```sh
pip install moneykit
```
Then import the package:
```python
import moneykit
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
import moneykit
import moneykit.models
from moneykit.rest import ApiException
# Defaults to MoneyKit-Version: 2023-02-18
config = moneykit.Configuration(host="https://api.moneykit.com")
api_client = moneykit.ApiClient(config)
try:
access_token_api = moneykit.AccessTokenApi(api_client)
response = access_token_api.generate_access_token(
client_id=os.environ["MONEYKIT_CLIENT_ID"],
client_secret=os.environ["MONEYKIT_CLIENT_SECRET"],
grant_type="client_credentials",
)
api_client.configuration.access_token = response.access_token
except ApiException as e:
print("Exception when calling AccessTokenApi->generate_access_token: %s\n" % e)
```
## Examples
See our [Examples repository](https://github.com/moneykit/examples) for more complete example projects.
### Create a Link Session
```python
import moneykit
import moneykit.models
link_session_api = moneykit.LinkSessionApi(moneykit_client())
response = link_session_api.create_link_session(
moneykit.models.CreateLinkSessionRequest(
customer_user=moneykit.models.LinkSessionCustomerUser(id=user.uuid),
redirect_uri="http://localhost:3000",
),
)
link_session_token = response.link_session_token
```
### Exchange token for a Link id
```python
import moneykit
import moneykit.models
exchangeable_token = 'TOKEN'
link_session_api = moneykit.LinkSessionApi(moneykit_client())
response = link_session_api.exchange_token(
moneykit.models.ExchangeTokenRequest(exchangeable_token=body.exchangeable_token),
)
link_id = response.link_id
institution_id = response.link.institution_id
```
### Disconnect link
```python
import moneykit
import moneykit.models
link_id = 'LINK_ID'
links_api = moneykit.LinksApi(moneykit_client())
links_api.disconnect(link_id)
```
### Fetch accounts
```python
import moneykit
import moneykit.models
link_id = 'LINK_ID'
accounts_api = moneykit.AccountsApi(moneykit_client())
response = accounts_api.get_accounts(link_id)
accounts = response.accounts
```
Raw data
{
"_id": null,
"home_page": "https://github.com/GIT_USER_ID/GIT_REPO_ID",
"name": "moneykit",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "OpenAPI, OpenAPI-Generator, MoneyKit API",
"author": "OpenAPI Generator Community",
"author_email": "team@openapitools.org",
"download_url": "https://files.pythonhosted.org/packages/52/da/e169e9aa8bcc1504f7e02a383d9402b5490aef1a820fd049fd43ab0f27bc/moneykit-0.2.0.tar.gz",
"platform": null,
"description": "# MoneyKit\n\nMoneyKit is the next generation connection for the world's money.\n\nThis is an autogenerated python SDK for OpenFGA. It provides a wrapper around the [MoneyKit API definition](https://docs.moneykit.com).\n\n## Installation & Usage\n\n### Poetry\n\nInstall via [Poetry](https://python-poetry.org/).\n\n```sh\npoetry add moneykit\n```\n\nThen import the package:\n```python\nimport moneykit\n```\n\n### pip install\n\n```sh\npip install moneykit\n```\n\nThen import the package:\n```python\nimport moneykit\n```\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```python\nimport moneykit\nimport moneykit.models\nfrom moneykit.rest import ApiException\n\n# Defaults to MoneyKit-Version: 2023-02-18\nconfig = moneykit.Configuration(host=\"https://api.moneykit.com\")\napi_client = moneykit.ApiClient(config)\ntry:\n access_token_api = moneykit.AccessTokenApi(api_client)\n response = access_token_api.generate_access_token(\n client_id=os.environ[\"MONEYKIT_CLIENT_ID\"],\n client_secret=os.environ[\"MONEYKIT_CLIENT_SECRET\"],\n grant_type=\"client_credentials\",\n )\n\n api_client.configuration.access_token = response.access_token\nexcept ApiException as e:\n print(\"Exception when calling AccessTokenApi->generate_access_token: %s\\n\" % e)\n```\n\n\n## Examples\n\nSee our [Examples repository](https://github.com/moneykit/examples) for more complete example projects.\n\n### Create a Link Session\n\n```python\nimport moneykit\nimport moneykit.models\n\nlink_session_api = moneykit.LinkSessionApi(moneykit_client())\n\nresponse = link_session_api.create_link_session(\n moneykit.models.CreateLinkSessionRequest(\n customer_user=moneykit.models.LinkSessionCustomerUser(id=user.uuid),\n redirect_uri=\"http://localhost:3000\",\n ),\n)\n\nlink_session_token = response.link_session_token\n```\n\n### Exchange token for a Link id\n\n```python\nimport moneykit\nimport moneykit.models\n\n\nexchangeable_token = 'TOKEN'\n\nlink_session_api = moneykit.LinkSessionApi(moneykit_client())\nresponse = link_session_api.exchange_token(\n moneykit.models.ExchangeTokenRequest(exchangeable_token=body.exchangeable_token),\n)\n\nlink_id = response.link_id\ninstitution_id = response.link.institution_id\n```\n\n### Disconnect link\n\n```python\nimport moneykit\nimport moneykit.models\n\n\nlink_id = 'LINK_ID'\n\nlinks_api = moneykit.LinksApi(moneykit_client())\nlinks_api.disconnect(link_id)\n```\n\n### Fetch accounts\n\n```python\nimport moneykit\nimport moneykit.models\n\n\nlink_id = 'LINK_ID'\n\naccounts_api = moneykit.AccountsApi(moneykit_client())\nresponse = accounts_api.get_accounts(link_id)\n\naccounts = response.accounts\n```\n\n",
"bugtrack_url": null,
"license": "NoLicense",
"summary": "MoneyKit API",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/GIT_USER_ID/GIT_REPO_ID",
"Repository": "https://github.com/GIT_USER_ID/GIT_REPO_ID"
},
"split_keywords": [
"openapi",
" openapi-generator",
" moneykit api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e1fc668b666f0e55a2cd845625b97bf7a4fef48eff9ad7c77623b2ce59e731d1",
"md5": "63a6516e88efd578aca9a9382166e7d5",
"sha256": "78fe792439d63b6c7403a6e9b2d3a55762a538cc205e3c3c0aab05985c6ba0bb"
},
"downloads": -1,
"filename": "moneykit-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "63a6516e88efd578aca9a9382166e7d5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 316342,
"upload_time": "2024-10-16T17:43:56",
"upload_time_iso_8601": "2024-10-16T17:43:56.324708Z",
"url": "https://files.pythonhosted.org/packages/e1/fc/668b666f0e55a2cd845625b97bf7a4fef48eff9ad7c77623b2ce59e731d1/moneykit-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "52dae169e9aa8bcc1504f7e02a383d9402b5490aef1a820fd049fd43ab0f27bc",
"md5": "1215d269a9a7a391b04a71133a01f59a",
"sha256": "ece246a0238697502d37f08cb615ffad5035a6c54b5ac70ba55af50d45a2908b"
},
"downloads": -1,
"filename": "moneykit-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "1215d269a9a7a391b04a71133a01f59a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 87422,
"upload_time": "2024-10-16T17:43:59",
"upload_time_iso_8601": "2024-10-16T17:43:59.169384Z",
"url": "https://files.pythonhosted.org/packages/52/da/e169e9aa8bcc1504f7e02a383d9402b5490aef1a820fd049fd43ab0f27bc/moneykit-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-16 17:43:59",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "GIT_USER_ID",
"github_project": "GIT_REPO_ID",
"github_not_found": true,
"lcname": "moneykit"
}