- Synchronous client:
from codesphere.sync import CodesphereSDKmirrors the async API with identical signatures (generated from the async source via unasyncd; parity is enforced in CI). Request/response models are shared between both flavors via the newcodesphere.modelspackage. - Per-call timeout: every API method now accepts a keyword-only
timeout=(float orhttpx.Timeout) that overrides the client-wide timeout for that call only (applied per retry attempt). - Hosted documentation site (mkdocs-material + mkdocstrings) with
quickstart, guides, full API reference, and
llms.txt; deployed to GitHub Pages on pushes tomain.
- Concurrency guide covering what is safe to share, how stale models
work, and the lost-update windows the Codesphere API provides no way
to close (it has no ETags,
If-Match, or idempotency keys). Workspace.refresh()andDomain.refresh()re-read an entity from the server in place.
wait_for_stage()pins the pipeline run it is waiting on by its start time and raisesConflictErrorif someone else restarts the stage meanwhile, instead of silently reporting the outcome of a run the caller never started.wait_for_stage()andwait_until_running()now measure theirtimeoutagainst the wall clock. Previously only the sleeps counted, so slow status requests could overrun the deadline substantially.- Reusing a
LogStreamraisesClientStateErrorinstead of stranding the first stream context or surfacing a rawhttpx.StreamConsumed. - Sharing one SDK across tasks or threads is now safe.
open()/close()are reference counted, so nested and concurrent scopes no longer tear the transport down for each other, and two threads racingopen()in the sync client can no longer each build (and orphan) a connection pool. Closing while a request is in flight now raises the newClientStateErrorinstead of leaking httpx's bareRuntimeError. sdk.flags.invalidate()is no longer discarded when a flags fetch is already in flight; the stale snapshot used to be reinstated silently. Thelegacy_platformmarker in feature-flag errors can also no longer come from a different fetch than the snapshot it is reported with.- A
404on a retriedDELETEis treated as success. Previously a teardown that had actually succeeded reportedNotFoundErrorwhen the first attempt's response was lost behind a gateway error. A404on the first attempt still raises.
- Breaking: writes no longer copy values back into the local model.
Workspace.update(),Domain.update(),Domain.update_workspace_connections()andDomain.verify_status()now mark the instance stale: reading a field,to_dict(),to_json()orto_yaml()raises the newStaleModelErroruntil you callawait refresh(). The platform orders writes by arrival while the client sees them by response, so the old write-back could leave a model reporting a value the platform did not hold. Identity fields (id, orname/team_idfor domains) stay readable.Domainmethods still return the server's response, which is authoritative — prefer it over re-readingself. - Retries on transient failures are now enabled by default
(
max_retries=2). Idempotent methods (GET,HEAD,PUT,DELETE) are retried on429/502/503/504and connect/timeout errors. SetRetryConfig(max_retries=0)to restore the previous opt-in behavior.POSTis still never retried unless explicitly added toretry_methods. - Debug/error logs no longer include request or response bodies (they can contain secrets such as env-var values); only structural information is logged.
- Package classifiers:
Development Status :: 5 - Production/StableandTyping :: Typed.
- The deprecated module path
codesphere.resources.workspace.envVars(usecodesphere.resources.workspace.env_vars). codesphere.utils.update_model_fields, the helper behind the removed write-back behavior. It had no remaining callers.
- feat(usage): Add usage history manager (#49)
- feat(pipeline-stream): add log stream (#46)
- feat(git): add git resource (#45)
- feat(landscape): add landscape resource (#41)
- feat(model-export): provide model methods to export data (#40)
- feat(exceptions): add base exceptions (#39)
- feat(agent): add copilot instructions (#35)
- feat(domain): add domains resource (#33)
- feat(workspace): implement base operations for workspaces (#32)
- refactor: Change README file (#37)
- refactor(filetree): reorganize files (#30)
- refactor(team): streamline api operations pattern (#29)
- release process (#51)
- demo(dashboard): add dashboard demo (#50)
- refac(commit-hook): remove commitizen (#38)
- test: fix ci
- test(suite): set up initial testsuite (#36)
- chore(test): test maintenance (#28)
- chore(types): clean types annotations (#10)
- src/codesphere/resources/workspace/env-vars: support env-vars endpoints of public api
- src/resources/metadata: implement metadata endpoints
- internal CI fixes
- .github/workflows/ci.yml: fix trigger
- codesphere/workspace: add workspace resources
- .github/ci.yml: fix trigger condition
- src/codesphere/team: adding team resources from public api
- fix-repository-url-on-pypi: fix repository url on pypi
- initial-project-setup: initial project setup