leptonai
Lepton AI Platform
Decision gist · record as of 2026-08-14
Yes, if you need to quickly turn Python ML code or HuggingFace models into a service. The framework is actively maintained, has low install friction, and abstracts away HTTP boilerplate. Verify the license status before use in proprietary projects. Not suitable if you need deep control over HTTP routing or prefer a lower-level framework.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure-Python wheel.
- Active maintenance with a release within the last 70 days.
- Depends on 20 runtime packages including fastapi, uvicorn, ray, and huggingface_hub, which are all standard ecosystem tools.
License · maintenance · safety
(unclear)
last release 2026-06-05 (70 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 580,469 downloads/mo, #5,912 on PyPI
Alternatives
Verify before relying
pip install -U leptonai
from leptonai.photon import Photon
class Echo(Photon):
@Photon.handler
def echo(self, inputs: str) -> str:
return inputs
# Then run: lep photon runlocal -n echo -m my_photon.py
# Access with:
from leptonai.client import Client, local
c = Client(local(port=8080))
c.echo(inputs="hello world")- Whether the Apache 2.0 license mentioned in the description excerpt is the authoritative license (meta.license_spdx is null).
- Whether all HuggingFace models work or only standard pipelines, as the description notes custom-code models are not supported.
What it is and what it does
Lepton AI is a Python framework that wraps research and modeling code into deployable AI services. You define a Photon class with handler methods, and the framework exposes them as HTTP endpoints with automatic documentation, client bindings, and built-in features like autobatching and background jobs. It includes shortcuts to launch popular models from HuggingFace (like GPT-2, Llama2, SDXL, Whisper) with a single command, and provides a Python client that lets you call your service as if it were a local function.
The package is built on fastapi and uvicorn for the service layer, ray for distributed compute, and integrates with huggingface_hub for model loading. It's designed for researchers and ML engineers who want to turn a notebook or script into a production-ready service without writing boilerplate HTTP code.
Use it for
- Launch a HuggingFace model (e.g., GPT-2, Llama2) as a local HTTP service with one CLI command.
- Wrap custom Python ML code into a service by decorating handler methods with @Photon.handler.
- Build a text-to-image service using prebuilt examples like SDXL and access it via Python client or Gradio UI.
- Deploy background jobs and autobatch requests across multiple GPU workers using ray integration.
- Serve multiple models from a single Photon class and call them as native Python functions from a client.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to quickly turn Python ML code or HuggingFace models into a service.
The framework is actively maintained, has low install friction, and abstracts away HTTP boilerplate. Verify the license status before use in proprietary projects. Not suitable if you need deep control over HTTP routing or prefer a lower-level framework.
Install
leptonai on PyPI
Before you install
Low install friction with a pure-Python wheel. Active maintenance with a release within the last 70 days. Depends on 20 runtime packages including fastapi, uvicorn, ray, and huggingface_hub, which are all standard ecosystem tools.
Quickstart
pip install -U leptonai
from leptonai.photon import Photon
class Echo(Photon):
@Photon.handler
def echo(self, inputs: str) -> str:
return inputs
# Then run: lep photon runlocal -n echo -m my_photon.py
# Access with:
from leptonai.client import Client, local
c = Client(local(port=8080))
c.echo(inputs="hello world")
Verify before relying
- Whether the Apache 2.0 license mentioned in the description excerpt is the authoritative license (meta.license_spdx is null).
- Whether all HuggingFace models work or only standard pipelines, as the description notes custom-code models are not supported.
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release <3.14,>=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 20 packagesanyioclickcloudpicklecontextlib2exceptiongroupfastapihttpxprometheus-fastapi-instrumentatorrichtyping-extensionsuvicornlogururequestspydanticpython-multipartpillowpyyamlhuggingface_hubledoc-uiray |
| Maintenance | Actively maintained 70 days since the last release |
| First released | |
| Downloads | 580,469 / month, #5,912 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: leptonai-0.27.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “build AI service from Python”
- leptonaiLepton AI is a Python framework for building and deploying AI…
- azure-ai-agentsBuild and deploy AI agents on Azure using models from OpenAI,…
- databricks-ai-searchPython client for Databricks AI Search, a managed vector and keyword…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also vastai · datarobot-genai · aip-agents-binary · ai-parrot · mlx-vlm · crewai-core · pipecat-ai · ouroboros-ai · crewai