Skip to content

mixin ¤

Mixins for Fluree ledger operations providing request handling, data insertion, context management, and commit capabilities.

Modules:

  • commit

    Mixins for committing transactions to the Fluree ledger.

  • context

    Mixin for managing context data in Fluree operations.

  • insert

    Mixin for handling data insertion operations in Fluree.

  • request

    Base mixin for HTTP request handling in Fluree operations.

  • utils

    Utility functions for resolving generic type parameters in mixins.

  • where

    Mixin for handling where clause operations in Fluree queries.

Classes:

  • AsyncCommitMixin

    Asynchronous commit functionality for Fluree transactions.

  • CommitMixin

    Synchronous commit functionality for Fluree transactions.

  • CommitableMixin

    Combines synchronous and asynchronous commit capabilities.

  • RequestMixin

    Base class for creating and managing HTTP requests.

  • WithContextMixin

    Provides context management for Fluree operations.

  • WithInsertMixin

    Provides data insertion capabilities for Fluree operations.

  • WithWhereMixin

    Provides where clause capabilities for Fluree queries.

AsyncCommitMixin ¤

Bases: SupportsAsyncCommit, Generic[T]

Asynchronous commit functionality for Fluree transactions.

Methods:

  • acommit

    Executes the transaction asynchronously.

acommit async ¤

acommit() -> FlureeResponse

Executes the transaction asynchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

CommitMixin ¤

Bases: SupportsCommit, Generic[T]

Synchronous commit functionality for Fluree transactions.

Methods:

  • commit

    Executes the transaction synchronously.

commit ¤

commit() -> FlureeResponse

Executes the transaction synchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

CommitableMixin ¤

Bases: CommitMixin[T], AsyncCommitMixin[T], Generic[T]

Combines synchronous and asynchronous commit capabilities.

Methods:

  • acommit

    Executes the transaction asynchronously.

  • commit

    Executes the transaction synchronously.

acommit async ¤

acommit() -> FlureeResponse

Executes the transaction asynchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

commit ¤

commit() -> FlureeResponse

Executes the transaction synchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

RequestMixin dataclass ¤

RequestMixin()

Bases: ABC, SupportsRequestCreation

Base class for creating and managing HTTP requests.

Methods:

  • build_request_payload

    Constructs the JSON payload for the request.

  • get_request

    Constructs an HTTP request with the operation's data.

  • get_url

    Returns the endpoint URL for the request.

build_request_payload abstractmethod ¤

build_request_payload() -> JsonObject

Constructs the JSON payload for the request.

Raises:

get_request ¤

get_request() -> Request

Constructs an HTTP request with the operation's data.

Raises:

get_url abstractmethod ¤

get_url() -> str

Returns the endpoint URL for the request.

Raises:

WithContextMixin ¤

Bases: Generic[T]

Provides context management for Fluree operations.

Methods:

  • with_context

    Updates the operation's context with new data.

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.

WithInsertMixin ¤

Bases: Generic[T]

Provides data insertion capabilities for Fluree operations.

Methods:

  • with_insert

    Updates the operation with new data to be inserted.

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.

WithWhereMixin ¤

Bases: Generic[T]

Provides where clause capabilities for Fluree queries.

Methods:

  • with_where

    Updates the query with a new where clause.

with_where ¤

with_where(clause: WhereClause) -> T

Updates the query with a new where clause.

Raises:

  • TypeError

    If the type parameter cannot be resolved.