Skip to main content

Darkglass

Lint Test Release PyPI

Darkglass is a lightweight, embeddable chatbot designed for small colleges, providing prospective students with automated responses while logging interactions for administrative review.

Demo

Demo Video

Design

The system is built on a minimalist architecture, utilizing FastAPI and SQLite to provide zero-configuration deployment on lightweight Linux VMs without the overhead of external databases.

Configuration

Add a [gemini] section with your API key and optional model (defaults to gemini-3.1-flash-lite-preview):

[gemini]
api_key = "mysecretkey"
model = "gemini-3.1-flash-lite-preview"

You can also include a [context] section to provide a default prompt for the agent:

[context]
prompt = "You are a helpful agent for Acme College."

To enable a secure administrative dashboard, add a [google] section with a client_id to use for authentication.

[google]
client_id = "your-google-client-id.apps.googleusercontent.com"

To restrict dashboard access to specific addresses, add a [roles] section with an admins list. When admins is non-empty, only addresses listed will be allowed access.

[roles]
admins = ["alice@example.com", "bob@example.com"]

Usage

  1. Set API keys, system prompt, and authorized users in darkglass.toml
  2. Run uvx darkglass or pipx run darkglass to launch production server
  3. Use the demo page to test the config: http://localhost:8000/static/demo.html
  4. Update reverse proxy configs as required to route requests to darkglass.
  5. Add the following snippet to your site, replacing the URL based on your chosen production endpoint:
<script src="https://darkglass.example.com/static/webchat.js"></script>
Demo Snippet

For quick demo purposes, the following snippet can be pasted into browser dev tools on any page to add a chat interface against a server running on localhost:

let darkglass = document.createElement('script')
darkglass.src = 'http://localhost:8000/static/webchat.js'
darkglass.defer = true
document.body.appendChild(darkglass)

Mock Data

For demonstration purposes, the interface will correctly respond to the following queries even with no LLM API keys configured:

  • "What is 1+1?"
  • "What is the capital of France?"

Metadata

Release files for darkglass 1.4.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 darkglass 1.4.0
File Size Uploaded Provenance
darkglass-1.4.0.tar.gz 744.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 756.0 kB

Release files / darkglass-1.4.0.tar.gz

Download URL darkglass-1.4.0.tar.gz
Size 744.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a322174f56502f516460304e486e9bbc28b4b0801eb21d0d8123cf975d59e3a2
BLAKE2b-256 checksum
How to use checksums
f5304c597594035e8eb7df3bbdf1cf862c1ccf918f484cf0d017169df7d9d5f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / darkglass-1.4.0-py3-none-any.whl

Download URL darkglass-1.4.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ae87066f2e28045c70a9c25ec59e77cd8a089f30d2904b6ae46630e126695f6
BLAKE2b-256 checksum
How to use checksums
6ce816cdba6fe31e48ef1c986a95215286a44f721b7b053b64763b11aef9b55a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for darkglass 1.4.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.

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