Version history for envless-sdk, the Python client for the Envless API, published on PyPI. Pin it for the latest coverage, security patches and type fixes. When a newer version is out, the client says so once on a terminal, with a link to this page.
The TypeScript SDK, @goenvless/sdk, has its own changelog. The two cover the same API, and a change to one lands in the other.
Next release
Each list method takes only the options its route reads. The keyword arguments now match the TypeScript option types route by route, so an option the API ignored is no longer accepted and a filter it honors is no longer missing. Passing a removed keyword raises TypeError instead of being sent and ignored.
members.list,list_allanditerategainrole_id=, androles.list,list_allanditerategainsort_by=('name','updated'or'created')- Removed where the route ignores them:
order=andproduct=on members, invites and roles,search=andorder=on variables, versions, version entries and variable history,product=on products, keys and webhooks, and everything butlimit=andoffset=on workspaces andproducts.access variables.get_by_id,update_by_id,delete_by_id,versions.getandversions.rollbackno longer takeproduct=and stop sending?product=, and neither doesrotate_workspace_passphrasewhen it updates variablesVariableInputandVariablePatchacceptisSecret, andApplyUpdateEntryacceptsname, which renames the variable insidevariables.apply
v0.0.2
Rotation reports every default it cannot move. rotate_workspace_passphrase now lists in failures any version entry whose value is empty or plaintext while its defaultValue is ciphertext, with scope set to 'versionEntry' and field to 'defaultValue'. The API only rewrites version entries that carry a ciphertext value, so such a default stayed sealed under the old passphrase while the run looked clean. Keep the old passphrase until those entries are dealt with.
v0.0.1
Initial release. The Python twin of the TypeScript SDK, covering 100% of the public HTTP API: all 113 methods across 13 namespaces, under their TypeScript names in snake_case. A parity check replays every method through both Python clients against the requests the TypeScript SDK records, with no options and with every option set, and fails the build on any difference in the request, the retries, the errors or the result.
Clients
Envlessfor synchronous code andAsyncEnvlessfor asyncio and trio, with the same methods, arguments and results, generated from one sourcefrom envless import envlessis a ready made client built fromENVLESS_TOKENandENVLESS_API_ENDPOINTthe first time it is touched, andinit(...)configures it once at startup.get_client()returns it andreset_client()drops itcreate_clientisEnvlessunder the TypeScript name. Unlike TypeScript'snew Envless(), both Python constructors read the environment for whatever you leave out- Namespaces:
me,workspace(withworkspace.domain),workspaces,products(withproducts.access),projects,environments,variables,versions,members,invites,roles,keys,webhooks - Request bodies and results are plain dicts keyed by the API's own field names, and every one has a
TypedDictinenvless.types. The package shipspy.typed - Options are keyword arguments:
product=,limit=,offset=,search=,order=,status=,reattempt=, andtimeout=on every method raw.request(path, method=..., query=..., body=...)reaches an endpoint no method wraps yet, with the client's key, base URL, timeout and retries- Bring your own
httpx.Clientorhttpx.AsyncClientashttp_clientfor a proxy, custom TLS orhttpx.MockTransportin tests. Redirects are followed whatever it says
Pagination
- Every collection has
listfor one page,list_allfor everything, anditeratefor a lazy stream,async foronAsyncEnvless - Secondary collections get their own trio:
products.list_projects,products.access.list,variables.list_history,versions.list_entries,webhooks.list_deliveries, each withlist_all_*anditerate_*forms - The walk ends on
hasMorebeingFalseor an empty page, and advances by the items actually received
Errors
EnvlessApiErrorcarries the stablecodeplusstatus,message,resource,field,request_idandretry_after_seconds, with properties for the common branches:is_auth,is_scope_missing,is_validation,needs_upgrade,is_not_found,is_conflict,is_rate_limitedEnvlessNetworkErrorfor transport failures, withis_timeoutwhen the deadline passed.DecryptionErrorandWebhookVerificationErrorfor the crypto and webhook helpers. All of them inheritEnvlessError, and all of them pickleGET,HEAD,PUTandDELETEare retried on408,429,500,502,503and504with exponential backoff capped at 30 seconds, honouringRetry-After.POSTandPATCHare never retriedtimeoutis a hard deadline for each attempt, the response body included, on both clients.0turns it off- A variable name is checked before anything is sent, and an unusable one raises the same
EnvlessApiErrorthe API would, withrequest_idset toNone
Encryption
encrypt_valueanddecrypt_value, byte-for-byte compatible with the TypeScript SDK, the CLI, the dashboard and@goenvless/env: AES-256-GCM under a PBKDF2-SHA-256 key with 200,000 iterations and the workspace salt.v1:andv2:<iterations>:envelopes both decryptderive_workspace_keyandimport_workspace_keyreturn aWorkspaceKeythat never prints its bytes, forencrypt_with_keyanddecrypt_with_keyacross a batchis_ciphertext,passphrase_strength,variable_name_validationandENCRYPTION_PARAMETERSrotate_workspace_passphrase(client=..., ...)re-encrypts an environment's live variables and its version history, with either client
Webhooks
verify_webhook_signature(payload=..., headers=..., secret=...)checks the HMAC-SHA256 signature in constant time and the timestamp drift, then returns the parsed event. It takes the raw body asbytesorstrand headers from any framework, matched case-insensitively
Runtime
- Python 3.10 or newer. Depends on
httpx,anyio,cryptographyandtyping-extensions - Every request carries
User-Agent: envless-sdk-python/0.0.1