Skip to content

endpoint ¤

HTTP endpoint implementations for Fluree operations.

Modules:

Classes:

CreateBuilderImpl dataclass ¤

CreateBuilderImpl(
    *, endpoint: str, ledger: str, data: JsonObject | JsonArray | None = None, context: dict[str, Any] | None = None
)

Bases: WithContextMixin['CreateBuilderImpl'], WithInsertMixin[CreateReadyToCommitImpl], CreateBuilder

Implementation of a create operation builder.

CreateReadyToCommitImpl dataclass ¤

CreateReadyToCommitImpl(
    *, endpoint: str, ledger: str, data: JsonObject | JsonArray | None, context: dict[str, Any] | None = None
)

Bases: RequestMixin, WithContextMixin['CreateReadyToCommitImpl'], WithInsertMixin['CreateReadyToCommitImpl'], CommitableMixin['CreateReadyToCommitImpl'], CreateReadyToCommit

Implementation of a create operation ready to be committed.

Methods:

  • acommit

    Executes the transaction asynchronously.

  • build_request_payload

    Build the request payload for the create operation.

  • commit

    Executes the transaction synchronously.

  • get_url

    Get the endpoint URL for the create operation.

  • with_context

    Updates the operation's context with new data.

  • with_insert

    Updates the operation with new data to be inserted.

acommit async ¤

acommit() -> FlureeResponse

Executes the transaction asynchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

build_request_payload ¤

build_request_payload() -> dict[str, Any]

Build the request payload for the create operation.

commit ¤

commit() -> FlureeResponse

Executes the transaction synchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

get_url ¤

get_url() -> str

Get the endpoint URL for the create operation.

with_context ¤

with_context(context: dict[str, Any]) -> T

Updates the operation's context with new data.

Raises:

  • TypeError

    If the type parameter cannot be resolved.

with_insert ¤

with_insert(data: JsonObject | JsonArray) -> T

Updates the operation with new data to be inserted.

Raises:

  • TypeError

    If the type parameter cannot be resolved.

HistoryBuilderImpl dataclass ¤

HistoryBuilderImpl(
    *,
    endpoint: str,
    ledger: str,
    context: dict[str, Any] | None = None,
    history: HistoryClause | None = None,
    t: TimeClause | None = None,
    commit_details: bool | None = None,
)

Bases: RequestMixin, WithContextMixin['HistoryBuilderImpl'], CommitableMixin['HistoryBuilderImpl'], HistoryBuilder

Implementation of a history query builder.

Methods:

  • acommit

    Executes the transaction asynchronously.

  • build_request_payload

    Build the request payload for the history query operation.

  • commit

    Executes the transaction synchronously.

  • get_url

    Get the endpoint URL for the history query operation.

  • with_commit_details

    Add commit details flag to the query.

  • with_history

    Add history clause to the query.

  • with_t

    Add time clause to the query.

acommit async ¤

acommit() -> FlureeResponse

Executes the transaction asynchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

build_request_payload ¤

build_request_payload() -> dict[str, Any]

Build the request payload for the history query operation.

commit ¤

commit() -> FlureeResponse

Executes the transaction synchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

get_url ¤

get_url() -> str

Get the endpoint URL for the history query operation.

with_commit_details ¤

with_commit_details(commit_details: bool) -> HistoryBuilderImpl

Add commit details flag to the query.

with_history ¤

with_history(history: HistoryClause) -> HistoryBuilderImpl

Add history clause to the query.

with_t ¤

Add time clause to the query.

QueryBuilderImpl dataclass ¤

QueryBuilderImpl(
    *,
    endpoint: str,
    ledger: str,
    context: dict[str, Any] | None = None,
    where: WhereClause | None = None,
    group_by: GroupByClause | None = None,
    having: HavingClause | None = None,
    order_by: OrderByClause | None = None,
    opts: ActiveIdentity | None = None,
    select_fields: dict[str, Any] | list[str] | None = None,
)

Bases: WithContextMixin['QueryBuilderImpl'], WithWhereMixin['QueryBuilderImpl'], RequestMixin, CommitableMixin['QueryBuilderImpl'], QueryBuilder

Implementation of a query operation builder.

Methods:

acommit async ¤

acommit() -> FlureeResponse

Executes the transaction asynchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

build_request_payload ¤

build_request_payload() -> dict[str, Any]

Build the request payload for the query operation.

commit ¤

commit() -> FlureeResponse

Executes the transaction synchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

get_url ¤

get_url() -> str

Get the endpoint URL for the query operation.

with_group_by ¤

with_group_by(fields: GroupByClause) -> Self

Add group by clause to the query.

with_having ¤

with_having(condition: HavingClause) -> Self

Add having clause to the query.

with_opts ¤

with_opts(opts: ActiveIdentity) -> Self

Add query options to the query.

with_order_by ¤

with_order_by(fields: OrderByClause) -> Self

Add order by clause to the query.

with_select ¤

with_select(fields: SelectObject | SelectArray) -> Self

Add select fields to the query.

TransactionBuilderImpl dataclass ¤

TransactionBuilderImpl(
    *,
    endpoint: str,
    ledger: str,
    context: dict[str, Any] | None = None,
    where: WhereClause | None = None,
    data: JsonObject | JsonArray | None = None,
    delete_data: JsonObject | JsonArray | None = None,
)

Bases: WithContextMixin['TransactionBuilderImpl'], WithInsertMixin['TransactionReadyToCommitImpl'], WithWhereMixin['TransactionBuilderImpl'], TransactionBuilder

Implementation of a transaction operation builder.

Methods:

  • with_delete

    Add delete operation to the transaction.

with_delete ¤

with_delete(data: JsonObject | JsonArray) -> TransactionReadyToCommitImpl

Add delete operation to the transaction.

TransactionReadyToCommitImpl dataclass ¤

TransactionReadyToCommitImpl(
    *,
    endpoint: str,
    ledger: str,
    context: dict[str, Any] | None,
    where: WhereClause | None,
    data: JsonObject | JsonArray | None,
    delete_data: JsonObject | JsonArray | None,
)

Bases: RequestMixin, WithContextMixin['TransactionReadyToCommitImpl'], WithWhereMixin['TransactionReadyToCommitImpl'], CommitableMixin['TransactionReadyToCommitImpl'], TransactionReadyToCommit

Implementation of a transaction operation ready to be committed.

Methods:

  • acommit

    Executes the transaction asynchronously.

  • build_request_payload

    Build the request payload for the transaction operation.

  • commit

    Executes the transaction synchronously.

  • get_url

    Get the endpoint URL for the transaction operation.

  • with_delete

    Add delete operation to the transaction.

acommit async ¤

acommit() -> FlureeResponse

Executes the transaction asynchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

build_request_payload ¤

build_request_payload() -> dict[str, Any]

Build the request payload for the transaction operation.

commit ¤

commit() -> FlureeResponse

Executes the transaction synchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

get_url ¤

get_url() -> str

Get the endpoint URL for the transaction operation.

with_delete ¤

with_delete(data: JsonObject | JsonArray) -> TransactionReadyToCommitImpl

Add delete operation to the transaction.