SDK publishable

This commit is contained in:
Adityavardhan Agrawal 2024-11-17 18:17:33 -05:00
parent 36a8679a36
commit 6da9cc8495
3 changed files with 38 additions and 4 deletions

View File

@ -0,0 +1,34 @@
# DataBridge
A Python client for DataBridge API that enables document ingestion and semantic search capabilities.
## Installation
```bash
pip install databridge-client
```
```
from databridge import DataBridge
# Initialize client
db = DataBridge("your-api-key")
# Ingest a document
doc_id = await db.ingest_document(
content="Your document content",
metadata={"title": "Example Document"}
)
# Query documents
results = await db.query(
query="Your search query",
filters={"title": "Example Document"}
)
# Process results
for result in results:
print(f"Content: {result.content}")
print(f"Score: {result.score}")
print(f"Metadata: {result.metadata}")
```

View File

@ -3,7 +3,7 @@ requires = ["hatchling"]
build-backend = "hatchling.build" build-backend = "hatchling.build"
[project] [project]
name = "databridge" name = "databridge-client"
version = "0.1.0" version = "0.1.0"
authors = [ authors = [
{ name = "Your Name", email = "your.email@example.com" }, { name = "Your Name", email = "your.email@example.com" },
@ -22,4 +22,4 @@ packages = ["databridge"]
[tool.hatch.build.targets.sdist] [tool.hatch.build.targets.sdist]
include = [ include = [
"/databridge", "/databridge",
] ]

View File

@ -1,7 +1,7 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
setup( setup(
name="databridge", name="databridge-client",
version="0.1.0", version="0.1.0",
packages=find_packages(), packages=find_packages(),
install_requires=[ install_requires=[
@ -9,4 +9,4 @@ setup(
"pyjwt", "pyjwt",
], ],
python_requires=">=3.7", python_requires=">=3.7",
) )