Async Table

The async Table module provides functionality for working with tables.

class AsyncTableRow(table, data={})[source]

Bases: AsyncBase

Parameters:
__init__(table, data={})[source]

Constructs all the necessary attributes for the AsyncTableRow object.

Parameters:
  • table (AsyncTable) – The table that the row belongs to.

  • data (Dict, optional) – The data of the field.

__repr__()[source]

Return a string representation of the AsyncTableRow.

Returns:

The string representation of the AsyncTableRow.

Return type:

str

__getattr__(name)[source]

Get an attribute from the resource.

Parameters:

name (str) – The name of the attribute

Return type:

Any

async classmethod create_row(table, **kwargs)[source]

[async] Create a new row in the table.

Each keyword argument represents a field value for the row, where:
  • The keyword is the field name

  • The value is the field value

Parameters:

table (AsyncTable) – table instance

Keyword Arguments:

**kwargs – Arbitrary field values matching the table schema.

Returns:

created table row instance

Return type:

AsyncTableRow

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable, AsyncTableRow
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
or
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
>>>     row_data = {
...        'field1': 'value1'
...     }
>>>     row = await table.create_row(row_data)
or
>>>     row = await AsyncTableRow.create_row(table, row_data)
async classmethod get_row(table, row_id, user_id)[source]

[async] Get a row by its id

Parameters:
  • table (AsyncTable) – the table instance

  • row_id (int) – the row id

  • user_id (int, optional) – specific user. privileges required.

Returns:

the table row instance

Return type:

TanbleRow

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable, AsyncTableRow
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
or
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
>>>     row = await table.get_row(row_id=1)
or
>>>     row = await AsyncTableRow.get_row(table, row_id=1)
async update(**kwargs)[source]

[async] Update a row

Keyword Arguments:

update (fields to)

Returns:

updated row data

Return type:

Dict

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
>>>     row = await table.get_row(row_id=1)
>>>     await row.update(field1='new_value')
async delete()[source]

[async] Delete a row

Returns:

None

Return type:

None

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
>>>     row = await table.get_row(row_id=1)
>>>     await row.delete()
async _get_other_side_of_relationship(relationship)[source]

[async] Determine which side of a relationship this table is on and return the opposite side.

Used internally to navigate bidirectional relationships.

Parameters:

relationship (AsyncRelationship) – The relationship to examine.

Returns:

The endpoint (table or layer) on the opposite side of the relationship from this table.

Return type:

AsyncTable | AsyncVectorLayer

Raises:

ValueError – If this table is not part of the given relationship.

Note

This method assumes the table is either the source or target, not the relation table in Many-to-Many relationships.

[async] Fetch related rows/features from a relationship target.

Internal helper that dispatches to the appropriate API method based on target type.

Parameters:
  • target (AsyncTable | AsyncVectorLayer) – The target endpoint (Table or VectorLayer) to query.

  • relationship_uuid (str) – UUID of the relationship to traverse.

Raises:

TypeError – If target is not a Table or VectorLayer.

Returns:

Related rows or features.

Return type:

List[AsyncTableRow] | List[AsyncFeature]

[async] Get the related records on the other side of the relationship that are linked to this row

Parameters:

relationship_uuid (str) – The uuid of relationship

Returns:

a list of the related records

Return type:

List[AsyncTableRow] | List[AsyncFeature]

Raises:
  • ValueError – If the given relationship does not involve the current table (i.e., this row is neither the source nor the target of the relationship).

  • TypeError – If the relationship target type is not supported for fetching related records.

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
>>>     row = await table.get_row(row_id=1)
>>>     related_records = await row.get_related_records(relationship_uuid="12345678-1234-5678-1234-567812345678")
async associate_with(relationship_uuid, *, target_ids=None, q=None)[source]

[async] Create relationships between the source record and target records

Parameters:
  • relationship_uuid (str) – the relationship uuid

  • target_ids (List[int], optional) – a list of target record ids to be associated with the current record

  • q (str, optional) – query filter on target layer or table to select which target features or rows that are going to be related to the current record

Returns:

the record association result

Return type:

Dict

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
>>>     row = await table.get_row(row_id=1)
>>>     await row.associate_with(
...         relationship_uuid="12345678-1234-5678-1234-567812345678",
...         target_ids=[1, 2, 3],
...     )
async disassociate_with(relationship_uuid, *, target_ids=None, q=None)[source]

[async] Remove relationships between the source record and target records

Parameters:
  • relationship_uuid (str) – the relationship uuid

  • target_ids (List[int], optional) – a list of target record ids to be disassociated with the current record

  • q (str, optional) – query filter on target layer or table to select which target features or rows that are going to be related to the current

Returns:

the record disassociation result

Return type:

Dict

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
>>>     row = await table.get_row(row_id=1)
>>>     await row.disassociate_with(
...         relationship_uuid="12345678-1234-5678-1234-567812345678",
...         target_ids=[1, 2, 3],
...     )
class AsyncTableField(table, data_type, field_id=None, data={})[source]

Bases: AsyncBase

Parameters:
__init__(table, data_type, field_id=None, data={})[source]

Constructs all the necessary attributes for the Field object.

Parameters:
  • table (AsyncTable) – The table that the field belongs to.

  • data_type (FieldType) – type of the field

  • field_id (int) – the id of the field

  • data (Dict, optional) – The data of the field.

__repr__()[source]

Return a string representation of the field.

Returns:

The string representation of the field.

Return type:

str

__getattr__(name)[source]

Get an attribute from the resource.

Parameters:

name (str) – The name of the attribute

Return type:

Any

property domain: Dict

Domain property

Returns:

domain data

Return type:

Dict

async classmethod create_field(table, name, data_type, data={})[source]

[async] Create a new field

Parameters:
  • table (AsyncTable) – field’s table

  • name (str) – name of the field

  • data_type (FieldType) – type of the field

  • data (Dict, optional) – the data of the field

Returns:

the created field object

Return type:

AsyncTableField

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable, AsyncTableField
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
>>>     field = await table.create_field(name='test', data_type=FieldType.Integer)
or
>>>     field = await AsyncTableField.create_field(client, table=table, name='test', data_type=FieldType.Integer)
async delete()[source]

[async] Delete the field.

Returns:

None

Return type:

None

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.field import AsyncTableField
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
>>>     field = await table.get_field(field_id=1)
>>>     await field.delete()
async update(**kwargs)[source]

[async] Update the field.

Keyword Arguments:
  • name (str) – The name of the field.

  • display_name (str) – The display name of the field.

  • description (str) – The description of the field.

  • domain (Dict) – the domain of the field

  • hyperlink (bool) – the hyperlink field.

Returns:

The updated data.

Return type:

Dict

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTableField
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
>>>     field = await table.get_field(field_id=1)
>>>     await field.update(name="my_field", display_name="My Field", description="My Field Description")
async update_domain(range_domain=None, list_domain=None)[source]

[async] Update field domian values

Parameters:
  • range_domain (Dict) – a dictionary with min and max keys.

  • list_domain (Dict) – a dictionary containing the domain codes and values.

Returns:

the updated field domain

Return type:

Dict

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> async with AsyncGeoboxClient() as client:
>>>     field = await client.get_table(uuid="12345678-1234-5678-1234-567812345678").get_fields()[0]
>>>     range_d = {'min': 1, 'max': 10}
>>>     await field.update_domain(range_domain = range_d)
or
>>>     list_d = {'1': 'value1', '2': 'value2'}
>>>     await field.update_domain(list_domain=list_d)
async add_index()[source]

[async] Add an index to a field for better query performance

Returns:

updated field data

Return type:

Dict

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> async with AsyncGeoboxClient() as client:
>>>     field = await client.get_table(uuid="12345678-1234-5678-1234-567812345678").get_fields()[0]
>>>     field.add_index()
async remove_index()[source]

[async] Remove an index from a field

Returns:

updated field data

Return type:

Dict

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> async with AsyncGeoboxClient() as client:
>>>     field = await client.get_table(uuid="12345678-1234-5678-1234-567812345678").get_fields()[0]
>>>     field.remove_index()
class AsyncTable(api, uuid, data={})[source]

Bases: AsyncBase

Parameters:
BASE_ENDPOINT = 'tables/'
__init__(api, uuid, data={})[source]

Initialize a table instance.

Parameters:
  • api (AsyncGeoboxClient) – The AsyncGeoboxClient instance for making requests.

  • uuid (str) – The unique identifier for the table.

  • data (Dict) – The response data of the table.

