Skip to content

Conversation

@nisukapalli
Copy link

Implemented Python SDK – high-level wrapper over GraphLite FFI bindings.

Components:

  • GraphLite: Database connection with factory pattern (classmethod open())
  • Session: User context for query execution and transaction management
  • Transaction: ACID transactions with context manager support (auto-rollback)
  • QueryBuilder: Fluent API for constructing GQL queries with method chaining
  • TypedResult: Type-safe result deserialization into Python dataclasses
  • Error hierarchy: Comprehensive exception classes (ConnectionError, SessionError, QueryError, TransactionError, SerializationError)

Features:

  • Clean Pythonic API following sqlite3 conventions
  • Full type hints for IDE support
  • Lazy imports to avoid circular dependencies (TYPE_CHECKING pattern)
  • Context managers for automatic resource cleanup
  • Comprehensive error handling with custom exception hierarchy

Examples:

  • basic_usage.py: Demonstrates all core SDK features
  • README.md: Complete documentation with API reference and examples

Architecture:
Application → Python SDK (this PR) → FFI Bindings (ctypes) → GraphLite Core (Rust)

@GajananCh GajananCh requested review from arvikar83 and removed request for ochinchw November 22, 2025 03:41
@GajananCh
Copy link
Contributor

GajananCh commented Nov 22, 2025

Issue: #19

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.

3 participants