endpoint
¤
HTTP endpoint implementations for Fluree operations.
Modules:
Classes:
-
CreateBuilderImpl
–Implementation of a create operation builder.
-
CreateReadyToCommitImpl
–Implementation of a create operation ready to be committed.
-
HistoryBuilderImpl
–Implementation of a history query builder.
-
QueryBuilderImpl
–Implementation of a query operation builder.
-
TransactionBuilderImpl
–Implementation of a transaction operation builder.
-
TransactionReadyToCommitImpl
–Implementation of a transaction operation ready to be committed.
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 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.
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 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.
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.
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
–Executes the transaction asynchronously.
-
build_request_payload
–Build the request payload for the query operation.
-
commit
–Executes the transaction synchronously.
-
get_url
–Get the endpoint URL for the query operation.
-
with_group_by
–Add group by clause to the query.
-
with_having
–Add having clause to the query.
-
with_opts
–Add query options to the query.
-
with_order_by
–Add order by clause to the query.
-
with_select
–Add select fields 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 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.
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 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.
with_delete
¤
with_delete(data: JsonObject | JsonArray) -> TransactionReadyToCommitImpl
Add delete operation to the transaction.