Skip to content

Conversation

@fresh-borzoni
Copy link
Contributor

Purpose

Linked issue: close #137

Adds a Python append() method to enable single-row inserts with support for dict, list, and tuple input formats, providing a more ergonomic API for appending individual rows compared to batch operations.

Brief change log

  • Add append() method to Python Table class with support for dict, list, and tuple input
  • Implement RowInput enum with FromPyObject derive for automatic type dispatch
  • Add python_to_generic_row() function to convert Python values to GenericRow with strict validation
  • Add python_value_to_datum() function with type-specific conversions, optimized bytes extraction, and field-level error messages
  • Add Python patterns to .gitignore to exclude __pycache__/ and *.so files
  • Add usage examples and type stubs for the new API

API and Format

API Changes: Yes

  • New public method: Table.append(row) accepting dict | list | tuple
  • Blocking operation (releases GIL during execution)

Storage Format: No changes

Documentation

New Feature: Yes

  • Added docstring with examples for dict, list, and tuple input
  • Added type stubs in __init__.pyi
  • Added usage examples in example/example.py

@fresh-borzoni
Copy link
Contributor Author

@luoyuxia PTAL, when comfortable 🙏

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.

Add row-level append() API for single-record operations in python bindings

1 participant