MoneyKit API
Project description
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.
Installation & Usage
Poetry
Install via Poetry.
poetry add moneykit
Then import the package:
import moneykit
pip install
pip install moneykit
Then import the package:
import moneykit
Getting Started
Please follow the installation procedure and then run the following:
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 for more complete example projects.
Create a Link Session
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
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
import moneykit
import moneykit.models
link_id = 'LINK_ID'
links_api = moneykit.LinksApi(moneykit_client())
links_api.disconnect(link_id)
Fetch accounts
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
moneykit-0.2.0.tar.gz
(87.4 kB
view details)
Built Distribution
moneykit-0.2.0-py3-none-any.whl
(316.3 kB
view details)
File details
Details for the file moneykit-0.2.0.tar.gz
.
File metadata
- Download URL: moneykit-0.2.0.tar.gz
- Upload date:
- Size: 87.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ece246a0238697502d37f08cb615ffad5035a6c54b5ac70ba55af50d45a2908b |
|
MD5 | 1215d269a9a7a391b04a71133a01f59a |
|
BLAKE2b-256 | 52dae169e9aa8bcc1504f7e02a383d9402b5490aef1a820fd049fd43ab0f27bc |
File details
Details for the file moneykit-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: moneykit-0.2.0-py3-none-any.whl
- Upload date:
- Size: 316.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78fe792439d63b6c7403a6e9b2d3a55762a538cc205e3c3c0aab05985c6ba0bb |
|
MD5 | 63a6516e88efd578aca9a9382166e7d5 |
|
BLAKE2b-256 | e1fc668b666f0e55a2cd845625b97bf7a4fef48eff9ad7c77623b2ce59e731d1 |