Python SDK

Use the Python SDK to interact with the Stax platform

Article Tags
On This Page
AuthenticationInstallation and SetupExamplesRate LimitingTracking HeadersTroubleshootingRelease NotesStax Platform StatusContributingOpen IssuesGetting HelpLicenseSee also

staxapp is the Stax Software Development Kit (SDK) for Python which allows users to interact with the Stax platform. The SDK provides you with all the tools you need to interact with the Stax API, including code examples for making requests against the Stax API.

Authentication

In order to use the Stax Python SDK, you must be authenticated using a Stax API Token.

A Stax API Token is a unique Access Key and Secret Key that allows you to make authorized calls to the Stax API so that you can interact with your Stax Organization securely. To get started see how to create a Stax API Token.

Installation and Setup

Follow this guide to install and setup the Stax SDK.

Examples

You can find the most up to date usage examples inside the examples folder in our Stax Python SDK repository.

For advanced queries, refer to the Stax API Reference documentation for a complete guide to all schemas, methods and parameters.

OperationsDescription
AccountsOperations relating to the management of your AWS Accounts within Stax
Account TypesOperations relating to the management of your Stax Account Types
API TokensOperations relating to the management of your Stax API Tokens
GroupsOperations relating to the management of your Stax Groups
NetworkingOperations relating to the management of your Stax Networks
PolicyOperations relating to the management of your Stax Policies
TasksRetrieves the details and status for asynchronous operations
UsersOperations relating to the management of your Stax Users
WorkloadsOperations relating to the management of your Stax Workload Catalogs and Workloads

Rate Limiting

The rate limit is the maximum number of requests that you can make using the Stax Python SDK in a given period. There are no limits on the requests that you make.

The back-off requirement is the minimum period of time you must wait before issuing another valid request. Back-off requirements do not apply when using the Stax SDK. See the Stax Service Level Agreement for more details.

Tracking Headers

Stax include the following user-agent headers in all calls made from the Stax SDK for internal analytics and support purposes. This data provides valuable insight which Stax use to identify bugs, improve the SDK and enhance your developer experience.

Header detailValue
platformThe client operating system being used
python_versionThe version of Python being used
sdk_versionThe version of the Stax SDK being used

Troubleshooting

This section describes some common issues that you may encounter while attempting to use the SDK and suggests possible solutions.

Exporting API Token Secret Key as environment variable fails

As the API Token Secret Key may contain special characters, try enclosing your Secret Key in single quotes, as shown in the following example:

export STAX_SECRET_KEY='<your_secret_key>'

"Could not find a version that satisfies the requirement staxapp" error

If you receive the following error in your console after attempting to install the staxapp pip module, you are using an unsupported version of Python. You must upgrade to Python 3.6 or greater.

pip install staxapp

ERROR: Could not find a version that satisfies the requirement staxapp (from versions: none)
ERROR: No matching distribution found for staxapp

A recent change to an API Token's role does not change the token's permissions

If you have an active session, you will be required to re-initialize the SDK for the role change to take effect.

Release Notes

Information on new features, fixes and older release versions can be found here:

Stax Platform Status

The availability of the Stax SDK is dependant on the Stax Platform. To monitor the availability and read status updates about outages, please visit the status page. There, you can also subscribe to notifications.

Contributing

View the source code, browse our open-source GitHub repository and contribute! For more information on contributing to the Stax SDK, please see our guide.

Open Issues

You can review all open Stax SDK issues in GitHub.

Getting Help

  1. If you've encountered an issue, found a bug or want to request a feature, please open an issue in GitHub.

  2. If you would like to raise a feature request or report an issue relating to the Stax Platform or API, please raise a Stax Support Case from within your Stax console. In order to speed up the resolution of your issue, provide as much information as possible. This will allow our engineers to investigate your problem quickly.

License

Stax Python SDK is licensed under the Apache Software License, v2.0.

See also