Adds documentation, fixes configuration bugs, and aligns both SDKs with the actual database schema.
Python SDK Changes
Documentation
sdk/python/README.md — install, usage, error handling, method group reference, and examples.
Bug Fixes
sdk/python/pyproject.toml — packages.find was where=[".."] include=["services*", "sdk*"] which would bundle the entire services/ directory into the pip package. Fixed to where=["."] include=["kokonut*"]. Removed unnecessary psycopg2-binary hard dependency (SDK is a REST client, never uses psycopg2). Added license and [project.urls].
sdk/python/kokonut/__init__.py — exported error classes (KokonutError, AuthenticationError, NotFoundError, ForbiddenError, ValidationError) so users can from kokonut import NotFoundError directly.
Quality Improvements
sdk/python/kokonut/py.typed — PEP 561 marker for type-checking support.
sdk/python/kokonut/types.py — added format, entity_type, entity_ids fields to ExportLog dataclass.
sdk/python/kokonut/methods.py — enriched ExportMethods.create_export with format, entity_type, entity_ids params to match JS SDK.
JS SDK Bug Fixes (found during Python comparison)
sdk/javascript/src/methods.ts — listByEntity was filtering on entity_type/entity_id, but the attestation_record table uses subject_type/subject_id (confirmed in 006_web3.sql:178-179). Fixed to use correct column names.
sdk/javascript/src/methods.ts — listAnomalies was filtering on anomaly_flag = true, but sensor_reading has no anomaly_flag column. The correct filter is quality = "suspect" (confirmed in 005_environmental.sql:171). Fixed.
Verification
Python SDK: from kokonut import KokonutClient, NotFoundError, ForbiddenError works
pyproject.toml: pip install -e . installs only the kokonut package, not services/
JS SDK: listByEntity and listAnomalies now use correct database column names
Summary
Adds documentation, fixes configuration bugs, and aligns both SDKs with the actual database schema.
Python SDK Changes
Documentation
sdk/python/README.md— install, usage, error handling, method group reference, and examples.Bug Fixes
sdk/python/pyproject.toml—packages.findwaswhere=[".."] include=["services*", "sdk*"]which would bundle the entireservices/directory into the pip package. Fixed towhere=["."] include=["kokonut*"]. Removed unnecessarypsycopg2-binaryhard dependency (SDK is a REST client, never uses psycopg2). Addedlicenseand[project.urls].sdk/python/kokonut/client.py— renamedPermissionError→ForbiddenErrorto avoid shadowing Python's built-inPermissionError(which breaksexcept PermissionErrorpatterns).sdk/python/kokonut/__init__.py— exported error classes (KokonutError,AuthenticationError,NotFoundError,ForbiddenError,ValidationError) so users canfrom kokonut import NotFoundErrordirectly.Quality Improvements
sdk/python/kokonut/py.typed— PEP 561 marker for type-checking support.sdk/python/kokonut/types.py— addedformat,entity_type,entity_idsfields toExportLogdataclass.sdk/python/kokonut/methods.py— enrichedExportMethods.create_exportwithformat,entity_type,entity_idsparams to match JS SDK.JS SDK Bug Fixes (found during Python comparison)
sdk/javascript/src/methods.ts—listByEntitywas filtering onentity_type/entity_id, but theattestation_recordtable usessubject_type/subject_id(confirmed in006_web3.sql:178-179). Fixed to use correct column names.sdk/javascript/src/methods.ts—listAnomalieswas filtering onanomaly_flag = true, butsensor_readinghas noanomaly_flagcolumn. The correct filter isquality = "suspect"(confirmed in005_environmental.sql:171). Fixed.Verification
from kokonut import KokonutClient, NotFoundError, ForbiddenErrorworkspip install -e .installs only thekokonutpackage, notservices/listByEntityandlistAnomaliesnow use correct database column names