groundx-python-sdk
Ground Your RAG Apps in Fact not Fiction
Requirements
Python >=3.7
Installing
pip install groundx-python-sdk==1.0.0
Getting Started
from pprint import pprint
from groundx import Groundx, ApiException
groundx = Groundx(
api_key="YOUR_API_KEY",
)
try:
# Get API keys
list_response = groundx.api_key_management.list()
pprint(list_response.body)
pprint(list_response.body["api_keys"])
pprint(list_response.headers)
pprint(list_response.status)
pprint(list_response.round_trip_time)
except ApiException as e:
print("Exception when calling APIKeyManagementApi.list: %s\n" % e)
pprint(e.body)
if e.status == 405:
pprint(e.body["message"])
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
Async
async support is available by prepending a to any method.
import asyncio
from pprint import pprint
from groundx import Groundx, ApiException
groundx = Groundx(
api_key="YOUR_API_KEY",
)
async def main():
try:
# Get API keys
list_response = await groundx.api_key_management.alist()
pprint(list_response.body)
pprint(list_response.body["api_keys"])
pprint(list_response.headers)
pprint(list_response.status)
pprint(list_response.round_trip_time)
except ApiException as e:
print("Exception when calling APIKeyManagementApi.list: %s\n" % e)
pprint(e.body)
if e.status == 405:
pprint(e.body["message"])
pprint(e.headers)
pprint(e.status)
pprint(e.reason)
pprint(e.round_trip_time)
asyncio.run(main())
Documentation for API Endpoints
All URIs are relative to https://api.groundx.ai/api
| Tag | Method | HTTP request | Description |
|---|---|---|---|
| API Key Management | list | GET /v1/apikey | Get API keys |
| Bucket | create | POST /v1/bucket | Create a bucket |
| Bucket | delete | DELETE /v1/bucket/{bucketId} | Delete an existing bucket |
| Bucket | get | GET /v1/bucket/{bucketId} | Look up an existing bucket |
| Bucket | list | GET /v1/bucket | Look up existing buckets |
| Bucket | update | PUT /v1/bucket/{bucketId} | Update an existing bucket |
| Document | delete | DELETE /v1/ingest/document/{documentId} | Delete documents |
| Document | get | GET /v1/ingest/document/{documentId} | Look up an existing document |
| Document | get_processing_status_by_id | GET /v1/ingest/{processId} | Look up document processing status by processId |
| Document | list | GET /v1/ingest/documents | Look up all existing documents |
| Document | lookup | GET /v1/ingest/documents/{id} | Look up existing documents by processId, bucketId, or projectId |
| Document | upload_local | POST /v1/ingest/documents/local | Upload local documents to GroundX |
| Document | upload_remote | POST /v1/ingest/documents/remote | Upload hosted documents to GroundX |
| Inventory | add | POST /v1/inventory | adds an inventory item |
| Inventory | search | GET /v1/inventory | searches inventory |
| Preprocessor | delete | DELETE /v1/preprocess | Delete Custom Pre-Processor |
| Preprocessor | list | GET /v1/preprocess | Query pre-processors |
| Preprocessor | setup | POST /v1/preprocess | Setup Custom Pre-Processor |
| Project | bind_bucket | POST /v1/project/{projectId} | Bound project and bucket |
| Project | create | POST /v1/project | Create a project |
| Project | delete | DELETE /v1/project/{projectId} | Delete an existing project |
| Project | get | GET /v1/project/{projectId} | Look up an existing project |
| Project | list | GET /v1/project | Look up existing projects |
| Project | update | PUT /v1/project/{projectId} | Update an existing project |
| Search | content | POST /v1/search/{projectId} | Perform a search query of your content |
Author
This Python package is automatically generated by Konfig
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
groundx_python_sdk-1.0.0.tar.gz
(93.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file groundx_python_sdk-1.0.0.tar.gz.
File metadata
- Download URL: groundx_python_sdk-1.0.0.tar.gz
- Upload date:
- Size: 93.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ebb608e4adcdeebb38a4c8507655d8cfc25619388b3a2abdc993d478b3090d9
|
|
| MD5 |
9141f557fa24141ed9c9c3fbb3d72600
|
|
| BLAKE2b-256 |
f021acadf8f24ffa34f629518698d4d651f328a8b6b298fae2ceb11551c806cb
|
File details
Details for the file groundx_python_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: groundx_python_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 360.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23b30cf36d1a6bca387b4fcec40d8138f6e26980781653017880830b8631cf36
|
|
| MD5 |
d4f506e6d990177a74394239510a52e0
|
|
| BLAKE2b-256 |
e1c46a72ae4f14fe440e743a6b645c90f03f6cc603931327adc824b89555d7eb
|