Skip to content

sources

DemandSource dataclass

Base class for the demand sources. This class in an abstract class that defines the interface for the demand CSV source.

Source code in src/volur/sdk/v1alpha2/sources/csv/base.py
@dataclass
class DemandSource:
    """
    Base class for the demand sources.
    This class in an abstract class that defines the interface for the demand CSV
    source.
    """

    @abc.abstractmethod
    def __aiter__(self: "DemandSource") -> AsyncIterator[demand_pb2.Demand]:
        """DemandSource implements Asynchronous Iterator.
        This allows you to use any implementation of DemandSource as
        ```python title="example.py" linenums="1"
        source = DemandSourceImplementation()
        for _ in source:
            # do something with Demand
        ```
        """
        ...

    @abc.abstractmethod
    async def __anext__(
        self: "DemandSource",
    ) -> demand_pb2.Demand:
        """You can fetch the next element in the asynchronous iterator."""
        ...

__aiter__() abstractmethod

DemandSource implements Asynchronous Iterator. This allows you to use any implementation of DemandSource as

example.py
1
2
3
source = DemandSourceImplementation()
for _ in source:
    # do something with Demand

Source code in src/volur/sdk/v1alpha2/sources/csv/base.py
@abc.abstractmethod
def __aiter__(self: "DemandSource") -> AsyncIterator[demand_pb2.Demand]:
    """DemandSource implements Asynchronous Iterator.
    This allows you to use any implementation of DemandSource as
    ```python title="example.py" linenums="1"
    source = DemandSourceImplementation()
    for _ in source:
        # do something with Demand
    ```
    """
    ...

__anext__() abstractmethod async

You can fetch the next element in the asynchronous iterator.

Source code in src/volur/sdk/v1alpha2/sources/csv/base.py
@abc.abstractmethod
async def __anext__(
    self: "DemandSource",
) -> demand_pb2.Demand:
    """You can fetch the next element in the asynchronous iterator."""
    ...

MaterialsSource

Base class for material sources.

This class in an abstract class that defines the interface for materials CSV source.

Source code in src/volur/sdk/v1alpha2/sources/csv/base.py
class MaterialsSource:
    """
    Base class for material sources.

    This class in an abstract class that defines the interface for materials CSV
    source.
    """

    @abc.abstractmethod
    def __aiter__(self: "MaterialsSource") -> AsyncIterator[material_pb2.Material]:
        """MaterialSource implements Asynchronous Iterator.

        This allows you to use any implementation of MaterialSource as

        ```python title="example.py" linenums="1"
        source = MaterialSourceImplementation()
        for _ in source:
            # do something with Material
        ```
        """
        ...

    @abc.abstractmethod
    async def __anext__(
        self: "MaterialsSource",
    ) -> material_pb2.Material:
        """You can fetch the next element in the asynchronous iterator."""
        ...

__aiter__() abstractmethod

MaterialSource implements Asynchronous Iterator.

This allows you to use any implementation of MaterialSource as

example.py
1
2
3
source = MaterialSourceImplementation()
for _ in source:
    # do something with Material
Source code in src/volur/sdk/v1alpha2/sources/csv/base.py
@abc.abstractmethod
def __aiter__(self: "MaterialsSource") -> AsyncIterator[material_pb2.Material]:
    """MaterialSource implements Asynchronous Iterator.

    This allows you to use any implementation of MaterialSource as

    ```python title="example.py" linenums="1"
    source = MaterialSourceImplementation()
    for _ in source:
        # do something with Material
    ```
    """
    ...

__anext__() abstractmethod async

You can fetch the next element in the asynchronous iterator.

Source code in src/volur/sdk/v1alpha2/sources/csv/base.py
@abc.abstractmethod
async def __anext__(
    self: "MaterialsSource",
) -> material_pb2.Material:
    """You can fetch the next element in the asynchronous iterator."""
    ...

ProductsSource dataclass

Base class for the product sources. This class in an abstract class that defines the interface for the products CSV source.

Source code in src/volur/sdk/v1alpha2/sources/csv/base.py
@dataclass
class ProductsSource:
    """
    Base class for the product sources.
    This class in an abstract class that defines the interface for the products CSV
    source.
    """

    @abc.abstractmethod
    def __aiter__(self: "ProductsSource") -> AsyncIterator[product_pb2.Product]:
        """ProductSource implements Asynchronous Iterator.
        This allows you to use any implementation of ProductsSource as
        ```python title="example.py" linenums="1"
        source = ProductSourceImplementation()
        for _ in source:
            # do something with Product
        ```
        """
        ...

    @abc.abstractmethod
    async def __anext__(
        self: "ProductsSource",
    ) -> product_pb2.Product:
        """You can fetch the next element in the asynchronous iterator."""
        ...

__aiter__() abstractmethod

ProductSource implements Asynchronous Iterator. This allows you to use any implementation of ProductsSource as

example.py
1
2
3
source = ProductSourceImplementation()
for _ in source:
    # do something with Product

Source code in src/volur/sdk/v1alpha2/sources/csv/base.py
@abc.abstractmethod
def __aiter__(self: "ProductsSource") -> AsyncIterator[product_pb2.Product]:
    """ProductSource implements Asynchronous Iterator.
    This allows you to use any implementation of ProductsSource as
    ```python title="example.py" linenums="1"
    source = ProductSourceImplementation()
    for _ in source:
        # do something with Product
    ```
    """
    ...

__anext__() abstractmethod async

You can fetch the next element in the asynchronous iterator.

Source code in src/volur/sdk/v1alpha2/sources/csv/base.py
@abc.abstractmethod
async def __anext__(
    self: "ProductsSource",
) -> product_pb2.Product:
    """You can fetch the next element in the asynchronous iterator."""
    ...