PolyaxonClient

polyaxon.client.client.PolyaxonClient(token=None)

Auto-configurable and high-level base client that abstract the need to set a configuration for each service.

PolyaxonClient comes with logic to pass config and token to other specific clients.

If no values are passed to this class, Polyaxon will try to resolve the configuration from the environment:

  • If you have a configured CLI, Polyaxon will use the configuration of the cli.
  • If you use this client in the context of a job or a service managed by Polyaxon, a configuration will be available.

N.B. PolyaxonClient requires python >= 3.5,

if you want to interact with Polyaxon using a client compatible with python 2.7 please check polyaxon-sdk.

  • Args:
    • config: ClientConfig, optional, Instance of a ClientConfig.
    • token: str, optional, the token to use for authenticating the clients, if the user is already logged in using the CLI, it will automatically use that token. Using the client inside a job/service scheduled with Polyaxon will have access to the token of the user who started the run if the auth context is enabled.

You can access specific clients:

client = PolyaxonClient()

client.projects_v1
client.runs_v1
client.auth_v1
client.users_v1
client.agents_v1
client.component_hub_v1
client.model_registry_v1