The Weaviate API Client is an interface to Weaviate, a vector database with a GraphQL API. This client allows you to interact with Weaviate programmatically, making it easier to create collections, add objects, query data, update objects, and delete objects within your Weaviate instance.
This documentation provides a comprehensive guide on how to use the Weaviate API Client, including its initialization, methods, and usage examples.
| `additional_headers` | Optional[Dict[str, str]] | Additional headers to send with requests. (Optional) |
| `additional_config` | Optional[weaviate.AdditionalConfig] | Additional configuration for the client. (Optional) |
| `connection_params` | Dict[str, Any] | Dictionary containing connection parameters. This parameter is used internally and can be ignored in most cases. |
additional_config=None, # You can pass additional configuration here
)
```
## Methods
### `create_collection`
The `create_collection` method allows you to create a new collection in Weaviate. A collection is a container for storing objects with specific properties.
#### Parameters
-`name` (str): The name of the collection.
-`properties` (List[Dict[str, Any]]): A list of dictionaries specifying the properties of objects to be stored in the collection.
-`vectorizer_config` (Any, optional): Additional vectorizer configuration for the collection. (Optional)
These examples cover the basic operations of creating collections, adding objects, and querying objects using the Weaviate API Client.
## Additional Information and Tips
- If you encounter any errors during the operations, the client will raise exceptions with informative error messages.
- You can explore more advanced features and configurations in the Weaviate documentation.
- Make sure to handle authentication and security appropriately when using the client in production environments.
## References and Resources
- [Weaviate Documentation](https://weaviate.readthedocs.io/en/latest/): Official documentation for Weaviate.
- [Weaviate GitHub Repository](https://github.com/semi-technologies/weaviate): The source code and issue tracker for Weaviate.
This documentation provides a comprehensive guide on using the Weaviate API Client to interact with Weaviate, making it easier to manage and query your data.