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).

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.

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.7.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.7.0
File Size Uploaded Provenance
tekjuice_connector-0.7.0.tar.gz 111.6 kB With provenance Details

Built distribution (wheel)

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

Total release size: 258.8 kB

Release files / tekjuice_connector-0.7.0.tar.gz

Download URL tekjuice_connector-0.7.0.tar.gz
Size 111.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e6d9d868869e8f928953d2a9e395c6e0d09f24c902747059101f81028a69b876
BLAKE2b-256 checksum
How to use checksums
b6ce11c7bef38e2122584682667eee7dfe09e18448c754ed8eec472493bd5216
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

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

Download URL tekjuice_connector-0.7.0-py3-none-any.whl
Size 147.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28e3903d56f687613901a5fb07a5c1996968c7fc40f4ec4b108428c4704cdfba
BLAKE2b-256 checksum
How to use checksums
c30de072ed0bca196344e579a9936bf936a5739a23d8273424c3291b642f844d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 19, 2026.

Transparency log

Security for tekjuice-connector 0.7.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.7.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 19, 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