Skip to main content

kiprio-python

Official Python SDK for the Kiprio API — developer tools available as clean REST endpoints.

pip install kiprio-python

Quick Start

from kiprio import KiprioClient

client = KiprioClient(api_key="your-api-key")

Get a free API key at kiprio.com.


Examples

Redact PII from text

result = client.redact("Hi, I'm John and my number is 555-1234")
print(result.redacted)
# "Hi, I'm [NAME] and my number is [PHONE]"
print(result.entities_found)
# [{"type": "PERSON", "text": "John"}, {"type": "PHONE", "text": "555-1234"}]

Convert HTML to Markdown

result = client.html_to_markdown(url="https://example.com/article")
print(result.markdown)
# "# Article Title\n\nArticle content..."

# Or pass raw HTML directly
result = client.html_to_markdown(html="<h1>Hello</h1><p>World</p>")
print(result.markdown)
# "# Hello\n\nWorld"

Extract clean article text

result = client.readability("https://example.com/article")
print(result.title)     # "Article Title"
print(result.content)   # Clean article text, ads/nav removed
print(result.author)    # "Jane Smith"
print(result.word_count)  # 847

Look up WHOIS data

result = client.whois("python.org")
print(result.registrar)    # "PSI-USA, Inc."
print(result.created)      # "1995-03-27"
print(result.expires)      # "2026-03-28"
print(result.nameservers)  # ["ns1.osuosl.org", "ns2.osuosl.org"]

Extract text from a PDF

# From a URL
result = client.pdf_extract(url="https://example.com/document.pdf")
print(result.text)   # Extracted text
print(result.pages)  # 12

# From a local file
with open("document.pdf", "rb") as f:
    result = client.pdf_extract(file=f)
print(result.text)

Parse a cron expression

result = client.cron_parse("0 9 * * 1-5")
print(result.description)  # "At 09:00, Monday through Friday"
print(result.next_runs)    # ["2026-04-28T09:00:00", "2026-04-29T09:00:00", ...]

Infer a JSON Schema

data = [{"id": 1, "name": "Alice", "active": True}]
result = client.schema(data)
print(result.schema)
# {"type": "array", "items": {"type": "object", "properties": {"id": {"type": "integer"}, ...}}}

LLM context window + pricing index

# All models
index = client.llm_index()
print(f"{index.model_count} models indexed")

# Filter to open-source multimodal models
result = client.llm_index(open_source=True, multimodal=True)
for model in result.models:
    print(f"{model['provider']}/{model['model']}: {model['context_window_tokens']:,} tokens")

Generate a QR code

result = client.qr("https://kiprio.com", size=400)
with open("qr.png", "wb") as f:
    f.write(result.image_bytes)

Self-Hosted

Enterprise customers can point the SDK at a self-hosted Kiprio instance:

client = KiprioClient(
    api_key="your-key",
    base_url="https://api.your-company.com",
)

Error Handling

from kiprio import KiprioClient
from kiprio.client import KiprioError

client = KiprioClient(api_key="your-key")
try:
    result = client.whois("example.com")
except KiprioError as e:
    print(f"API error {e.status_code}: {e.message}")

API Reference

Method Endpoint Description
client.redact(text) POST /v1/redact Redact PII from text
client.schema(data) POST /v1/schema Infer JSON Schema
client.screenshot(url) POST /v1/screenshot Screenshot a URL
client.html_to_markdown(html, url) POST /v1/html-to-markdown Convert HTML to Markdown
client.readability(url) POST /v1/readability Extract article text
client.whois(domain) GET /v1/whois/{domain} WHOIS lookup
client.pdf_extract(file, url) POST /v1/pdf-extract Extract PDF text
client.cron_parse(expr) POST /v1/cron-parse Parse cron expression
client.llm_index() GET /v1/llm-index LLM pricing + context index
client.qr(text) GET /v1/qr Generate QR code

Full API docs at kiprio.com/docs.


License

MIT

Metadata

Release files for kiprio-python 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kiprio-python 0.1.0
File Size Uploaded
kiprio_python-0.1.0.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kiprio-python 0.1.0
File Interpreter ABI Platform
kiprio_python-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.8 kB

Release files / kiprio_python-0.1.0.tar.gz

Download URL kiprio_python-0.1.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d1a1768378620bb8c16520590822a448e3535e03ea8c4e5e7fc7d4865cb4f822
BLAKE2b-256 checksum
How to use checksums
f05926c84b48a0a68ad826600a8b1adaed6ad2baff4a6cb78efee8ad5aec1e14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / kiprio_python-0.1.0-py3-none-any.whl

Download URL kiprio_python-0.1.0-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e29a8387e625942ced59d55fe3fdc1d74c885785af905ed8238c31cfe708efef
BLAKE2b-256 checksum
How to use checksums
ab8affadf07061f593d63a6d110f8847d938fbb97db8e7de1769af6b8fcf5a43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page