Official Python SDK for the Kiprio API — redaction, schema inference, screenshots, readability, WHOIS, PDF extraction, cron parsing, and more.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 kiprio_python-0.1.0.tar.gz.
File metadata
- Download URL: kiprio_python-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1a1768378620bb8c16520590822a448e3535e03ea8c4e5e7fc7d4865cb4f822
|
|
| MD5 |
382d563aba3c70272a4f622c17884fab
|
|
| BLAKE2b-256 |
f05926c84b48a0a68ad826600a8b1adaed6ad2baff4a6cb78efee8ad5aec1e14
|
File details
Details for the file kiprio_python-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kiprio_python-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e29a8387e625942ced59d55fe3fdc1d74c885785af905ed8238c31cfe708efef
|
|
| MD5 |
1c204213acaef6a3ff905cb7f673ac9d
|
|
| BLAKE2b-256 |
ab8affadf07061f593d63a6d110f8847d938fbb97db8e7de1769af6b8fcf5a43
|