staxapp
is the Stax Software Development Kit (SDK) for Python, allowing users to interact with the Stax platform.
In order to use the Stax SDK for Python, you will need a valid Stax API Token.
Install the package using pip
:
pip install staxapp
Configure environment variables:
export STAX_REGION=au1.staxapp.cloud
export STAX_ACCESS_KEY=<your_access_key>
export STAX_SECRET_KEY=<your_secret_key>
The following code can be used to read accounts within your Stax Organisation:
import os
from staxapp.config import Config
from staxapp.openapi import StaxClient
Config.access_key = os.getenv("STAX_ACCESS_KEY")
Config.secret_key = os.getenv("STAX_SECRET_KEY")
# Read all accounts within your Stax Organisation
accounts = StaxClient("accounts")
response = accounts.ReadAccounts()
print(response)
# Read all active accounts within your Stax Organisation and include tags in the response
accounts = StaxClient("accounts")
response = accounts.ReadAccounts(filter="ACTIVE", include_tags=True)
print(response)
For more information on contributing the to the Stax SDK, please see our guide.
- If you're having trouble using the Stax SDK, please refer to our documentation.
- If you've encountered an issue or found a bug, please open an issue.
- For any other requests, please contact Stax support.