dataframely.testing.create_collection#

dataframely.testing.create_collection(name: str, schemas: dict[str, type[~dataframely.schema.Schema]], filters: dict[str, ~dataframely._filter.Filter] | None = None, *, collection_base_class: type[~dataframely.collection.collection.Collection] = [Collection "CollectionMeta"]   Members: , annotation_base_class: type = <class 'dataframely._typing.LazyFrame'>) type[Collection][source]#

Dynamically create a new collection with the provided name.

Parameters:
  • name – The name of the collection.

  • schemas – The (additional) schemas to use for the collection.

  • filters – The (additional) filters to set on the collection.

  • collection_base_class – The base class for the collection. The new collection inherits from this collection and also uses all its schemas and filters. Defaults to Collection.

  • annotation_base_class – The base class for the member’s schemas. Defaults to LazyFrame.

Returns:

A collection with the given name and the combined schemas and filters.