mirror of
https://github.com/james-m-jordan/morphik-core.git
synced 2025-05-09 19:32:38 +00:00
SDK publishable
This commit is contained in:
parent
36a8679a36
commit
6da9cc8495
@ -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}")
|
||||||
|
```
|
@ -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" },
|
||||||
|
@ -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=[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user