Actively maintained. Last release 4 weeks ago, commits in 23 of the last 26 weeks. A safe choice.
pip install groundxGroundX Python Library
The GroundX Python library provides convenient access to the GroundX API from Python.
Documentation
API reference documentation is available here.
Installation
pip install groundx
Reference
A full reference for this library is available here.
Usage
Instantiate and use the client with the following:
from groundx import Document, GroundX
client = GroundX(
api_key="YOUR_API_KEY",
)
client.ingest(
documents=[
Document(
bucket_id=1234,
file_name="my_file1.txt",
file_type="txt",
source_url="https://my.source.url.com/file1.txt",
)
],
)
Extraction Workflows
Create or update an extraction workflow directly from a YAML file:
from groundx import GroundX
client = GroundX(api_key="YOUR_API_KEY")
workflow = client.create_extraction_workflow(
path="statement.yaml",
name="statement extraction",
)
client.update_extraction_workflow(
workflow.workflow.workflow_id,
path="statement.yaml",
name="statement extraction",
)
The SDK sends the YAML unchanged. GroundX validates and compiles it.
Server workflow metadata readback requires the extract extra:
pip install "groundx[extract]"
Load an existing workflow when you need its compiled extraction metadata:
existing = client.load_extraction_definition_from_workflow("workflow-id")
For create and update, pass exactly one of path=... or yaml_text=....
Compiled definitions, mappings, and prepared objects are not authoring inputs.
Workflow assignment is still explicit. After creating a workflow, assign it to a bucket, group, or account with the normal workflow API.