Skip to main content

Official Python SDK for the Larkup RAG API

Project description

Larkup RAG Python SDK

The official Python client for the Larkup RAG platform.

This SDK provides a simple, Pythonic interface to interact with your running Larkup RAG servers. It offers both synchronous and asynchronous clients, built on top of httpx and pydantic.

Installation

Install the package via pip or uv:

pip install larkup-rag
# or
uv pip install larkup-rag

Quick Start

Synchronous Client

from larkup_rag import LarkupRAGClient

# Initialize the client
client = LarkupRAGClient(base_url="http://localhost:4567")

# 1. Query the RAG Pipeline
response = client.query(
    query="What is Larkup?",
    top_k=5
)
for hit in response.hits:
    print(hit.document.content)

# 2. Add Documents to the Pipeline
client.documents.add(
    content="Larkup is building a new learning system for the AI Era.",
    metadata={"source": "manual-entry"}
)

# 3. Trigger Indexing
client.index()
print("Documents indexed successfully.")

Asynchronous Client

import asyncio
from larkup_rag import AsyncLarkupRAGClient

async def main():
    client = AsyncLarkupRAGClient(base_url="http://localhost:4567")
    
    response = await client.query(
        query="What is the future of education?",
        top_k=3
    )
    print(response.hits)

asyncio.run(main())

Features

  • Sync & Async Support: Use LarkupRAGClient or AsyncLarkupRAGClient.
  • Querying: Execute semantic searches against your vector store.
  • Data Ingestion: Add documents and web pages programmatically.
  • Strong Typing: Built with Pydantic for validation and editor autocompletion.

Documentation

For full API reference and advanced usage, visit the Larkup Documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

larkup_rag-0.1.6.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

larkup_rag-0.1.6-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file larkup_rag-0.1.6.tar.gz.

File metadata

  • Download URL: larkup_rag-0.1.6.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for larkup_rag-0.1.6.tar.gz
Algorithm Hash digest
SHA256 4c3de3558f1fbcf06eeaa97af3cb1e73834676d17423b4fe4d535a360bbc8292
MD5 1f412e07be7c89ae16c45c0cd004bb58
BLAKE2b-256 8ad012f42946875168310ce1bdb9a64958fd744798e45aa5d0072765cabf40b7

See more details on using hashes here.

File details

Details for the file larkup_rag-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: larkup_rag-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for larkup_rag-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e15e079a8da6a1e224633a2db804e1d6680a9e7935b36fa04d4254a40ce4abbd
MD5 abf5b309884fa4d8f6917ab08caaaeab
BLAKE2b-256 b0eeb00b2ba05b42a8c2885563fdc8665146accf7c6379b899f5a25c8729784d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page