API Documentation

The documentation for the SwiftyRx can be found at https://acme.swiftyrx.dev/api/ui/

Client Installation

The Python clients are pushed to PyPi and can be installed with the following references:

“rxfoundry.clients.swifty-oauth-api” = “>=0.0.{version}”

“rxfoundry.clients.swifty_api” = “>=0.0.{version}”

Where {version} corresponds to the last segment of the version shown in the upper left corner of the API documentation.

See the following for more details on the install packages:

Example Usage

Authorization

get_token_example.py
 1import rxfoundry.clients.swifty_oauth_api
 2from rxfoundry.clients.swifty_oauth_api import TokenResponse, UserInfoResponse
 3from rxfoundry.clients.swifty_oauth_api.rest import ApiException
 4
 5def get_auth_tokens(host: str, username: str, password: str) -> TokenResponse | None:
 6    configuration = rxfoundry.clients.swifty_oauth_api.Configuration(host=host)
 7    with rxfoundry.clients.swifty_oauth_api.ApiClient(configuration) as api_client:
 8        api_instance = rxfoundry.clients.swifty_oauth_api.OAuthApi(api_client)
 9        get_token_request = rxfoundry.clients.swifty_oauth_api.GetTokenRequest(
10            grant_type="password", username=username, password=password
11        )
12
13        try:
14            api_response = api_instance.get_token(get_token_request)
15            return api_response
16        except ApiException as e:
17            print("Exception when calling DefaultApi->get_token: %s\n" % e)

User Information

get_userinfo_example.py
 1import rxfoundry.clients.swifty_oauth_api
 2from rxfoundry.clients.swifty_oauth_api import TokenResponse, UserInfoResponse
 3from rxfoundry.clients.swifty_oauth_api.rest import ApiException
 4
 5configuration = rxfoundry.clients.swifty_oauth_api.Configuration(host=host)
 6with rxfoundry.clients.swifty_oauth_api.ApiClient(configuration) as api_client:
 7     api_instance = rxfoundry.clients.swifty_oauth_api.OAuthApi(api_client)
 8     try:
 9         api_response = api_instance.get_user_info(
10             _headers={"Authorization": f"Bearer {token}"}
11         )
12         return api_response
13     except ApiException as e:
14         print("Exception when calling DefaultApi->get_user_info: %s\n" % e)

Full Example

A more complete example of using the Python SDK can be found on Github