Skip to main content

Tek Juice Data Engine Connector

Connects a customer backend to the Tek Juice Data Engine for S2S publication, whatever the backend is written in:

  • Any language or framework (Node.js, PHP, Ruby, Go, Java, .NET, ...): run the connector as a sidecar service (tekjuice serve, Docker image). It owns the receiver secret, endpoint, registration, verification and readiness, and hands content to four small JSON endpoints your backend implements. See docs/sidecar.md and the content API contract.
  • Python backends can also embed it (pip install tekjuice-connector) and mount the receiver in FastAPI, Flask or Django (docs/setup.md).

Connect a server in one command (0.8.0+)

Put the three values from the Tek Juice setup page in the backend's .env, then on the server:

pip install tekjuice-connector
tekjuice connect

It authenticates, detects the server, asks only for what it cannot discover, creates the publication endpoint beside your application (any language; no code changes) and waits until the website is READY. See docs/connect.md.

Receiving publications (0.2.0+)

Mount a PublicationReceiver over your own content model with the adapter for your framework (FastAPI, Flask, Django, or any WSGI/ASGI app) and register it through the handshake. The Data Engine verifies the endpoint with a dry run before it publishes anything. See docs/publication.md and the wire contract in docs/publication-contract.md.

Setup: secret, endpoint, registration, readiness (0.7.0+)

TekJuiceConnector().setup(receiver=..., app=..., secret_store=...) (or tekjuice setup --env-file .env ...) does the S2S integration itself:

  • it generates TEKJUICE_RECEIVER_SECRET on your server with secrets.token_urlsafe(48), only when none is stored, and persists it safely;
  • it builds TEKJUICE_PUBLICATION_ENDPOINT_URL from your API's configured host and the receiver route, mounting the route on FastAPI/Flask when needed;
  • it proves through the public URL, with a dry run, that the endpoint reaches your receiver;
  • it registers both values with the Data Engine, confirms the Data Engine stored them, and waits for the Data Engine's verification;
  • it reports readiness stage by stage, publishes nothing, and supports coordinated secret rotation.

See docs/setup.md.

What it does

  • Authenticates your backend with the Tek Juice Data Engine via an E2E handshake.
  • Reports READY state when the Data Engine confirms the backend is connected.
  • Provides bounded retry with exponential backoff for transient failures.
  • Sanitises all log output and diagnostic reports — secrets never leak.
  • Provides a CLI for configuration verification and connectivity testing.

What it does NOT do

This package does not implement content generation, SEO, or any Data Engine internal logic, and it never stores content itself: publications are persisted by a ContentStore you implement over your own content model.

Quick start

1. Install

pip install tekjuice-connector

2. Configure

Set the three required environment variables:

export TEKJUICE_WEBSITE_ID=your-website-id
export TEKJUICE_CONNECTOR_KEY=your-connector-key
export TEKJUICE_DATA_ENGINE_URL=https://engine.tekjuice.io

3. Connect

from tekjuice_connector import TekJuiceConnector

connector = TekJuiceConnector()
result = connector.connect()

if result.ready:
    print("Tek Juice Data Engine connected")
    print("Domain:", result.domain)

4. Test the connection

tekjuice test-connection

5. Run diagnostics

tekjuice diagnostics

Requirements

  • Python 3.11+
  • requests >= 2.28

No web framework required.

Configuration

Variable Description
TEKJUICE_WEBSITE_ID Your Tek Juice website identifier
TEKJUICE_CONNECTOR_KEY Your connector key (treat as a secret)
TEKJUICE_DATA_ENGINE_URL Base URL of the Tek Juice Data Engine API

See docs/configuration.md for full details.

CLI commands

tekjuice status              # Print current connection state
tekjuice test-connection     # Live E2E handshake test
tekjuice diagnostics         # Full diagnostic report
tekjuice --version           # Print package version

Security

The connector key is never logged, never included in exception messages, and never appears in diagnostic output. See docs/security.md.

Two credentials

  • The connector key (issued by the Data Engine) authenticates this backend's handshake with the Data Engine.
  • The receiver secret (generated on your server by setup(), or by you) authenticates the Data Engine's S2S publication requests to your receiver.

They are never interchangeable. S2S through this package is the only publication transport the Data Engine supports; the earlier M2M transport is retired. See docs/authentication.md.

Performance controls

Optional middleware lets the Data Engine apply approved, reversible delivery settings (static-asset caching, compression) without code changes; see docs/performance.md.

Documentation

Development

git clone https://github.com/tekjuice/tekjuice-connector.git
cd tekjuice-connector
pip install -e ".[dev]"
pytest

License

MIT License. See LICENSE.

Metadata

Release files for tekjuice-connector 0.10.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 tekjuice-connector 0.10.0
File Size Uploaded Provenance
tekjuice_connector-0.10.0.tar.gz 155.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tekjuice-connector 0.10.0
File Interpreter ABI Platform
tekjuice_connector-0.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 352.1 kB

Release files / tekjuice_connector-0.10.0.tar.gz

Download URL tekjuice_connector-0.10.0.tar.gz
Size 155.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1a24ef97dc8a05e5836bcd996cd23be4c829e3a4285add096054b43c308a5994
BLAKE2b-256 checksum
How to use checksums
1f7d0193f82c77ea431f07df9b964c61ef4e89afb8d230c892dab22bada6a2aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / tekjuice_connector-0.10.0-py3-none-any.whl

Download URL tekjuice_connector-0.10.0-py3-none-any.whl
Size 196.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4304e4e34c7406d70610ce4e310b2de7c98c82726377d13ddef22b1c3fb8c8eb
BLAKE2b-256 checksum
How to use checksums
7cb997644f99d4fac5ad16dc7c6f8b4b471ca3c63ff0253a07da39ae0478b083
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for tekjuice-connector 0.10.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tekjuice_connector-0.10.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

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