Skip to content

Bringing things to sdk-ts 1.5 parity#4

Merged
krider2010 merged 7 commits intomainfrom
claire/eng-191-python
Jul 13, 2025
Merged

Bringing things to sdk-ts 1.5 parity#4
krider2010 merged 7 commits intomainfrom
claire/eng-191-python

Conversation

@krider2010
Copy link
Contributor

Key Features Added:

  • Event metadata - Optional metadata field with backward compatibility
  • AdminClient - Push subscription management with complex filtering
  • Waitgroups - Event coordination with TTL support
  • Advanced filtering - Complex conditions, rate limits, deduplication
  • Subscriber pattern - Multi-processor long-running event handling
  • HMAC verification - Secure webhook signature validation with timing attack protection
  • Configurable API URLs - Custom base URL support

krider2010 and others added 7 commits July 12, 2025 12:43
- Add optional metadata field to Event dataclass
- Update Event creation in pull() and get_events() methods
- Add comprehensive tests for metadata handling
- Maintain backward compatibility with existing code
- Reflects changes from sdk-ts commit 91828274

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create AdminClient class with register_push_subscription method
- Support for advanced filtering with FilterCondition and ComplexFilter
- Add rate limiting and deduplication parameters
- Comprehensive test coverage with 13 test cases
- Integrate AdminClient into SailhouseClient as admin property
- Reflects changes from sdk-ts commits 950889d7 and aff688ba

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add WaitOptions dataclass with TTL configuration
- Add WaitGroup class for publishing events under a waitgroup
- Add wait() method to SailhouseClient for creating waitgroups
- Update publish() method to support wait_group_instance_id parameter
- Add comprehensive test suite with 12 test cases
- Reflects changes from sdk-ts commit 0ac23c72

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add SailhouseSubscriber class with multi-subscription support
- Support configurable processors per subscription
- Automatic event acknowledgment and error handling
- Add SubscriberOptions and SubscriptionHandler types
- Implement start/stop lifecycle management
- Add subscriber() method to SailhouseClient
- Comprehensive test suite with 15 test cases
- Reflects changes from sdk-ts commit f4c1fbb6

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add PushSubscriptionVerifier class with HMAC-SHA256 verification
- Implement timestamp validation with configurable tolerance
- Add constant-time comparison to prevent timing attacks
- Support signature header parsing (t=timestamp,v1=signature format)
- Add custom PushSubscriptionVerificationError with error codes
- Include both strict and safe verification methods
- Add one-off verification functions for convenience
- Integrate verification methods into SailhouseClient
- Comprehensive test suite with 30 test cases including security scenarios
- Reflects changes from sdk-ts commit b5af32ea

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix all client methods to use self.base_url instead of self.BASE_URL
- Add tests for custom base URL initialization and usage
- Ensure custom API URLs are properly used in all HTTP calls
- Maintain backward compatibility with default URL

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update version to 1.5.0 in pyproject.toml and __init__.py
- Aligns with sdk-ts version 1.5.0 which included HMAC verification
- Python SDK now has feature parity with TypeScript SDK

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@krider2010 krider2010 requested a review from estephinson July 12, 2025 12:07
@krider2010 krider2010 merged commit 672ab58 into main Jul 13, 2025
1 check passed
@krider2010 krider2010 deleted the claire/eng-191-python branch July 13, 2025 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants