Skip to the content.

BaseDynamoQuery

Auto-generated documentation for dynamo_query.base_dynamo_query module.

Helper for building Boto3 DynamoDB queries.

BaseDynamoQuery

[find in source code]

class BaseDynamoQuery(LazyLogger):
    def __init__(
        query_type: QueryType,
        expressions: ExpressionMap,
        extra_params: Dict[(str, Any)],
        limit: int = MAX_LIMIT,
        exclusive_start_key: Optional[ExclusiveStartKey] = None,
        logger: logging.Logger = None,
    ):

Base class for building Boto3 DynamoDB queries. Use dynamo_query.DynamoQuery instead.

query = BaseDynamoQuery(
    query_type=QueryType.SCAN,
    expressions={
        BaseDynamoQuery.FILTER_EXPRESSION: ConditionExpression(
            'first_name',
            'last_name,
        ),
    }
    extra_params={}
    limit=5,
)

Arguments

Attributes

See also

BaseDynamoQuery().client

[find in source code]

@property
def client() -> DynamoDBClient:

See also

BaseDynamoQuery().has_more_results

[find in source code]

def has_more_results() -> bool:

Whether scan or query request with limit has more results to return.

Returns

True if query has more results than returned or was not yet executed.

BaseDynamoQuery().table_keys

[find in source code]

@property
def table_keys() -> TableKeys:

See also

BaseDynamoQuery().table_resource

[find in source code]

@property
def table_resource() -> Table:

See also

BaseDynamoQuery().was_executed

[find in source code]

def was_executed() -> bool:

Whether query was excetuted at least once.

Returns

True if query was executed.

DynamoQueryError

[find in source code]

class DynamoQueryError(Exception):

Main error for dynamo_query.dynamo_query.DynamoQuery class.