async classmethod get_tables(api, **kwargs)[source]

[async] Get a list of tables with optional filtering and pagination.

Parameters:

api (AsyncGeoboxClient) – The AsyncGeoboxClient instance for making requests.

Keyword Arguments:
  • include_settings (bool) – Whether to include table settings. default: False

  • temporary (bool) – Whether to return temporary tables. default: False

  • q (str) – query filter based on OGC CQL standard. e.g. “field1 LIKE ‘%GIS%’ AND created_at > ‘2021-01-01’”

  • search (str) – search term for keyword-based searching among search_fields or all textual fields if search_fields does not have value. NOTE: if q param is defined this param will be ignored

  • search_fields (str) – comma separated list of fields for searching

  • order_by (str) – comma separated list of fields for sorting results [field1 A|D, field2 A|D, …]. e.g. name A, type D. NOTE: “A” denotes ascending order and “D” denotes descending order.

  • return_count (bool) – Whether to return total count. default: False.

  • skip (int) – Number of items to skip. default: 0

  • limit (int) – Number of items to return. default: 10

  • user_id (int) – Specific user. privileges required

  • shared (bool) – Whether to return shared tables. default: False

Returns:

A list of table instances or the total number of tables.

Return type:

List[AsyncTable] | int

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     tables = await client.get_tables(q="name LIKE '%My table%'")
or
>>>     tables = await AsyncTable.get_tables(client, q="name LIKE '%My table%'")
async classmethod create_table(api, name, display_name=None, description=None, temporary=False, fields=None)[source]

[async] Create a new table.

Parameters:
  • api (AsyncGeoboxClient) – The AsyncGeoboxClient instance for making requests.

  • name (str) – The name of the AsyncTable.

  • display_name (str, optional) – The display name of the table.

  • description (str, optional) – The description of the table.

  • temporary (bool, optional) – Whether to create a temporary tables. default: False

  • fields (List[Dict], optional) – raw table fields. you can use create_field method for simpler and safer field addition. required dictionary keys: name, datatype

Returns:

The newly created table instance.

Return type:

AsyncTable

Raises:

ValidationError – If the table data is invalid.

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.create_table(name="my_table")
or
>>>     table = await AsyncTable.create_table(client, name="my_table")
async classmethod get_table(api, uuid, user_id=None)[source]

[async] Get a table by UUID.

Parameters:
  • api (AsyncGeoboxClient) – The GeoboxClient instance for making requests.

  • uuid (str) – The UUID of the table to get.

  • user_id (int) – Specific user. privileges required.

Returns:

The AsyncTable object.

Return type:

AsyncTable

Raises:

NotFoundError – If the table with the specified UUID is not found.

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
or
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
async classmethod get_table_by_name(api, name, user_id=None)[source]

[async] Get a table by name

Parameters:
  • api (AsyncGeoboxClient) – The GeoboxClient instance for making requests.

  • name (str) – the name of the table to get

  • user_id (int, optional) – specific user. privileges required.

Returns:

returns the table if a table matches the given name, else None

Return type:

AsyncTable | None

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table_by_name(name='test')
or
>>>     table = await AsyncTable.get_table_by_name(client, name='test')
async update(**kwargs)[source]

[async] Update the table.

Keyword Arguments:
  • name (str) – The name of the table.

  • display_name (str) – The display name of the table.

  • description (str) – The description of the table.

Returns:

The updated table data.

Return type:

Dict

Raises:

ValidationError – If the table data is invalid.

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
>>>     await table.update(display_name="New Display Name")
async delete()[source]

[async] Delete the AsyncTable.

Returns:

None

Return type:

None

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
>>>     await table.delete()
property settings: Dict

[async] Get the table’s settings.

Returns:

The table settings.

Return type:

Dict

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(api=client, uuid="12345678-1234-5678-1234-567812345678")
>>>     setting = await table.settings
async update_settings(settings)[source]

[async] Update the settings

settings (Dict): settings dictionary

Returns:

updated settings

Return type:

Dict

Parameters:

settings (Dict)

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> async with AsyncGeoboxClient() as client:
>>>     table1 = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
>>>     table2 = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
>>>     await table1.update_settings(table2.settings)
async get_fields()[source]

[async] Get all fields of the table.

