Skip to content

Login to PyCape#

To use pycape, you'll need to generate a user token. You'll use this token to authenticate requests to Cape Cloud.

After setting up an account in Cape, ensure you are working within your user context and navigate to Account Settings to generate a user token.

Take note of this value as you cannot recover it after you reload the page.

c = Cape()
c.login(token="abc,123", endpoint="http://cape.com")

It is also possible to set your Auth Token and Coordinator endpoint via the environment variables CAPE_TOKEN and CAPE_COORDINATOR.

# Call the login method after exporting CAPE_TOKEN and CAPE_COORDINATOR.
c = Cape()
c.login()

Default response:

Login successful