Setup and authentication¶
cloudsprite init stores a key locally; otherwise export CLOUDSPRITE_API_KEY.
Then connect and pick your scope:
import cloudsprite as cs
cs.connect() # raises cs.AuthError on a bad/expired key
cs.set_org("acme") # only needed for multi-org keys
cs.set_team("rf-lab")
cs.set_project("cable-qual")
connectauthenticates; nothing else works before it.set_org/set_team/set_projectset the defaults that collection properties likecs.datasetsread from.
In libraries and notebooks, prefer an explicit client over module-level state so two sessions cannot clobber each other's scope:
client = cs.Client(api_key=..., org="acme", team="rf-lab")
API keys are created in the web app — see API keys and login.