feat: ergonomic EverOS client wrapper - #11
Merged
Conversation
Hand-maintained facade over the generated MemoryApi/StorageApi — plain kwargs/dicts in, response .data out — exported as `from everos_cloud import EverOS`. - everos_cloud/client.py: EverOS with add/search/get/flush/edit/delete + end-to-end upload() (presign + direct-to-S3) and presign(); unified EverOSError hierarchy; default request timeout; flush getattr-fallback so it survives the flush_api_v2_memory_flush_post -> flush_memory rename. - everos_cloud/__init__.py: export EverOS (guarded try/except so a bare generated tree without client.py still imports). - tests/test_client.py: 18 offline unit tests (API layer mocked). - ci.yml: run the wrapper tests + assert the top-level EverOS export. Validated: 18 unit tests green; the direct-to-S3 upload mechanics verified against real S3 (204, incl. the presigned Content-Type condition) via the storage sign endpoint. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a thin, hand-maintained ergonomic facade over the generated
MemoryApi/StorageApi, so users getfrom everos_cloud import EverOSwith plain kwargs/dicts instead of assembling typed models by hand.What's in it
everos_cloud/client.py—EverOSwithadd / search / get / flush / edit / delete, end-to-endupload()(presign + S3 POST) andpresign(), plusclose()/ context-manager.EverOSErrorhierarchy (EverOSAPIErrorwraps the SDK'sApiException;EverOSStorageError).flushuses a getattr fallback, so it keeps working across theflush_api_v2_memory_flush_post→flush_memoryrename.client.memory/client.storagestay exposed as escape hatches.everos_cloud/__init__.py— exportsEverOS(guardedtry/exceptso the factory's bare generated tree, which has noclient.py, still imports).tests/test_client.py— 18 offline unit tests (API layer mocked).EverOSexport.Validation
Content-Typepolicy condition) via the storage sign endpoint.close()bug (the generatedApiClienthas no.close()) was caught by live testing and fixed.add→flush→searchreturning 2xx) — blocked because available test accounts are v1-only (v2 returnsVERSION_NOT_ALLOWED). Low residual risk; will smoke once a v2 account exists.Requires factory change
client.pyandtests/are hand-maintained; the SDK factory must preserve them across regeneration and keep the__init__export. Companion factory MR to follow.🤖 Generated with Claude Code