PigeonAI client and SDK
Project description
PigeonsAI SDK
The PigeonsAI SDK is a Python package that provides an interface to interact with the PigeonsDB database. This SDK allows you to search, initialize, get database information, and add documents to the database.
Installation
To install the PigeonsAI SDK, use pip:
pip install pigeonsai
Usage
To use the PigeonsAI SDK, first import the PigeonsDB class:
from pigeonsai import PigeonsDB
Initialize the connection
Before using the SDK, you need to initialize the connection to the database by providing your API key and database name:
api_key = "your_api_key"
db_name = "your_db_name"
PigeonsDB.init(api_key, db_name)
Add documents
To add documents to the database, use the add method:
documents = ["document1", "document2", "document3"]
metadata_list = [{"metadata1": "value1"}, {"metadata2": "value2"}, {"metadata3": "value3"}]
PigeonsDB.add(documents, metadata_list)
Search
To search the database, use the search method:
query_text = "your_search_query"
k = 10 # Number of results to return
metadata_filters = [{"metadata1": "value1"}] # Optional metadata filters
keywords = ["keyword"] # Optional keywords
PigeonsDB.search(query_text, k, metadata_filters, keywords)
Contributing
If you'd like to contribute to the PigeonsAI SDK, please submit a pull request or open an issue on the GitHub repository.
License
The PigeonsAI SDK is released under the MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pigeonsai-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f5c06414140772762127d591e98a7c05c871080c755db3b90a7f6c3b335b5bd |
|
MD5 | 09e1a7aa5023ef7234b0e032818d4916 |
|
BLAKE2b-256 | 488dd58c1a63e1d8ccfdc8c42658d9065dbe242cba5fe96217620dae4719ec3f |