Skip to main content

peepstick

Drop this into a Python app to get ticket routing that goes straight to your team's Slack channel — configured entirely from the PeepsTick dashboard.

This package never talks to Slack. It only ever calls your PeepsTick project's API (/api/form-schema, /api/tickets). PeepsTick owns the Slack webhook and does the actual posting server-side.

Install

# FastAPI apps
pip install "peepstick[fastapi]"

# Django apps
pip install "peepstick[django]"

FastAPI setup

from fastapi import FastAPI
from peepstick.fastapi import create_ticket_router

app = FastAPI()
app.include_router(
    create_ticket_router(
        api_key="tk_...",             # from your project's page in the PeepsTick dashboard
        base_url="https://peepstick.yourcompany.com",
    ),
    prefix="/peepstick",
)

This gives your app two routes your frontend can call — the API key never reaches the browser:

  • GET /peepstick/form-schema — the live fields configured for your project
  • POST /peepstick/tickets — submits a ticket, validated and routed to Slack server-side. Accepts either:
    • a JSON body: {"fields": {...}}
    • a multipart/form-data body (send each field as its own form value, plus a file for any file-type field) — use this when the project's form schema includes an attachment field. PeepsTick enforces the limits (10MB per file, 20MB total) and rejects anything over.

Add or rename fields in the PeepsTick dashboard and /peepstick/form-schema updates automatically — no code changes or redeploys needed.

Django setup

  1. In settings.py, add the app and your project's credentials (find the API key on your project's page in the PeepsTick dashboard):

    INSTALLED_APPS = [
        ...,
        "peepstick.django",
    ]
    
    PEEPSTICK_API_KEY = "tk_..."
    PEEPSTICK_BASE_URL = "https://peepstick.yourcompany.com"
    
  2. In your project's urls.py:

    from django.urls import include, path
    
    urlpatterns = [
        ...,
        path("tickets/", include("peepstick.django.urls")),
    ]
    
  3. Visit /tickets/. The form renders whatever fields are configured for your project in the PeepsTick dashboard — add or rename fields there and the form updates automatically, no code changes needed.

Using the client directly

If you'd rather build your own view or call PeepsTick from a script:

from peepstick import PeepsTickClient

client = PeepsTickClient(api_key="tk_...", base_url="https://peepstick.yourcompany.com")

fields = client.get_form_schema()
ticket = client.submit_ticket({"title": "Login broken", "priority": "High"})

# With a file attachment -- `files` maps a field id to
# (filename, content_bytes, content_type):
with open("screenshot.png", "rb") as f:
    ticket = client.submit_ticket(
        {"title": "Login broken", "priority": "High"},
        files={"attachment": ("screenshot.png", f.read(), "image/png")},
    )

Both methods raise peepstick.PeepsTickError on failure (network issues, invalid API key, missing required fields, etc).

Metadata

Release files for peepstick 0.2.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 peepstick 0.2.0
File Size Uploaded Provenance Actions
peepstick-0.2.0.tar.gz 7.9 kB Without provenance Details for peepstick-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 16.3 kB

Release files / peepstick-0.2.0.tar.gz

Download URL peepstick-0.2.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
87c0a4d852b28bed557f4f997980450b33a72afd19f659a54f25bf0a60e0f070
BLAKE2b-256 checksum
How to use checksums
1e61bea67b7aa987c1590eddac00bd9fbd6218c5560920db59db38c263663b52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / peepstick-0.2.0-py3-none-any.whl

Download URL peepstick-0.2.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2adb346b0ef9fd22cbd3f2a808a108b52771be974079c07113eb9e24a8fbf25
BLAKE2b-256 checksum
How to use checksums
12af0d20e8b3b1f739d35e7ddce83b35f8a80c76703509e9676cdf3ef2caa533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for peepstick 0.2.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.

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