Returns:

A list of Field instances representing the table’s fields.

Return type:

List[AsyncTableField]

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(api=client, uuid="12345678-1234-5678-1234-567812345678")
>>>     fields = await table.get_fields()
async get_field(field_id)[source]

[async] Get a specific field by ID.

Parameters:

field_id (int, optional) – The ID of the field to retrieve.

Returns:

The requested field instance.

Return type:

AsyncTableField

Raises:

NotFoundError – If the field with the specified ID is not found.

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(api=client, uuid="12345678-1234-5678-1234-567812345678")
>>>     field = await table.get_field(field_id=1)
async get_field_by_name(name)[source]

[async] Get a specific field by name.

Parameters:

name (str) – The name of the field to retrieve.

Returns:

The requested field instance.

Return type:

AsyncTableField

Raises:

NotFoundError – If the field with the specified name is not found.

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(api=client, uuid="12345678-1234-5678-1234-567812345678")
>>>     field = await table.get_field_by_name(name='test')
async add_field(name, data_type, data={})[source]

[async] Add a new field to the table.

Parameters:
  • name (str) – The name of the new field.

  • data_type (FieldType) – The data type of the new field.

  • data (Dict, optional) – Additional field properties (display_name, description, etc.).

Returns:

The newly created field instance.

Return type:

AsyncTableField

Raises:

ValidationError – If the field data is invalid.

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(api=client, uuid="12345678-1234-5678-1234-567812345678")
>>>     field = await table.add_field(name="new_field", data_type=FieldType.String)
async calculate_field(target_field, expression, q=None, search=None, search_fields=None, row_ids=None, run_async=True, user_id=None)[source]

[async] Calculate values for a field based on an expression.

Parameters:
  • target_field (str) – The field to calculate values for.

  • expression (str) – The expression to use for calculation.

  • q (str, optional) – Query to filter features. default: None.

  • search (str, optional) – search term for keyword-based searching among search_fields or all textual fields if search_fields does not have value

  • search_fields (str, optional) – comma separated list of fields for searching

  • row_ids (str, optional) – List of specific row IDs to include. default: None

  • run_async (bool, optional) – Whether to run the calculation asynchronously. default: True.

  • user_id (int, optional) – Specific user. privileges required.

Returns:

The task instance of the calculation operation or the api response if the run_async=False.

Return type:

Task | Dict

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(api=client, uuid="12345678-1234-5678-1234-567812345678")
>>>     task = await table.calculate_field(target_field="target_field",
...         expression="expression",
...         q="name like 'my_layer'",
...         row_ids=[1, 2, 3],
...         run_async=True)
async get_rows(**kwargs)[source]

[async] Query rows of a table

Keyword Arguments:
  • relationship_uuid (str) – The uuid of relationship

  • related_record_id (int) – This is the id of the feature/row that these rows are related to. This id belongs to the related layer/table not this table

  • q (str) – Advanced filtering expression, e.g., ‘status = “active” and age > 20’

  • search (str) – Search term for keyword-based searching among fields/columns

  • search_fields (str) – Comma separated column names to search in

  • row_ids (str) – Comma separated list of row ids to filter for

  • fields (str) – Comma separated column names to include in results, or [ALL]

  • exclude (str) – Comma separated column names to exclude from result

  • order_by (str) – Comma separated list for ordering, e.g., ‘name A, id D’

  • skip (int) – Number of records to skip for pagination. default: 0

  • limit (int) – Maximum number of records to return. default: 100

  • return_count (bool) – If true, returns only the count of matching rows

  • user_id (int) – Specific user. privileges required

Returns:

list of table rows objects

Return type:

List[AsyncTableRow]

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
or
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
>>>     rows = await table.get_rows()
async get_row(row_id, user_id=None)[source]

[async] Get a row by its id

Parameters:
  • row_id (int) – the row id

  • user_id (int, optional) – specific user. privileges required.

Returns:

the table row instance

Return type:

TanbleRow

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
or
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
>>>     row = await table.get_row(row_id=1)
async create_row(**kwargs)[source]

[async] Create a new row in the table.

Each keyword argument represents a field value for the row, where:
  • The keyword is the field name

  • The value is the field value

Keyword Arguments:

**kwargs – Arbitrary field values matching the table schema.

