Baserowapi

Latest version: v0.1.0b4

Safety actively analyzes 682244 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.1.0b4

- **Breaking Changes:**
- **Renaming:**
- `table.add_row()` renamed to `table.add_rows()` for consistency.
- `row.content` renamed to `row.to_dict()` for a more Pythonic approach.
- **Field Value Change:**
- `lookup_field`: Value is now a list of values from linked rows in the linked table.
- **Iterator Changes:**
- Replaced `RowIterator` class with a standard Python generator.
- `table.get_rows()` no longer supports the `return_single` option.


- **Changes:**
- **Field Handling:**
- Moved all `format_for_api` functions to field classes for consistency.
- **Field Validation:**
- Fixed validation in `base_text_field`.
- Improved validation for `password_field`, `base_date_field`, and `row.update()`.
- `base_date_field`: Validation and `format_for_api` now allow Python datetime ISO format.
- `base_date_field`: Setting date field values allows slashes, single-digit months and days, and two-digit years.
- `base_date_field`: Setting date & time fields allows bare dates, assuming `T00:00:00Z`.
- Added `validate_value` support for `None` values in `BaseTextClass`.
- **Field Formatting:**
- Added `format_for_api` to `single_select_field` and `multiple_select_field`.
- `file_field`: File uploads now use a dedicated requests session to avoid `Content-Type` issues.
- **Field Enhancements:**
- `file_field`: Use `visible_name` when downloading fields.
- **New Properties:**
- `table`: Added `writable_fields` property.
- `row`: Added `row.fields` property.
- `table.get_rows()`: Added `limit` and `iterator` parameters. Returns a list of rows by default.
- **Validation Improvements:**
- Improved validation for data passed in `row.update()`.
- `table.update_rows()`: Uses `writable_fields` for validation.
- `table.get_row()`: Improved input validation.
- **Documentation:**
- Updated documentation for the recent changes.
- **Testing:**
- Added a basic set of functional tests.

0.1.0b3

- **New Features:**
- **Generic Field Type:** Added a generic field type to serve as a default if a specific field type is not available.
- **Password Field Type:** Added a password field type.
- **Long Text Enhancements:** Introduced `long_text_enable_rich_text` property for long_text field type.
- **Link Row Enhancements:** Added `get_options` method for link_row field type, which returns a list of values from the primary field of the related table.
- **Link Row Field Properties:** Added `link_row_related_field_name` property to provide the field name for `link_row_related_field_id` in the related table.
- **Link Row Limit Selection View:** Added `link_row_limit_selection_view_id` property to link_row fields.
- **Count Field Enhancements:** Added `table_id` property to count field type.
- **Documentation Updates:** Updated documentation for linked fields.

- **Enhancements:**
- **Validation Improvements:** Added basic validation for link_row fields, ensuring the value is a list of strings or integers.
- **Client Integration:** Added the baserow client to all Field class objects, enabling them to perform database operations. This was implemented primarily for the `TableLinkField`'s `get_options` function, which retrieves a list of valid options from the primary field of the linked table.
- **Filter Corrections:** Corrected the compatible filters list for the lookup field type.
- **Field Updates:** Corrected compatible filters for number field.

- **Removals:**
- **Deprecated Functions:** Removed `link_row_related_field` and `link_row_related_table` as the API sets these to the same values as `link_row_related_field_id` and `link_row_related_table_id`.
- **Redundant Methods:** Removed `get_options` and `get_related_table` functions from the `TableLinkRowValue` class, as these are more appropriate for the field class.

0.1.0b2

- **Enhancements:**
- **Improved Filter Handling:** The `_build_request_url` method of the `Table` class now uses a JSON serialized filter tree for more efficient and accurate filtering.
- **RowIterator Enhancements:** Added `reset` and `reset_index` methods to `RowIterator` objects. `reset` will refetch data from the API, while `reset_index` only resets the internal index without refetching.
- **Batch Size Parameter:** Added `batch_size` parameter to `Table` methods `add_row`, `update_rows`, and `delete_rows` to avoid excessively large API calls. The default `batch_size` is set to 10 rows.
- **Paging Fixes:** Improved `RowIterator` and `make_api_request` functions to handle paging correctly.

- **Bug Fixes:**
- **Parameter Correction:** Fixed incorrect "page_size" parameter in `Table.get_rows` method, changing it to "size".
- **Test Updates:** Removed tests for the obsolete `FieldValidator` class.

0.1.0b1

- Initial beta release.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.