Skip to content

feat: update Python bindings with new methods and add tests#33

Merged
joshrotenberg merged 1 commit into
mainfrom
feat/python-bindings-update
Jan 30, 2026
Merged

feat: update Python bindings with new methods and add tests#33
joshrotenberg merged 1 commit into
mainfrom
feat/python-bindings-update

Conversation

@joshrotenberg
Copy link
Copy Markdown
Contributor

Summary

  • Update Python bindings with new methods from recent Rust API changes
  • Add dedicated pytest test suite for Python bindings

Python Bindings Updates (Closes #24)

New Methods

  • account() / account_sync() - Get current account information
  • all_databases(subscription_id) / all_databases_sync(subscription_id) - Get all databases with automatic pagination (uses the new Rust pagination helper)

New Property

  • client.timeout - Get the configured timeout in seconds

Documentation

  • Updated README with complete Python API documentation

Python Tests (Closes #16)

Added python/tests/test_client.py with pytest tests covering:

  • Client creation with explicit credentials
  • Client creation with custom base URL and timeout
  • from_env() with valid/missing environment variables
  • Alternate environment variable names (REDIS_CLOUD_ACCOUNT_KEY, etc.)
  • Method existence verification (all async/sync method pairs)
  • Error type exports (RedisCloudError)
  • Module exports (version)

Test plan

  • Python bindings compile (cargo check in python/)
  • Main crate tests pass (220 tests)
  • cargo clippy --all-targets --all-features -- -D warnings passes
  • cargo fmt --all -- --check passes
  • Python tests require maturin develop + pytest (run in CI)

Closes #24
Closes #16

Python bindings updates (#24):
- Add timeout property getter
- Add account() / account_sync() methods
- Add all_databases() / all_databases_sync() for auto-pagination
- Update README documentation for Python API

Python tests (#16):
- Add tests/test_client.py with pytest tests for:
  - Client creation with credentials
  - Client creation with custom timeout and base URL
  - Environment variable handling (from_env)
  - Method existence verification
  - Error type exports
  - Module exports

Closes #24, Closes #16
@joshrotenberg joshrotenberg merged commit bde357c into main Jan 30, 2026
10 checks passed
@joshrotenberg joshrotenberg deleted the feat/python-bindings-update branch January 30, 2026 05:12
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.

chore: Update Python bindings after Rust API changes test: Add dedicated tests for Python bindings

1 participant