telepath
A library for exchanging data between Python and JavaScript
What it is and what it does
telepath is a Django library that bridges Python and JavaScript by serializing Python objects—including custom classes—into JSON-safe formats for transport to the browser, where matching JavaScript implementations deserialize them back into equivalent data structures. It works like pickle but with unpickling happening client-side in JavaScript rather than in Python.
The library lets you keep business logic on the server while building rich client-side interfaces. You register Python classes with corresponding JavaScript implementations, then telepath handles the packing and unpacking. It has no runtime dependencies and installs as a pure Python wheel, making setup straightforward for Django projects. However, maintenance is dormant as of the fact sheet date—the last release was 2023-06-12—so it receives no active development or bug fixes.
Use it for:
- Send complex Python data structures from Django views to JavaScript without manual JSON serialization or API endpoints.
- Register custom Python classes to enable automatic serialization of domain objects for client-side use.
- Build interactive Django admin interfaces or custom dashboards with rich JavaScript components backed by server-side Python logic.
- Reduce boilerplate in Django-to-frontend communication by eliminating hand-coded serialization and deserialization.
- Prototype or maintain legacy Django applications that rely on server-rendered templates with embedded JavaScript data.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
telepath serializes Python objects to JSON-compatible format for transmission to JavaScript, then deserializes them in the browser with matching JavaScript implementations, enabling bidirectional Python-JavaScript data exchange.
Yes, if you are actively maintaining a Django project and need Python-to-JavaScript data exchange without external APIs. The library is stable, has no dependencies, and works well for server-side-heavy Django apps. No, if you require active maintenance, security updates, or are building new projects—consider modern alternatives like REST APIs with frontend frameworks instead. Yes-with-conditions if your Django version and Python 3.8+ support are locked in and you accept dormant maintenance.
Install
telepath on PyPI
pip
pip install telepathuv
uv add telepathpoetry
poetry add telepathInstalling telepath
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance is dormant—last release was 2023-06-12 and no commits since 2024-09-26—so expect no active bug fixes or feature work, though the codebase is stable and marked Production/Stable.
License in practice
BSD license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install telepath
from telepath import Adapter, register
class MyAdapter(Adapter):
js_constructor = 'MyClass'
def pack(self, obj):
return obj.to_dict()
register(MyAdapter(), MyClass)
Requires Python >=3.8 and a Django project; JavaScript counterpart must be implemented separately in the browser to unpack the serialized data.
Verify before relying
- Whether dormant maintenance affects real-world stability for active Django projects using current versions of Django and Python.
- Extent of JavaScript implementation required per custom Python class and complexity of typical registration workflows.
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,159 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 884,563/month — #4,813 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: telepath-0.3.1-py38-none-any.whl
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
pscriptPScript compiles a Python subset to JavaScript,…
unclear · top 15,000 on PyPI
pywebviewpywebview wraps native webview components to…
permissive · top 5,000 on PyPI
groovyTranspiles Python functions to JavaScript,…
permissive · top 5,000 on PyPI
streamlit-javascriptExecutes arbitrary JavaScript code from within…
permissive · top 15,000 on PyPI
jsonpicklejsonpickle converts complex Python objects to…
permissive · top 5,000 on PyPI
phpserializeConverts Python objects to and from PHP…
permissive · top 15,000 on PyPI
numpyencoderProvides a custom JSON encoder class that…
permissive · top 15,000 on PyPI
yamlableConverts Python objects to YAML and back using…
permissive · top 15,000 on PyPI
draftjs_exporterConverts Draft.js ContentState (a rich text…
permissive · top 5,000 on PyPI
pydantic-to-typescriptConverts pydantic model definitions into…
permissive · top 5,000 on PyPI