Skip to main content

clankersupport

Embed the Clanker Support AI-powered support agent in any Python web app. One helper renders the widget <script> tag — escaped, validated, and framework-friendly — so visitors get streaming answers from your knowledge base, human escalation, and operator replies, with zero backend work in your app.

pip install clankersupport

Quick start

Grab your project's public key from the dashboard (Project → Embed), then render the tag into your base template:

from clankersupport import script_tag

tag = script_tag("pk_your_project_key")
# <script src="https://api.clankersupport.com/widget.js" data-project="pk_your_project_key" data-api="https://api.clankersupport.com" async></script>

The return value implements the __html__ protocol, so Jinja2 renders it unescaped automatically — no | safe needed.

The public key is safe to expose — it's the same key the plain <script> embed uses.

FastAPI + Jinja2

from clankersupport import script_tag
from fastapi.templating import Jinja2Templates

templates = Jinja2Templates(directory="templates")
templates.env.globals["clanker_support"] = lambda: script_tag("pk_your_project_key")
<!-- templates/base.html -->
<body>
	{% block content %}{% endblock %}
	{{ clanker_support() }}
</body>

Flask

from clankersupport import script_tag

app.jinja_env.globals["clanker_support"] = lambda: script_tag("pk_your_project_key")

Django

Django templates don't use the __html__ protocol; mark the tag safe explicitly:

from clankersupport import script_tag
from django.utils.safestring import mark_safe

def support_widget(request):
	return {"clanker_support": mark_safe(script_tag("pk_your_project_key"))}

Options

script_tag(
	"pk_your_project_key",
	api_url="https://support-api.your-domain.com",  # self-hosted API origin
	brand_color="#4f46e5",                          # launcher/header accent
	mode="bubble",                                  # "bubble" (default) | "inline"
	theme="auto",                                   # "light" (default) | "dark" | "auto"
	escalation_threshold=3,                         # messages before "Talk to a human"
)

Invalid values (empty key, unknown mode/theme, non-positive threshold) raise ValueError at render time, so misconfiguration fails in development instead of silently shipping a broken widget.

Self-hosting

Clanker Support is open source (theopenco/llmchat). Point api_url at your own deployment; the tag's src and data-api both follow it.

License

MIT

Metadata

Release files for clankersupport 1.0.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 clankersupport 1.0.0
File Size Uploaded Provenance Actions
clankersupport-1.0.0.tar.gz 5.5 kB Without provenance Details for clankersupport-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for clankersupport 1.0.0
File Interpreter ABI Platform Actions
clankersupport-1.0.0-py3-none-any.whl Python 3 none any Details for clankersupport-1.0.0-py3-none-any.whl

Total release size: 10.6 kB

Release files / clankersupport-1.0.0.tar.gz

Download URL clankersupport-1.0.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9f769966c78b93ef48c35973633051b0ad6be109f667fe56b6bc293d2f6c2d8f
BLAKE2b-256 checksum
How to use checksums
651bbdfdf2a9bb15009d8bb407f12cb52e6640a05f59ce9eccc5c553e3b72801
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / clankersupport-1.0.0-py3-none-any.whl

Download URL clankersupport-1.0.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03ea02b42713e2eee875004dca7d7701fa4f34615799db9db875d50922517366
BLAKE2b-256 checksum
How to use checksums
473fe61c6d7dfbc3714389d72d53436e4642705d5e5ab382467aadcc8e1ddc89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for clankersupport 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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