weaviate.collections.classes package
Submodules
weaviate.collections.classes.aggregate module
- class weaviate.collections.classes.aggregate.AggregateBoolean(count: int | None, percentage_false: float | None, percentage_true: float | None, total_false: int | None, total_true: int | None)[source]
Bases:
object
The aggregation result for a boolean property.
- count: int | None
- percentage_false: float | None
- percentage_true: float | None
- total_false: int | None
- total_true: int | None
- class weaviate.collections.classes.aggregate.AggregateDate(count: int | None, maximum: str | None, median: str | None, minimum: str | None, mode: str | None)[source]
Bases:
object
The aggregation result for a date property.
- count: int | None
- maximum: str | None
- median: str | None
- minimum: str | None
- mode: str | None
- class weaviate.collections.classes.aggregate.AggregateGroup(grouped_by: GroupedBy, properties: Dict[str, AggregateInteger | AggregateNumber | AggregateText | AggregateBoolean | AggregateDate], total_count: int | None)[source]
Bases:
object
The aggregation result for a collection grouped by a property.
- properties: Dict[str, AggregateInteger | AggregateNumber | AggregateText | AggregateBoolean | AggregateDate]
- total_count: int | None
- class weaviate.collections.classes.aggregate.AggregateGroupByReturn(groups: List[AggregateGroup])[source]
Bases:
object
The aggregation results for a collection grouped by a property.
- groups: List[AggregateGroup]
- class weaviate.collections.classes.aggregate.AggregateInteger(count: int | None, maximum: int | None, mean: float | None, median: float | None, minimum: int | None, mode: int | None, sum_: int | None)[source]
Bases:
object
The aggregation result for an int property.
- count: int | None
- maximum: int | None
- mean: float | None
- median: float | None
- minimum: int | None
- mode: int | None
- sum_: int | None
- class weaviate.collections.classes.aggregate.AggregateNumber(count: int | None, maximum: float | None, mean: float | None, median: float | None, minimum: float | None, mode: float | None, sum_: float | None)[source]
Bases:
object
The aggregation result for a number property.
- count: int | None
- maximum: float | None
- mean: float | None
- median: float | None
- minimum: float | None
- mode: float | None
- sum_: float | None
- class weaviate.collections.classes.aggregate.AggregateReturn(properties: Dict[str, AggregateInteger | AggregateNumber | AggregateText | AggregateBoolean | AggregateDate], total_count: int | None)[source]
Bases:
object
The aggregation result for a collection.
- properties: Dict[str, AggregateInteger | AggregateNumber | AggregateText | AggregateBoolean | AggregateDate]
- total_count: int | None
- class weaviate.collections.classes.aggregate.AggregateText(count: int | None, top_occurrences: List[TopOccurrence])[source]
Bases:
object
The aggregation result for a text property.
- count: int | None
- top_occurrences: List[TopOccurrence]
- pydantic model weaviate.collections.classes.aggregate.GroupByAggregate[source]
Bases:
_WeaviateInput
Define how the aggregations’s group-by operation should be performed.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field limit: int | None = None
- field prop: str [Required]
- class weaviate.collections.classes.aggregate.GroupedBy(prop: str, value: str)[source]
Bases:
object
The property that the collection was grouped by.
- prop: str
- value: str
- class weaviate.collections.classes.aggregate.Metrics(property_: str)[source]
Bases:
object
Define the metrics to be returned based on a property when aggregating over a collection.
Use the __init__ method to define the name to the property to be aggregated on. Then use the text, integer, number, boolean, date_, or reference methods to define the metrics to be returned.
See [the docs](https://weaviate.io/developers/weaviate/search/aggregate) for more details!
- boolean(count: bool = False, percentage_false: bool = False, percentage_true: bool = False, total_false: bool = False, total_true: bool = False) _MetricsBoolean [source]
Define the metrics to be returned for a BOOL or BOOL_ARRAY property when aggregating over a collection.
If none of the arguments are provided then all metrics will be returned.
- Arguments:
- count
Whether to include the number of objects that contain this property.
- percentage_false
Whether to include the percentage of objects that have a false value for this property.
- percentage_true
Whether to include the percentage of objects that have a true value for this property.
- total_false
Whether to include the total number of objects that have a false value for this property.
- total_true
Whether to include the total number of objects that have a true value for this property.
- Returns:
A _MetricsBoolean object that includes the metrics to be returned.
- date_(count: bool = False, maximum: bool = False, median: bool = False, minimum: bool = False, mode: bool = False) _MetricsDate [source]
Define the metrics to be returned for a DATE or DATE_ARRAY property when aggregating over a collection.
If none of the arguments are provided then all metrics will be returned.
- Arguments:
- count
Whether to include the number of objects that contain this property.
- maximum
Whether to include the maximum value of this property.
- median
Whether to include the median value of this property.
- minimum
Whether to include the minimum value of this property.
- mode
Whether to include the mode value of this property.
- Returns:
A _MetricsDate object that includes the metrics to be returned.
- integer(count: bool = False, maximum: bool = False, mean: bool = False, median: bool = False, minimum: bool = False, mode: bool = False, sum_: bool = False) _MetricsInteger [source]
Define the metrics to be returned for an INT or INT_ARRAY property when aggregating over a collection.
If none of the arguments are provided then all metrics will be returned.
- Arguments:
- count
Whether to include the number of objects that contain this property.
- maximum
Whether to include the maximum value of this property.
- mean
Whether to include the mean value of this property.
- median
Whether to include the median value of this property.
- minimum
Whether to include the minimum value of this property.
- mode
Whether to include the mode value of this property.
- sum_
Whether to include the sum of this property.
- Returns:
A _MetricsInteger object that includes the metrics to be returned.
- number(count: bool = False, maximum: bool = False, mean: bool = False, median: bool = False, minimum: bool = False, mode: bool = False, sum_: bool = False) _MetricsNumber [source]
Define the metrics to be returned for a NUMBER or NUMBER_ARRAY property when aggregating over a collection.
If none of the arguments are provided then all metrics will be returned.
- Arguments:
- count
Whether to include the number of objects that contain this property.
- maximum
Whether to include the maximum value of this property.
- mean
Whether to include the mean value of this property.
- median
Whether to include the median value of this property.
- minimum
Whether to include the minimum value of this property.
- mode
Whether to include the mode value of this property.
- sum_
Whether to include the sum of this property.
- Returns:
A _MetricsNumber object that includes the metrics to be returned.
- text(count: bool = False, top_occurrences_count: bool = False, top_occurrences_value: bool = False, min_occurrences: int | None = None) _MetricsText [source]
Define the metrics to be returned for a TEXT or TEXT_ARRAY property when aggregating over a collection.
If none of the arguments are provided then all metrics will be returned.
- Arguments:
- count
Whether to include the number of objects that contain this property.
- top_occurrences_count
Whether to include the number of the top occurrences of a property’s value.
- top_occurrences_value
Whether to include the value of the top occurrences of a property’s value.
- min_occurrences
Only include entries with more occurrences than the given limit.
- Returns:
A _MetricsStr object that includes the metrics to be returned.
weaviate.collections.classes.batch module
- pydantic model weaviate.collections.classes.batch.BatchObject[source]
Bases:
BaseModel
A Weaviate object to be added to the database.
Performs validation on the class name and UUID, and automatically generates a UUID if one is not provided. Also converts the vector to a list of floats if it is provided as a numpy array.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field collection: str [Required]
- Constraints:
min_length = 1
- Validated by:
_validate_collection
- field index: int [Required]
- field properties: Dict[str, Any] | None = None
- field references: Mapping[str, str | UUID | Sequence[str | UUID] | ReferenceToMulti] | None = None
- field retry_count: int = 0
- field tenant: str | None = None
- field uuid: str | UUID | None = None
- field vector: Dict[str, List[float]] | List[float] | None = None
- class weaviate.collections.classes.batch.BatchObjectReturn(_all_responses: ~typing.List[~uuid.UUID | ~weaviate.collections.classes.batch.ErrorObject] = <factory>, elapsed_seconds: float = 0.0, errors: ~typing.Dict[int, ~weaviate.collections.classes.batch.ErrorObject] = <factory>, uuids: ~typing.Dict[int, ~uuid.UUID] = <factory>, has_errors: bool = False)[source]
Bases:
object
This class contains the results of a batch insert_many operation.
Since the individual objects within the batch can error for differing reasons, the data is split up within this class for ease use when performing error checking, handling, and data revalidation.
- NOTE:
Due to concerns over memory usage, this object will only ever store the last MAX_STORED_RESULTS uuids in the uuids dictionary and MAX_STORED_RESULTS in the all_responses list. If more than MAX_STORED_RESULTS uuids are added to the dictionary, the oldest uuids will be removed. If the number of objects inserted in this batch exceeds MAX_STORED_RESULTS, the all_responses list will only contain the last MAX_STORED_RESULTS objects. The keys of the errors and uuids dictionaries will always be equivalent to the original_index of the objects as you added them to the batching loop but won’t necessarily be the same as the indices in the all_responses list because of this.
- Attributes:
- all_responses
A list of all the responses from the batch operation. Each response is either a uuid_package.UUID object or an Error object.
- elapsed_seconds
The time taken to perform the batch operation.
- errors
A dictionary of all the failed responses from the batch operation. The keys are the indices of the objects in the batch, and the values are the Error objects.
- uuids
A dictionary of all the successful responses from the batch operation. The keys are the indices of the objects in the batch, and the values are the uuid_package.UUID objects.
- has_errors
A boolean indicating whether or not any of the objects in the batch failed to be inserted. If this is True, then the errors dictionary will contain at least one entry.
- property all_responses: List[UUID | ErrorObject]
@deprecated: A list of all the responses from the batch operation. Each response is either a uuid_package.UUID object or an Error object.
WARNING: This only stores the last MAX_STORED_RESULTS objects. If more than MAX_STORED_RESULTS objects are added to the batch, the oldest objects will be removed from this list.
- elapsed_seconds: float = 0.0
The time taken to perform the batch operation.
- errors: Dict[int, ErrorObject]
A dictionary of all the failed responses from the batch operation. The keys are the indices of the objects in the overall batch, and the values are the Error objects.
- has_errors: bool = False
A boolean indicating whether or not any of the objects in the batch failed to be inserted. If this is True, then the errors dictionary will contain at least one entry.
- uuids: Dict[int, UUID]
A dictionary of all the successful responses from the batch operation. The keys are the indices of the objects in the overall batch, and the values are the uuid_package.UUID objects.
- pydantic model weaviate.collections.classes.batch.BatchReference[source]
Bases:
BaseModel
A reference between two objects in Weaviate.
Performs validation on the class names and UUIDs.
Converts provided data to an internal object containing beacons for insertion into Weaviate.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field from_object_collection: str [Required]
- Constraints:
min_length = 1
- Validated by:
_validate_from_object_collection
- field from_object_uuid: str | UUID [Required]
- Validated by:
_validate_uuids
- field from_property_name: str [Required]
- field tenant: str | None = None
- field to_object_collection: str | None = None
- Validated by:
_validate_to_object_collection
- field to_object_uuid: str | UUID [Required]
- Validated by:
_validate_uuids
- class weaviate.collections.classes.batch.BatchReferenceReturn(elapsed_seconds: float = 0.0, errors: ~typing.Dict[int, ~weaviate.collections.classes.batch.ErrorReference] = <factory>, has_errors: bool = False)[source]
Bases:
object
This class contains the results of a batch insert_many_references operation.
Since the individual references within the batch can error for differing reasons, the data is split up within this class for ease use when performing error checking, handling, and data revalidation.
- Attributes:
- elapsed_seconds
The time taken to perform the batch operation.
- errors
A dictionary of all the failed responses from the batch operation. The keys are the indices of the references in the batch, and the values are the Error objects.
- has_errors
A boolean indicating whether or not any of the references in the batch failed to be inserted. If this is True, then the errors dictionary will contain at least one entry.
- elapsed_seconds: float = 0.0
- errors: Dict[int, ErrorReference]
- has_errors: bool = False
- class weaviate.collections.classes.batch.BatchResult[source]
Bases:
object
This class contains the results of a batch operation.
Since the individual objects and references within the batch can error for differing reasons, the data is split up within this class for ease use when performing error checking, handling, and data revalidation.
- Attributes:
- objs
The results of the batch object operation.
- refs
The results of the batch reference operation.
- class weaviate.collections.classes.batch.DeleteManyObject(uuid: UUID, successful: bool, error: str | None = None)[source]
Bases:
object
This class contains the objects of a delete_many operation.
- error: str | None = None
- successful: bool
- uuid: UUID
- class weaviate.collections.classes.batch.DeleteManyReturn(failed: int, matches: int, objects: T, successful: int)[source]
Bases:
Generic
[T
]This class contains the results of a delete_many operation..
- failed: int
- matches: int
- objects: T
- successful: int
- class weaviate.collections.classes.batch.ErrorObject(message: str, object_: BatchObject, original_uuid: str | UUID | None = None)[source]
Bases:
object
This class contains the error information for a single object in a batch operation.
- message: str
- object_: BatchObject
- original_uuid: str | UUID | None = None
- class weaviate.collections.classes.batch.ErrorReference(message: str, reference: BatchReference)[source]
Bases:
object
This class contains the error information for a single reference in a batch operation.
- message: str
- reference: BatchReference
- pydantic model weaviate.collections.classes.batch.Shard[source]
Bases:
BaseModel
Use this class when defining a shard whose vector indexing process will be awaited for in a sync blocking fashion.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field collection: str [Required]
- field tenant: str | None = None
weaviate.collections.classes.config module
- weaviate.collections.classes.config.BM25Config
alias of
_BM25Config
- weaviate.collections.classes.config.BQConfig
alias of
_BQConfig
- weaviate.collections.classes.config.CollectionConfig
alias of
_CollectionConfig
- weaviate.collections.classes.config.CollectionConfigSimple
alias of
_CollectionConfigSimple
- class weaviate.collections.classes.config.Configure[source]
Bases:
object
Use this factory class to generate the correct object for use when using the collections.create() method. E.g., .multi_tenancy() will return a MultiTenancyConfigCreate object to be used in the multi_tenancy_config argument.
Each class method provides options specific to the named configuration type in the function’s name. Under-the-hood data validation steps will ensure that any mis-specifications are caught before the request is sent to Weaviate.
- Generative
alias of
_Generative
- NamedVectors
alias of
_NamedVectors
- Reranker
alias of
_Reranker
- VectorIndex
alias of
_VectorIndex
- Vectorizer
alias of
_Vectorizer
- static inverted_index(bm25_b: float | None = None, bm25_k1: float | None = None, cleanup_interval_seconds: int | None = None, index_timestamps: bool | None = None, index_property_length: bool | None = None, index_null_state: bool | None = None, stopwords_preset: StopwordsPreset | None = None, stopwords_additions: List[str] | None = None, stopwords_removals: List[str] | None = None) _InvertedIndexConfigCreate [source]
Create an InvertedIndexConfigCreate object to be used when defining the configuration of the keyword searching algorithm of Weaviate.
- Arguments:
See [the docs](https://weaviate.io/developers/weaviate/configuration/indexes#configure-the-inverted-index) for details!
- static multi_tenancy(enabled: bool = True, auto_tenant_creation: bool | None = None, auto_tenant_activation: bool | None = None) _MultiTenancyConfigCreate [source]
Create a MultiTenancyConfigCreate object to be used when defining the multi-tenancy configuration of Weaviate.
- Arguments:
- enabled
Whether multi-tenancy is enabled. Defaults to True.
- auto_tenant_creation
Automatically create nonexistent tenants during object creation. Defaults to None, which uses the server-defined default.
- auto_tenant_activation
Automatically turn tenants implicitly HOT when they are accessed. Defaults to None, which uses the server-defined default.
- static replication(factor: int | None = None, async_enabled: bool | None = None, deletion_strategy: ReplicationDeletionStrategy | None = None) _ReplicationConfigCreate [source]
Create a ReplicationConfigCreate object to be used when defining the replication configuration of Weaviate.
NOTE: async_enabled is only available with WeaviateDB >=v1.26.0
- Arguments:
- factor
The replication factor.
- async_enabled
Enabled async replication.
- deletion_strategy
How conflicts between different nodes about deleted objects are resolved.
- static sharding(virtual_per_physical: int | None = None, desired_count: int | None = None, actual_count: int | None = None, desired_virtual_count: int | None = None, actual_virtual_count: int | None = None) _ShardingConfigCreate [source]
Create a ShardingConfigCreate object to be used when defining the sharding configuration of Weaviate.
NOTE: You can only use one of Sharding or Replication, not both.
See [the docs](https://weaviate.io/developers/weaviate/concepts/replication-architecture#replication-vs-sharding) for more details.
- Arguments:
- virtual_per_physical
The number of virtual shards per physical shard.
- desired_count
The desired number of physical shards.
- actual_count DEPRECATED
The actual number of physical shards. This is a read-only field so has no effect. It is kept for backwards compatibility but will be removed in a future release.
- desired_virtual_count
The desired number of virtual shards.
- actual_virtual_count DEPRECATED
The actual number of virtual shards. This is a read-only field so has no effect. It is kept for backwards compatibility but will be removed in a future release.
- class weaviate.collections.classes.config.ConsistencyLevel(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
The consistency levels when writing to Weaviate with replication enabled.
- Attributes:
ALL: Wait for confirmation of write success from all, N, replicas. ONE: Wait for confirmation of write success from only one replica. QUORUM: Wait for confirmation of write success from a quorum: N/2+1, of replicas.
- ALL = 'ALL'
- ONE = 'ONE'
- QUORUM = 'QUORUM'
- class weaviate.collections.classes.config.DataType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
The available primitive data types in Weaviate.
- Attributes:
TEXT: Text data type. TEXT_ARRAY: Text array data type. INT: Integer data type. INT_ARRAY: Integer array data type. BOOL: Boolean data type. BOOL_ARRAY: Boolean array data type. NUMBER: Number data type. NUMBER_ARRAY: Number array data type. DATE: Date data type. DATE_ARRAY: Date array data type. UUID: UUID data type. UUID_ARRAY: UUID array data type. GEO_COORDINATES: Geo coordinates data type. BLOB: Blob data type. PHONE_NUMBER: Phone number data type. OBJECT: Object data type. OBJECT_ARRAY: Object array data type.
- BLOB = 'blob'
- BOOL = 'boolean'
- BOOL_ARRAY = 'boolean[]'
- DATE = 'date'
- DATE_ARRAY = 'date[]'
- GEO_COORDINATES = 'geoCoordinates'
- INT = 'int'
- INT_ARRAY = 'int[]'
- NUMBER = 'number'
- NUMBER_ARRAY = 'number[]'
- OBJECT = 'object'
- OBJECT_ARRAY = 'object[]'
- PHONE_NUMBER = 'phoneNumber'
- TEXT = 'text'
- TEXT_ARRAY = 'text[]'
- UUID = 'uuid'
- UUID_ARRAY = 'uuid[]'
- weaviate.collections.classes.config.GenerativeConfig
alias of
_GenerativeConfig
- class weaviate.collections.classes.config.GenerativeSearches(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
The available generative search modules in Weaviate.
These modules generate text from text-based inputs. See the [docs](https://weaviate.io/developers/weaviate/modules/reader-generator-modules) for more details.
- Attributes:
- AWS
Weaviate module backed by AWS Bedrock generative models.
- ANTHROPIC
Weaviate module backed by Anthropic generative models.
- ANYSCALE
Weaviate module backed by Anyscale generative models.
- COHERE
Weaviate module backed by Cohere generative models.
- DATABRICKS
Weaviate module backed by Databricks generative models.
- FRIENDLIAI
Weaviate module backed by FriendliAI generative models.
- MISTRAL
Weaviate module backed by Mistral generative models.
- OLLAMA
Weaviate module backed by generative models deployed on Ollama infrastructure.
- OPENAI
Weaviate module backed by OpenAI and Azure-OpenAI generative models.
- PALM
Weaviate module backed by PaLM generative models.
- ANTHROPIC = 'generative-anthropic'
- ANYSCALE = 'generative-anyscale'
- AWS = 'generative-aws'
- COHERE = 'generative-cohere'
- DATABRICKS = 'generative-databricks'
- FRIENDLIAI = 'generative-friendliai'
- MISTRAL = 'generative-mistral'
- OLLAMA = 'generative-ollama'
- OPENAI = 'generative-openai'
- PALM = 'generative-palm'
- weaviate.collections.classes.config.InvertedIndexConfig
alias of
_InvertedIndexConfig
- weaviate.collections.classes.config.MultiTenancyConfig
alias of
_MultiTenancyConfig
- weaviate.collections.classes.config.NamedVectorConfig
alias of
_NamedVectorConfig
- weaviate.collections.classes.config.NestedProperty
alias of
_NestedProperty
- weaviate.collections.classes.config.PQConfig
alias of
_PQConfig
- weaviate.collections.classes.config.PQEncoderConfig
alias of
_PQEncoderConfig
- class weaviate.collections.classes.config.PQEncoderDistribution(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
Distribution of the PQ encoder.
- Attributes:
- LOG_NORMAL
Log-normal distribution.
- NORMAL
Normal distribution.
- LOG_NORMAL = 'log-normal'
- NORMAL = 'normal'
- class weaviate.collections.classes.config.PQEncoderType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
Type of the PQ encoder.
- Attributes:
- KMEANS
K-means encoder.
- TILE
Tile encoder.
- KMEANS = 'kmeans'
- TILE = 'tile'
- pydantic model weaviate.collections.classes.config.Property[source]
Bases:
_ConfigCreateModel
This class defines the structure of a data property that a collection can have within Weaviate.
- Attributes:
- name
The name of the property, REQUIRED.
- data_type
The data type of the property, REQUIRED.
- description
A description of the property.
- index_filterable
Whether the property should be filterable in the inverted index.
- index_range_filters
Whether the property should support range filters in the inverted index.
- index_searchable
Whether the property should be searchable in the inverted index.
- nested_properties
nested properties for data type OBJECT and OBJECT_ARRAY`.
- skip_vectorization
Whether to skip vectorization of the property. Defaults to False.
- tokenization
The tokenization method to use for the inverted index. Defaults to None.
- vectorize_property_name
Whether to vectorize the property name. Defaults to True.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field description: str | None = None
- field indexFilterable: bool | None = None (alias 'index_filterable')
- field indexRangeFilters: bool | None = None (alias 'index_range_filters')
- field indexSearchable: bool | None = None (alias 'index_searchable')
- field name: str [Required]
- Validated by:
_check_name
- field skip_vectorization: bool = False
- field tokenization: Tokenization | None = None
- field vectorize_property_name: bool = True
- weaviate.collections.classes.config.PropertyConfig
alias of
_Property
- weaviate.collections.classes.config.PropertyVectorizerConfig
alias of
_PropertyVectorizerConfig
- class weaviate.collections.classes.config.Reconfigure[source]
Bases:
object
Use this factory class to generate the correct xxxConfig object for use when using the collection.update() method.
Each staticmethod provides options specific to the named configuration type in the function’s name. Under-the-hood data validation steps will ensure that any mis-specifications are caught before the request is sent to Weaviate. Only those configurations that are mutable are available in this class. If you wish to update the configuration of an immutable aspect of your collection then you will have to delete the collection and re-create it with the new configuration.
- Generative
alias of
_Generative
- NamedVectors
alias of
_NamedVectorsUpdate
- Reranker
alias of
_Reranker
- VectorIndex
alias of
_VectorIndexUpdate
- static inverted_index(bm25_b: float | None = None, bm25_k1: float | None = None, cleanup_interval_seconds: int | None = None, stopwords_additions: List[str] | None = None, stopwords_preset: StopwordsPreset | None = None, stopwords_removals: List[str] | None = None) _InvertedIndexConfigUpdate [source]
Create an InvertedIndexConfigUpdate object.
Use this method when defining the inverted_index_config argument in collection.update().
- Arguments:
See [the docs](https://weaviate.io/developers/weaviate/configuration/indexes#configure-the-inverted-index) for a more detailed view!
- static multi_tenancy(auto_tenant_creation: bool | None = None, auto_tenant_activation: bool | None = None) _MultiTenancyConfigUpdate [source]
Create a MultiTenancyConfigUpdate object.
Use this method when defining the multi_tenancy argument in collection.update().
- Arguments:
- auto_tenant_creation
When set, implicitly creates nonexistent tenants during object creation
- auto_tenant_activation
Automatically turn tenants implicitly HOT when they are accessed. Defaults to None, which uses the server-defined default.
- static replication(factor: int | None = None, async_enabled: bool | None = None, deletion_strategy: ReplicationDeletionStrategy | None = None) _ReplicationConfigUpdate [source]
Create a ReplicationConfigUpdate object.
Use this method when defining the replication_config argument in collection.update().
- Arguments:
- factor
The replication factor.
- async_enabled
Enable async replication.
- deletion_strategy
How conflicts between different nodes about deleted objects are resolved.
- pydantic model weaviate.collections.classes.config.ReferenceProperty[source]
Bases:
_ReferencePropertyBase
This class defines properties that are cross references to a single target collection.
Use this class when you want to create a cross-reference in the collection’s config that is capable of having only cross-references to a single other collection.
- Attributes:
- name
The name of the property, REQUIRED.
- target_collection
The name of the target collection, REQUIRED.
- description
A description of the property.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field description: str | None = None
- field target_collection: str [Required]
- MultiTarget
alias of
_ReferencePropertyMultiTarget
- weaviate.collections.classes.config.ReferencePropertyConfig
alias of
_ReferenceProperty
- weaviate.collections.classes.config.ReplicationConfig
alias of
_ReplicationConfig
- class weaviate.collections.classes.config.ReplicationDeletionStrategy(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
How object deletions in multi node environments should be resolved.
- Attributes:
- PERMANENT_DELETION
Once an object has been deleted on one node it will be deleted on all nodes in case of conflicts.
- NO_AUTOMATED_RESOLUTION
No deletion resolution.
- DELETE_ON_CONFLICT = 'DeleteOnConflict'
- NO_AUTOMATED_RESOLUTION = 'NoAutomatedResolution'
- TIME_BASED_RESOLUTION = 'TimeBasedResolution'
- weaviate.collections.classes.config.RerankerConfig
alias of
_RerankerConfig
- class weaviate.collections.classes.config.Rerankers(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
The available reranker modules in Weaviate.
These modules rerank the results of a search query. See the [docs](https://weaviate.io/developers/weaviate/modules/retriever-vectorizer-modules#re-ranking) for more details.
- Attributes:
- NONE
No reranker.
- COHERE
Weaviate module backed by Cohere reranking models.
- TRANSFORMERS
Weaviate module backed by Transformers reranking models.
- VOYAGEAI
Weaviate module backed by VoyageAI reranking models.
- JINAAI
Weaviate module backed by JinaAI reranking models.
- COHERE = 'reranker-cohere'
- JINAAI = 'reranker-jinaai'
- NONE = 'none'
- TRANSFORMERS = 'reranker-transformers'
- VOYAGEAI = 'reranker-voyageai'
- weaviate.collections.classes.config.SQConfig
alias of
_SQConfig
- weaviate.collections.classes.config.ShardStatus
alias of
_ShardStatus
- weaviate.collections.classes.config.ShardingConfig
alias of
_ShardingConfig
- weaviate.collections.classes.config.StopwordsConfig
alias of
_StopwordsConfig
- class weaviate.collections.classes.config.StopwordsPreset(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
Preset stopwords to use in the Stopwords class.
- Attributes:
- EN
English stopwords.
- NONE
No stopwords.
- EN = 'en'
- NONE = 'none'
- class weaviate.collections.classes.config.Tokenization(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
The available inverted index tokenization methods for text properties in Weaviate.
- Attributes:
- WORD
Tokenize by word.
- WHITESPACE
Tokenize by whitespace.
- LOWERCASE
Tokenize by lowercase.
- FIELD
Tokenize by field.
- GSE
Tokenize using GSE (for Chinese and Japanese).
- TRIGRAM
Tokenize into trigrams.
- KAGOME_JA
Tokenize using the ‘Kagome’ tokenizer (for Japanese).
- KAGOME_KR
Tokenize using the ‘Kagome’ tokenizer and a Korean MeCab dictionary (for Korean).
- FIELD = 'field'
- GSE = 'gse'
- KAGOME_JA = 'kagome_ja'
- KAGOME_KR = 'kagome_kr'
- LOWERCASE = 'lowercase'
- TRIGRAM = 'trigram'
- WHITESPACE = 'whitespace'
- WORD = 'word'
- weaviate.collections.classes.config.VectorIndexConfigDynamic
alias of
_VectorIndexConfigDynamic
- weaviate.collections.classes.config.VectorIndexConfigFlat
alias of
_VectorIndexConfigFlat
- weaviate.collections.classes.config.VectorIndexConfigHNSW
alias of
_VectorIndexConfigHNSW
- weaviate.collections.classes.config.VectorizerConfig
alias of
_VectorizerConfig
weaviate.collections.classes.config_methods module
weaviate.collections.classes.data module
- class weaviate.collections.classes.data.DataObject(properties: P = None, uuid: str | UUID | None = None, vector: Dict[str, List[float]] | List[float] | None = None, references: R = None)[source]
Bases:
Generic
[P
,R
]This class represents an entire object within a collection to be used when batching.
- properties: P = None
- references: R = None
- uuid: str | UUID | None = None
- vector: Dict[str, List[float]] | List[float] | None = None
- class weaviate.collections.classes.data.DataReference(from_property: str, from_uuid: str | UUID, to_uuid: str | UUID | List[str | UUID])[source]
Bases:
_DataReference
This class represents a reference between objects within a collection to be used when batching.
- MultiTarget
alias of
DataReferenceMulti
- class weaviate.collections.classes.data.DataReferenceMulti(from_property: str, from_uuid: str | UUID, to_uuid: str | UUID | List[str | UUID], target_collection: str)[source]
Bases:
_DataReference
This class represents a reference between objects within a collection to be used when batching.
- target_collection: str
- class weaviate.collections.classes.data.Error(message: str, code: int | None = None, original_uuid: str | UUID | None = None)[source]
Bases:
object
This class represents an error that occurred when attempting to insert an object within a batch.
- code: int | None = None
- message: str
- original_uuid: str | UUID | None = None
weaviate.collections.classes.filters module
- class weaviate.collections.classes.filters.Filter[source]
Bases:
object
This class is used to define filters to be used when querying and deleting from a collection.
It forms the root of a method chaining hierarchy that allows you to iteratively define filters that can hop between objects through references in a formulaic way.
See [the docs](https://weaviate.io/developers/weaviate/search/filters) for more information.
- static all_of(filters: List[_Filters]) _Filters [source]
Combine all filters in the input list with an AND operator.
- static any_of(filters: List[_Filters]) _Filters [source]
Combine all filters in the input list with an OR operator.
- static by_creation_time() _FilterByCreationTime [source]
Define a filter based on the creation time to be used when querying and deleting from a collection.
- static by_id() _FilterById [source]
Define a filter based on the uuid to be used when querying and deleting from a collection.
- static by_property(name: str, length: bool = False) _FilterByProperty [source]
Define a filter based on a property to be used when querying and deleting from a collection.
- static by_ref(link_on: str) _FilterByRef [source]
Define a filter based on a reference to be used when querying and deleting from a collection.
- static by_ref_count(link_on: str) _FilterByCount [source]
Define a filter based on the number of references to be used when querying and deleting from a collection.
- weaviate.collections.classes.filters.FilterByCreationTime
alias of
_FilterByCreationTime
- weaviate.collections.classes.filters.FilterById
alias of
_FilterById
- weaviate.collections.classes.filters.FilterByProperty
alias of
_FilterByProperty
- weaviate.collections.classes.filters.FilterByRef
alias of
_FilterByRef
- weaviate.collections.classes.filters.FilterByUpdateTime
alias of
_FilterByUpdateTime
- weaviate.collections.classes.filters.FilterReturn
alias of
_Filters
weaviate.collections.classes.grpc module
- pydantic model weaviate.collections.classes.grpc.Generate[source]
Bases:
_WeaviateInput
Define how the query’s RAG capabilities should be performed.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field grouped_properties: List[str] | None = None
- field grouped_task: str | None = None
- field single_prompt: str | None = None
- pydantic model weaviate.collections.classes.grpc.GroupBy[source]
Bases:
_WeaviateInput
Define how the query’s group-by operation should be performed.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field number_of_groups: int [Required]
- field objects_per_group: int [Required]
- field prop: str [Required]
- class weaviate.collections.classes.grpc.HybridFusion(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,BaseEnum
Define how the query’s hybrid fusion operation should be performed.
- RANKED = 'FUSION_TYPE_RANKED'
- RELATIVE_SCORE = 'FUSION_TYPE_RELATIVE_SCORE'
- class weaviate.collections.classes.grpc.HybridVector[source]
Bases:
object
Use this factory class to define the appropriate classes needed when defining near text and near vector sub-searches in hybrid queries.
- static near_text(query: str | List[str], *, certainty: float | None = None, distance: float | None = None, move_to: Move | None = None, move_away: Move | None = None) _HybridNearText [source]
Define a near text search to be used within a hybrid query.
- Arguments:
- query
The text to search for as a string or a list of strings.
- certainty
The minimum similarity score to return. If not specified, the default certainty specified by the server is used.
- distance
The maximum distance to search. If not specified, the default distance specified by the server is used.
- move_to
Define the concepts that should be moved towards in the vector space during the search.
- move_away
Define the concepts that should be moved away from in the vector space during the search.
- Returns:
A _HybridNearText object to be used in the vector parameter of the query.hybrid and generate.hybrid search methods.
- static near_vector(vector: Sequence[int | float] | Dict[str, Sequence[int | float] | Sequence[Sequence[int | float]]], *, certainty: float | None = None, distance: float | None = None) _HybridNearVector [source]
Define a near vector search to be used within a hybrid query.
- Arguments:
- certainty
The minimum similarity score to return. If not specified, the default certainty specified by the server is used.
- distance
The maximum distance to search. If not specified, the default distance specified by the server is used.
- Returns:
A _HybridNearVector object to be used in the vector parameter of the query.hybrid and generate.hybrid search methods.
- pydantic model weaviate.collections.classes.grpc.MetadataQuery[source]
Bases:
_WeaviateInput
Define which metadata should be returned in the query’s results.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field certainty: bool = False
- field creation_time: bool = False
- field distance: bool = False
- field explain_score: bool = False
- field is_consistent: bool = False
- field last_update_time: bool = False
- field score: bool = False
- classmethod full() MetadataQuery [source]
Return a MetadataQuery with all fields set to True.
- class weaviate.collections.classes.grpc.Move(force: float, objects: List[str | UUID] | str | UUID | None = None, concepts: str | List[str] | None = None)[source]
Bases:
object
Define how the query’s move operation should be performed.
- class weaviate.collections.classes.grpc.NearMediaType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
The different types of media that can be used in a near_media query to leverage the multi2vec-* modules.
All are available when using multi2vec-bind but only IMAGE is available when using multi2vec-clip.
- AUDIO = 'audio'
- DEPTH = 'depth'
- IMAGE = 'image'
- IMU = 'imu'
- THERMAL = 'thermal'
- VIDEO = 'video'
- pydantic model weaviate.collections.classes.grpc.QueryNested[source]
Bases:
_WeaviateInput
Define the query-time return properties of a nested property.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field name: str [Required]
- field properties: PROPERTIES [Required]
- pydantic model weaviate.collections.classes.grpc.QueryReference[source]
Bases:
_QueryReference
Define a query-time reference to a single-target property when querying through cross-references.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- MultiTarget
Define a query-time reference to a multi-target property when querying through cross-references.
alias of
_QueryReferenceMultiTarget
- pydantic model weaviate.collections.classes.grpc.Rerank[source]
Bases:
_WeaviateInput
Define how the query’s rerank operation should be performed.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field prop: str [Required]
- field query: str | None = None
- class weaviate.collections.classes.grpc.Sort[source]
Bases:
object
Define how the query’s sort operation should be performed using the available static methods.
- static by_creation_time(ascending: bool = True) _Sorting [source]
Sort by an object’s creation time.
- weaviate.collections.classes.grpc.Sorting
The type returned by the Sort class to be used when defining programmatic sort chains.
- class weaviate.collections.classes.grpc.TargetVectors[source]
Bases:
object
Define how the distances from different target vectors should be combined using the available methods.
- static average(target_vectors: List[str]) _MultiTargetVectorJoin [source]
Combine the distance from different target vectors by averaging them.
- static manual_weights(weights: Dict[str, float | List[float]]) _MultiTargetVectorJoin [source]
Combine the distance from different target vectors by summing them using manual weights.
- static minimum(target_vectors: List[str]) _MultiTargetVectorJoin [source]
Combine the distance from different target vectors by using the minimum distance.
weaviate.collections.classes.internal module
- weaviate.collections.classes.internal.CrossReference
Use this TypeAlias when you want to type hint a cross reference within a generic data model.
If you want to define a reference property when creating your collection, use ReferenceProperty or ReferencePropertyMultiTarget instead.
If you want to create a reference when inserting an object, supply the UUIDs directly or use Reference.to_multi() instead.
- Example:
>>> import typing >>> import weaviate.classes as wvc >>> >>> class One(typing.TypedDict): ... prop: str >>> >>> class Two(typing.TypedDict): ... one: wvc.CrossReference[One]
alias of
_CrossReference
[Properties
,IReferences
]
- class weaviate.collections.classes.internal.CrossReferenceAnnotation(include_vector: bool = False, metadata: MetadataQuery | None = None, target_collection: str | None = None)[source]
Bases:
object
Dataclass to be used when annotating a generic cross reference property with options for retrieving data from the cross referenced object when querying.
- Example:
>>> import typing >>> import weaviate.classes as wvc >>> >>> class One(typing.TypedDict): ... prop: str >>> >>> class Two(typing.TypedDict): ... one: typing.Annotated[ ... wvc.CrossReference[One], ... wvc.CrossReferenceAnnotation(include_vector=True) ... ]
- include_vector: bool = False
- metadata: MetadataQuery | None = None
- target_collection: str | None = None
- class weaviate.collections.classes.internal.GenerativeGroup(name: str, min_distance: float, max_distance: float, number_of_objects: int, objects: List[GroupByObject[P, R]], rerank_score: float | None, generated: str | None)[source]
Bases:
Generic
[P
,R
],Group
[P
,R
]A group of objects returned in a generative group by query.
- generated: str | None
- class weaviate.collections.classes.internal.GenerativeGroupByReturn(objects: List[GroupByObject[P, R]], groups: Dict[str, GenerativeGroup[P, R]], generated: str | None)[source]
-
The return type of a query within the .generate namespace of a collection with the group_by argument specified.
- generated: str | None
- groups: Dict[str, GenerativeGroup[P, R]]
- objects: List[GroupByObject[P, R]]
- weaviate.collections.classes.internal.GenerativeNearMediaReturnType
@Deprecated: Use GenerativeSearchReturnType instead.
alias of
GenerativeReturn
[Properties
,References
] |GenerativeReturn
[TProperties
,TReferences
] |GenerativeReturn
[Properties
,Mapping
[str
,_CrossReference
[Mapping
[str
,None
|str
|bool
|int
|float
|datetime
|UUID
|GeoCoordinate
|PhoneNumber
|_PhoneNumber
|Mapping
[str
,WeaviateField
] |Sequence
[str
] |Sequence
[bool
] |Sequence
[int
] |Sequence
[float
] |Sequence
[datetime
] |Sequence
[UUID
] |Sequence
[Mapping
[str
,WeaviateField
]]],CrossReferences
]]] |GenerativeReturn
[Properties
,TReferences
] |GenerativeReturn
[TProperties
,References
] |GenerativeReturn
[TProperties
,Mapping
[str
,_CrossReference
[Mapping
[str
,None
|str
|bool
|int
|float
|datetime
|UUID
|GeoCoordinate
|PhoneNumber
|_PhoneNumber
|Mapping
[str
,WeaviateField
] |Sequence
[str
] |Sequence
[bool
] |Sequence
[int
] |Sequence
[float
] |Sequence
[datetime
] |Sequence
[UUID
] |Sequence
[Mapping
[str
,WeaviateField
]]],CrossReferences
]]] |GenerativeGroupByReturn
[Properties
,References
] |GenerativeGroupByReturn
[TProperties
,TReferences
] |GenerativeGroupByReturn
[Properties
,Mapping
[str
,_CrossReference
[Mapping
[str
,None
|str
|bool
|int
|float
|datetime
|UUID
|GeoCoordinate
|PhoneNumber
|_PhoneNumber
|Mapping
[str
,WeaviateField
] |Sequence
[str
] |Sequence
[bool
] |Sequence
[int
] |Sequence
[float
] |Sequence
[datetime
] |Sequence
[UUID
] |Sequence
[Mapping
[str
,WeaviateField
]]],CrossReferences
]]] |GenerativeGroupByReturn
[Properties
,TReferences
] |GenerativeGroupByReturn
[TProperties
,References
] |GenerativeGroupByReturn
[TProperties
,Mapping
[str
,_CrossReference
[Mapping
[str
,None
|str
|bool
|int
|float
|datetime
|UUID
|GeoCoordinate
|PhoneNumber
|_PhoneNumber
|Mapping
[str
,WeaviateField
] |Sequence
[str
] |Sequence
[bool
] |Sequence
[int
] |Sequence
[float
] |Sequence
[datetime
] |Sequence
[UUID
] |Sequence
[Mapping
[str
,WeaviateField
]]],CrossReferences
]]]
- class weaviate.collections.classes.internal.GenerativeObject(uuid: UUID, metadata: M, properties: P, references: R, vector: Dict[str, List[float]], collection: str, generated: str | None)[source]
Bases:
Generic
[P
,R
],Object
[P
,R
]A single Weaviate object returned by a query within the generate namespace of a collection.
- generated: str | None
- class weaviate.collections.classes.internal.GenerativeReturn(objects: List[GenerativeObject[P, R]], generated: str | None)[source]
-
The return type of a query within the generate namespace of a collection.
- generated: str | None
- objects: List[GenerativeObject[P, R]]
- class weaviate.collections.classes.internal.Group(name: str, min_distance: float, max_distance: float, number_of_objects: int, objects: List[GroupByObject[P, R]], rerank_score: float | None)[source]
-
A group of objects returned in a group by query.
- max_distance: float
- min_distance: float
- name: str
- number_of_objects: int
- objects: List[GroupByObject[P, R]]
- rerank_score: float | None
- class weaviate.collections.classes.internal.GroupByMetadataReturn(distance: float | None = None)[source]
Bases:
object
Metadata of an object returned by a group by query.
- distance: float | None = None
- class weaviate.collections.classes.internal.GroupByObject(uuid: UUID, metadata: M, properties: P, references: R, vector: Dict[str, List[float]], collection: str, belongs_to_group: str)[source]
Bases:
Generic
[P
,R
],_Object
[P
,R
,GroupByMetadataReturn
]A single Weaviate object returned by a query with the group_by argument specified.
- belongs_to_group: str
- class weaviate.collections.classes.internal.GroupByReturn(objects: List[GroupByObject[P, R]], groups: Dict[str, Group[P, R]])[source]
-
The return type of a query within the .query namespace of a collection with the group_by argument specified.
- objects: List[GroupByObject[P, R]]
- class weaviate.collections.classes.internal.MetadataReturn(creation_time: datetime | None = None, last_update_time: datetime | None = None, distance: float | None = None, certainty: float | None = None, score: float | None = None, explain_score: str | None = None, is_consistent: bool | None = None, rerank_score: float | None = None)[source]
Bases:
object
Metadata of an object returned by a query.
- certainty: float | None = None
- creation_time: datetime | None = None
- distance: float | None = None
- explain_score: str | None = None
- is_consistent: bool | None = None
- last_update_time: datetime | None = None
- rerank_score: float | None = None
- score: float | None = None
- class weaviate.collections.classes.internal.MetadataSingleObjectReturn(creation_time: datetime, last_update_time: datetime, is_consistent: bool | None)[source]
Bases:
object
Metadata of an object returned by the fetch_object_by_id query.
- creation_time: datetime
- is_consistent: bool | None
- last_update_time: datetime
- class weaviate.collections.classes.internal.Object(uuid: UUID, metadata: M, properties: P, references: R, vector: Dict[str, List[float]], collection: str)[source]
Bases:
Generic
[P
,R
],_Object
[P
,R
,MetadataReturn
]A single Weaviate object returned by a query within the .query namespace of a collection.
- class weaviate.collections.classes.internal.ObjectSingleReturn(uuid: UUID, metadata: M, properties: P, references: R, vector: Dict[str, List[float]], collection: str)[source]
Bases:
Generic
[P
,R
],_Object
[P
,R
,MetadataSingleObjectReturn
]A single Weaviate object returned by the fetch_object_by_id query.
- weaviate.collections.classes.internal.QueryNearMediaReturnType
@Deprecated: Use QuerySearchReturnType instead.
alias of
QueryReturn
[Properties
,References
] |QueryReturn
[TProperties
,TReferences
] |QueryReturn
[Properties
,Mapping
[str
,_CrossReference
[Mapping
[str
,None
|str
|bool
|int
|float
|datetime
|UUID
|GeoCoordinate
|PhoneNumber
|_PhoneNumber
|Mapping
[str
,WeaviateField
] |Sequence
[str
] |Sequence
[bool
] |Sequence
[int
] |Sequence
[float
] |Sequence
[datetime
] |Sequence
[UUID
] |Sequence
[Mapping
[str
,WeaviateField
]]],CrossReferences
]]] |QueryReturn
[Properties
,TReferences
] |QueryReturn
[TProperties
,References
] |QueryReturn
[TProperties
,Mapping
[str
,_CrossReference
[Mapping
[str
,None
|str
|bool
|int
|float
|datetime
|UUID
|GeoCoordinate
|PhoneNumber
|_PhoneNumber
|Mapping
[str
,WeaviateField
] |Sequence
[str
] |Sequence
[bool
] |Sequence
[int
] |Sequence
[float
] |Sequence
[datetime
] |Sequence
[UUID
] |Sequence
[Mapping
[str
,WeaviateField
]]],CrossReferences
]]] |GroupByReturn
[Properties
,References
] |GroupByReturn
[TProperties
,TReferences
] |GroupByReturn
[Properties
,Mapping
[str
,_CrossReference
[Mapping
[str
,None
|str
|bool
|int
|float
|datetime
|UUID
|GeoCoordinate
|PhoneNumber
|_PhoneNumber
|Mapping
[str
,WeaviateField
] |Sequence
[str
] |Sequence
[bool
] |Sequence
[int
] |Sequence
[float
] |Sequence
[datetime
] |Sequence
[UUID
] |Sequence
[Mapping
[str
,WeaviateField
]]],CrossReferences
]]] |GroupByReturn
[Properties
,TReferences
] |GroupByReturn
[TProperties
,References
] |GroupByReturn
[TProperties
,Mapping
[str
,_CrossReference
[Mapping
[str
,None
|str
|bool
|int
|float
|datetime
|UUID
|GeoCoordinate
|PhoneNumber
|_PhoneNumber
|Mapping
[str
,WeaviateField
] |Sequence
[str
] |Sequence
[bool
] |Sequence
[int
] |Sequence
[float
] |Sequence
[datetime
] |Sequence
[UUID
] |Sequence
[Mapping
[str
,WeaviateField
]]],CrossReferences
]]]
- class weaviate.collections.classes.internal.QueryReturn(objects: List[Object[P, R]])[source]
-
The return type of a query within the .query namespace of a collection.
- weaviate.collections.classes.internal.ReferenceInput
This type alias is used when providing references as inputs within the .data namespace of a collection.
alias of
str
|UUID
|Sequence
[str
|UUID
] |ReferenceToMulti
- weaviate.collections.classes.internal.ReferenceInputs
This type alias is used when providing references as inputs within the .data namespace of a collection.
alias of
Mapping
[str
,str
|UUID
|Sequence
[str
|UUID
] |ReferenceToMulti
]
- pydantic model weaviate.collections.classes.internal.ReferenceToMulti[source]
Bases:
_WeaviateInput
Use this class when you want to insert a multi-target reference property.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field target_collection: str [Required]
- field uuids: Sequence[str | UUID] | str | UUID [Required]
- property uuids_str: List[str]
Returns the UUIDs as strings.
weaviate.collections.classes.orm module
weaviate.collections.classes.tenants module
- pydantic model weaviate.collections.classes.tenants.Tenant[source]
Bases:
BaseModel
Tenant class used to describe a tenant in Weaviate.
- Attributes:
- name
the name of the tenant.
- activity_status
TenantActivityStatus, default: “HOT”
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field activityStatus: _TenantActivistatusServerValues = _TenantActivistatusServerValues.HOT
- field activityStatusInternal: TenantActivityStatus = TenantActivityStatus.ACTIVE (alias 'activity_status')
- field name: str [Required]
- model_post_init(_Tenant__context: Any) None [source]
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- property activity_status: TenantActivityStatus
Getter for the activity status of the tenant.
- class weaviate.collections.classes.tenants.TenantActivityStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
TenantActivityStatus class used to describe the activity status of a tenant in Weaviate.
- Attributes:
- ACTIVE
The tenant is fully active and can be used.
- INACTIVE
The tenant is not active, files stored locally.
- OFFLOADED
The tenant is not active, files stored on the cloud.
- OFFLOADING
The tenant is in the process of being offloaded.
- ONLOADING
The tenant is in the process of being activated.
- HOT
DEPRECATED, please use ACTIVE. The tenant is fully active and can be used.
- COLD
DEPRECATED, please use INACTIVE. The tenant is not active, files stored locally.
- FROZEN
DEPRECATED, please use OFFLOADED. The tenant is not active, files stored on the cloud.
- ACTIVE = 'ACTIVE'
- COLD = 'COLD'
- FROZEN = 'FROZEN'
- HOT = 'HOT'
- INACTIVE = 'INACTIVE'
- OFFLOADED = 'OFFLOADED'
- OFFLOADING = 'OFFLOADING'
- ONLOADING = 'ONLOADING'
- pydantic model weaviate.collections.classes.tenants.TenantCreate[source]
Bases:
BaseModel
Tenant class used to describe a tenant to create in Weaviate.
- Attributes:
- name
the name of the tenant.
- activity_status
TenantCreateActivityStatus, default: “HOT”
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field activityStatus: _TenantActivistatusServerValues = _TenantActivistatusServerValues.HOT
- field activityStatusInternal: TenantCreateActivityStatus = TenantCreateActivityStatus.ACTIVE (alias 'activity_status')
- field name: str [Required]
- model_post_init(_TenantCreate__context: Any) None [source]
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- property activity_status: TenantCreateActivityStatus
Getter for the activity status of the tenant.
- class weaviate.collections.classes.tenants.TenantCreateActivityStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
TenantActivityStatus class used to describe the activity status of a tenant to create in Weaviate.
- Attributes:
- ACTIVE
The tenant is fully active and can be used.
- INACTIVE
The tenant is not active, files stored locally.
- HOT
DEPRECATED, please use ACTIVE. The tenant is fully active and can be used.
- COLD
DEPRECATED, please use INACTIVE. The tenant is not active, files stored locally.
- ACTIVE = 'ACTIVE'
- COLD = 'COLD'
- HOT = 'HOT'
- INACTIVE = 'INACTIVE'
- pydantic model weaviate.collections.classes.tenants.TenantOutput[source]
Bases:
Tenant
Wrapper around Tenant for output purposes.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- pydantic model weaviate.collections.classes.tenants.TenantUpdate[source]
Bases:
BaseModel
Tenant class used to describe a tenant to create in Weaviate.
- Attributes:
- name
the name of the tenant.
- activity_status
TenantUpdateActivityStatus, default: “HOT”
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field activityStatus: _TenantActivistatusServerValues = _TenantActivistatusServerValues.HOT
- field activityStatusInternal: TenantUpdateActivityStatus = TenantUpdateActivityStatus.ACTIVE (alias 'activity_status')
- field name: str [Required]
- model_post_init(_TenantUpdate__context: Any) None [source]
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- property activity_status: TenantUpdateActivityStatus
Getter for the activity status of the tenant.
- class weaviate.collections.classes.tenants.TenantUpdateActivityStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
str
,Enum
TenantActivityStatus class used to describe the activity status of a tenant to update in Weaviate.
- Attributes:
- ACTIVE
The tenant is fully active and can be used.
- INACTIVE
The tenant is not active, files stored locally.
- OFFLOADED
The tenant is not active, files stored on the cloud.
- HOT
DEPRECATED, please use ACTIVE. The tenant is fully active and can be used.
- COLD
DEPRECATED, please use INACTIVE. The tenant is not active, files stored locally.
- FROZEN
DEPRECATED, please use OFFLOADED. The tenant is not active, files stored on the cloud.
- ACTIVE = 'ACTIVE'
- COLD = 'COLD'
- FROZEN = 'FROZEN'
- HOT = 'HOT'
- INACTIVE = 'INACTIVE'
- OFFLOADED = 'OFFLOADED'
weaviate.collections.classes.types module
- pydantic model weaviate.collections.classes.types.GeoCoordinate[source]
Bases:
_WeaviateInput
Input for the geo-coordinate datatype.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field latitude: float [Required]
- Constraints:
ge = -90
le = 90
- field longitude: float [Required]
- Constraints:
ge = -180
le = 180
- class weaviate.collections.classes.types.M
M is a completely general type that is used wherever generic metadata objects are defined that can be used
alias of TypeVar(‘M’)
- has_default()
- class weaviate.collections.classes.types.P
P is a completely general type that is used wherever generic properties objects are defined that can be used within the non-ORM and ORM APIs interchangeably
alias of TypeVar(‘P’)
- has_default()
- pydantic model weaviate.collections.classes.types.PhoneNumber[source]
Bases:
_PhoneNumberBase
Input for the phone number datatype.
default_country should correspond to the ISO 3166-1 alpha-2 country code. This is used to figure out the correct countryCode and international format if only a national number (e.g. 0123 4567) is provided.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- field default_country: str | None = None
- weaviate.collections.classes.types.PhoneNumberType
alias of
_PhoneNumber
- class weaviate.collections.classes.types.Properties
Properties is used wherever a single generic type is needed for properties
alias of TypeVar(‘Properties’, bound=
Mapping
[str
,Any
])- has_default()
- class weaviate.collections.classes.types.QP
QP is a completely general type that is used wherever generic properties objects are defined that can be used within the non-ORM and ORM APIs interchangeably
alias of TypeVar(‘QP’)
- has_default()
- class weaviate.collections.classes.types.QR
QR is a completely general type that is used wherever generic reference objects are defined that can be used within the non-ORM and ORM APIs interchangeably
alias of TypeVar(‘QR’)
- has_default()
- class weaviate.collections.classes.types.R
R is a completely general type that is used wherever generic reference objects are defined that can be used within the non-ORM and ORM APIs interchangeably
alias of TypeVar(‘R’)
- has_default()
- class weaviate.collections.classes.types.References
References is used wherever a single generic type is needed for references
alias of TypeVar(‘References’, bound=
Mapping
[str
,Any
] |None
)- has_default()
- class weaviate.collections.classes.types.T
T is a completely general type that is used in any kind of generic
alias of TypeVar(‘T’)
- has_default()
- class weaviate.collections.classes.types.TProperties
TProperties is used alongside Properties wherever there are two generic types needed
E.g., in _DataCollection, Properties is used when defining the generic of the class while TProperties is used when defining the generic to be supplied in .with_data_model to create a new instance of _DataCollection with a different Properties type.
To be clear: _DataCollection[Properties]().with_data_model(TProperties) -> _DataCollection[TProperties]()
alias of TypeVar(‘TProperties’, bound=
Mapping
[str
,Any
])- has_default()