Returns:

created table row instance

Return type:

AsyncTableRow

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
or
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
>>>     row = await table.create_row(
...         field1=value1
...     )
async import_rows(file, *, file_encoding='utf-8', input_dataset=None, delimiter=',', has_header=True, report_errors=False, bulk_insert=True)[source]

Import rows from a CSV file into a table

Parameters:
  • file (AsyncFile) – file object to import.

  • file_encoding (str, optional) – Character encoding of the input file. default: utf-8

  • input_dataset (str, optional) – Name of the dataset in the input file.

  • delimiter (str, optional) – the delimiter of the dataset. default: ,

  • has_header (bool, optional) – Whether the file has header or not. default: True

  • report_errors (bool, optional) – Whether to report import errors. default: False

  • bulk_insert (bool, optional)

Returns:

The task instance of the import operation.

Return type:

AsyncTask

Raises:

ValidationError – If the import parameters are invalid.

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(api=client, uuid="12345678-1234-5678-1234-567812345678")
>>>     file = await client.get_file(uuid="12345678-1234-5678-1234-567812345678")
>>>     task = await table.import_rows(
...         file=file,
...     )
async export_rows(out_filename, *, out_format=TableExportFormat.CSV, q=None, search=None, search_fields=None, row_ids=None, fields=None, exclude=None, order_by=None, zipped=False, run_async=True)[source]

[async] Export rows of a table to a file

Parameters:
  • out_filename (str) – Name of the output file without the format (.csv)

  • out_format (TableExportFormat, optional) – Format of the output file

  • q (str, optional) – query filter based on OGC CQL standard. e.g. “field1 LIKE ‘%GIS%’ AND created_at > ‘2021-01-01’”

  • search (str, optional) – search term for keyword-based searching among search_fields or all textual fields if search_fields does not have value

  • search_fields (str, optional) – comma separated list of fields for searching

  • row_ids (str, optional) – List of specific row IDs to include

  • fields (str, optional) – List of specific field names to include

  • exclude (str, optional) – List of specific field names to exclude

  • order_by (str, optional) – comma separated list of fields for sorting results [field1 A|D, field2 A|D, …]. e.g. name A, type D. NOTE: “A” denotes ascending order and “D” denotes descending order.

  • zipped (str, optional) – Whether to compress the output file

  • run_async (bool, optional) – Whether to run the export asynchronously. default: True

Returns:

The task instance of the export operation (run_async=True) or the export result (run_async=False)

Return type:

AsyncTask | Dict

Raises:

ValidationError – If the export parameters are invalid.

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(api=client, uuid="12345678-1234-5678-1234-567812345678")
>>>     file = await client.get_file(uuid="12345678-1234-5678-1234-567812345678")
>>>     task = await table.export_rows(
...         file=file,
...     )
async share(users)[source]

[async] Shares the table with specified users.

Parameters:

users (List[AsyncUser]) – The list of user objects to share the table with.

Returns:

None

Return type:

None

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
>>>     users = await client.search_users(search='John')
>>>     await table.share(users=users)
async unshare(users)[source]

[async] Unshares the table with specified users.

Parameters:

users (List[User]) – The list of user objects to unshare the table with.

Returns:

None

Return type:

None

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
>>>     users = await client.search_users(search='John')
>>>     await table.unshare(users=users)
async get_shared_users(search=None, skip=0, limit=10)[source]

[async] Retrieves the list of users the table is shared with.

Parameters:
  • search (str, optional) – The search query.

  • skip (int, optional) – The number of users to skip.

  • limit (int, optional) – The maximum number of users to retrieve.

Returns:

The list of shared users.

Return type:

List[AsyncUser]

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
>>>     await table.get_shared_users(search='John', skip=0, limit=10)
async get_relations()[source]

[async] Get the relationships that include this table

Returns:

list of the relationships

Return type:

List[AsyncRelationship]

Example

>>> from geobox.aio import AsyncGeoboxClient
>>> from geobox.aio.table import AsyncTable
>>> async with AsyncGeoboxClient() as client:
>>>     table = await client.get_table(uuid="12345678-1234-5678-1234-567812345678")
or
>>>     table = await AsyncTable.get_table(client, uuid="12345678-1234-5678-1234-567812345678")
>>>     relationships = await table.get_relations()