Repository navigation
Open
Labels
t-buildersIssues owned by the Builders team.
Description
This issue adds shared env vars (variables that are stored once per account and that Actor version env vars reference by name) to the Python client, with the same operations as the JavaScript client (apify/apify-client-js#1209). It also lets an Actor env var hold a reference (shared_env_var_name) in place of a value.
Scope
- Add
shared_env_vars()andshared_env_var(name)clients with the same operations as the JavaScript client, sync and async. The collection client haslistandcreate. The client of one variable hasget,update,deletewith aforceoption, andusagewith paging. - Check how the name gets into the URL path. Proposed: a stored name holds only letters, digits, and
_(apify/apify-core#32547), and such a name needs no special handling. If stored names keep the rule of version env vars instead, send the name as one URL-encoded path segment, without the replacement of/by~that the resource clients apply to IDs (to_safe_idinsrc/apify_client/_utils/http.py). With that replacement, the nameA/Bwould be sent asA~B. - Add
shared_env_var_nameto the env var models, regenerated from OpenAPI. Version create and update validate theirenv_varswithEnvVarRequest, so they accept a reference after that. - Add a
shared_env_var_nameargument tocreateandupdateof the Actor env var clients, and makevalueoptional there. Both requirevaluetoday. - Add integration tests next to the ones for Actor env vars (
tests/integration/). They call the live API with the test user's token. Until the release, a feature flag closes the store for accounts without it, so that account needs the flag.
Done when
- Unit and integration tests cover the new clients, sync and async, and a reference on an Actor env var.
- A release with the new clients is on PyPI.
Depends on
- The OpenAPI definitions (Add OpenAPI definitions for shared env vars apify-docs#3218), published
Metadata
Metadata
Assignees
Labels
t-buildersIssues owned by the Builders team.
Activity