Skip to main content

DatasetClient

Dataset resource client implementation based on the Apify platform storage.

Index

Methods

__init__

  • __init__(*, apify_dataset_client): None
  • Parameters

    • optionalkeyword-onlyapify_dataset_client: DatasetClientAsync

    Returns None

delete

  • async delete(): None
  • Returns None

get

  • async get(): DatasetMetadata | None
  • Returns DatasetMetadata | None

get_items_as_bytes

  • async get_items_as_bytes(*, item_format, offset, limit, desc, clean, bom, delimiter, fields, omit, unwind, skip_empty, skip_header_row, skip_hidden, xml_root, xml_row, flatten): bytes
  • Parameters

    • optionalkeyword-onlyitem_format: str = 'json'
    • optionalkeyword-onlyoffset: int | None = None
    • optionalkeyword-onlylimit: int | None = None
    • optionalkeyword-onlydesc: bool = False
    • optionalkeyword-onlyclean: bool = False
    • optionalkeyword-onlybom: bool = False
    • optionalkeyword-onlydelimiter: str | None = None
    • optionalkeyword-onlyfields: list[str] | None = None
    • optionalkeyword-onlyomit: list[str] | None = None
    • optionalkeyword-onlyunwind: str | None = None
    • optionalkeyword-onlyskip_empty: bool = False
    • optionalkeyword-onlyskip_header_row: bool = False
    • optionalkeyword-onlyskip_hidden: bool = False
    • optionalkeyword-onlyxml_root: str | None = None
    • optionalkeyword-onlyxml_row: str | None = None
    • optionalkeyword-onlyflatten: list[str] | None = None

    Returns bytes

iterate_items

  • async iterate_items(*, offset, limit, clean, desc, fields, omit, unwind, skip_empty, skip_hidden): AsyncIterator[dict]
  • Parameters

    • optionalkeyword-onlyoffset: int = 0
    • optionalkeyword-onlylimit: int | None = None
    • optionalkeyword-onlyclean: bool = False
    • optionalkeyword-onlydesc: bool = False
    • optionalkeyword-onlyfields: list[str] | None = None
    • optionalkeyword-onlyomit: list[str] | None = None
    • optionalkeyword-onlyunwind: str | None = None
    • optionalkeyword-onlyskip_empty: bool = False
    • optionalkeyword-onlyskip_hidden: bool = False

    Returns AsyncIterator[dict]

list_items

  • async list_items(*, offset, limit, clean, desc, fields, omit, unwind, skip_empty, skip_hidden, flatten, view): DatasetItemsListPage
  • Parameters

    • optionalkeyword-onlyoffset: int | None = 0
    • optionalkeyword-onlylimit: int | None = BaseDatasetClient._LIST_ITEMS_LIMIT
    • optionalkeyword-onlyclean: bool = False
    • optionalkeyword-onlydesc: bool = False
    • optionalkeyword-onlyfields: list[str] | None = None
    • optionalkeyword-onlyomit: list[str] | None = None
    • optionalkeyword-onlyunwind: str | None = None
    • optionalkeyword-onlyskip_empty: bool = False
    • optionalkeyword-onlyskip_hidden: bool = False
    • optionalkeyword-onlyflatten: list[str] | None = None
    • optionalkeyword-onlyview: str | None = None

    Returns DatasetItemsListPage

push_items

  • async push_items(*, items): None
  • Parameters

    • optionalkeyword-onlyitems: JsonSerializable

    Returns None

stream_items

  • async stream_items(*, item_format, offset, limit, desc, clean, bom, delimiter, fields, omit, unwind, skip_empty, skip_header_row, skip_hidden, xml_root, xml_row): AbstractAsyncContextManager[Response | None]
  • Parameters

    • optionalkeyword-onlyitem_format: str = 'json'
    • optionalkeyword-onlyoffset: int | None = None
    • optionalkeyword-onlylimit: int | None = None
    • optionalkeyword-onlydesc: bool = False
    • optionalkeyword-onlyclean: bool = False
    • optionalkeyword-onlybom: bool = False
    • optionalkeyword-onlydelimiter: str | None = None
    • optionalkeyword-onlyfields: list[str] | None = None
    • optionalkeyword-onlyomit: list[str] | None = None
    • optionalkeyword-onlyunwind: str | None = None
    • optionalkeyword-onlyskip_empty: bool = False
    • optionalkeyword-onlyskip_header_row: bool = False
    • optionalkeyword-onlyskip_hidden: bool = False
    • optionalkeyword-onlyxml_root: str | None = None
    • optionalkeyword-onlyxml_row: str | None = None

    Returns AbstractAsyncContextManager[Response | None]

update

  • async update(*, name): DatasetMetadata
  • Parameters

    • optionalkeyword-onlyname: str | None = None

    Returns DatasetMetadata