---
title: "lanarky"
type: "tool"
slug: "ajndkr-lanarky"
canonical_url: "https://www.graphcanon.com/tools/ajndkr-lanarky"
github_url: "https://github.com/ajndkr/lanarky"
homepage_url: "https://lanarky.ajndkr.com/"
stars: 992
forks: 76
primary_language: "Python"
license: "MIT"
categories: ["inference-serving", "developer-tools"]
tags: ["llmops", "python3", "deprecated-repo", "web", "microservices", "fastapi"]
updated_at: "2026-07-07T18:48:18.318468+00:00"
---

# lanarky

> The web framework for building LLM microservices (deprecated)

Lanarky is a Python-based, FastAPI-powered web framework tailored for developers working with Large Language Models (LLMs) to construct and deploy microservices. It supports features such as streaming over HTTP and WebSockets, ensures compatibility across various LLM tooling frameworks without vendor lock-in, and is now in maintenance mode with no new feature additions.

## Facts

- Repository: https://github.com/ajndkr/lanarky
- Homepage: https://lanarky.ajndkr.com/
- Stars: 992 · Forks: 76 · Open issues: 9 · Watchers: 14
- Primary language: Python
- License: MIT
- Last pushed: 2024-07-06T06:21:57+00:00

## Categories

- [Inference & Serving](/categories/inference-serving.md)
- [Developer Tools](/categories/developer-tools.md)

## Tags

llmops, python3, deprecated-repo, web, microservices, fastapi

## Related tools

- [ECC](/tools/affaan-m-ecc.md) - The agent harness performance optimization system (★ 226,962)
- [AutoGPT](/tools/significant-gravitas-autogpt.md) - AutoGPT: Build, Deploy, and Run AI Agents (★ 185,417)
- [prompts.chat](/tools/f-prompts-chat.md) - The world's largest open-source prompt library for AI (★ 165,019)
- [JavaGuide](/tools/snailclimb-javaguide.md) - Snailclimb/JavaGuide: 面试 & 后端通用面试指南，覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发 (★ 156,863)
- [open-webui](/tools/open-webui-open-webui.md) - User-friendly AI Interface (Supports Ollama, OpenAI API, ...) (★ 144,575)
- [browser-use](/tools/browser-use-browser-use.md) - 🌐 Make websites accessible for AI agents. Automate tasks online with ease. (★ 103,315)
- [caveman](/tools/juliusbrussee-caveman.md) - Cuts 65% of tokens in AI coding agent responses. (★ 86,150)
- [vllm](/tools/vllm-project-vllm.md) - A high-throughput and memory-efficient inference and serving engine for LLMs (★ 85,612)

## README (excerpt)

```text
<div align="center">

<img src="https://raw.githubusercontent.com/ajndkr/lanarky/main/assets/logo-light-mode.png#gh-light-mode-only" alt="lanarky-logo-light-mode" width="500">
<img src="https://raw.githubusercontent.com/ajndkr/lanarky/main/assets/logo-dark-mode.png#gh-dark-mode-only" alt="lanarky-logo-dark-mode" width="500">

<h4>The web framework for building LLM microservices.</h4>










</div>

> ⚠️ **Disclaimer**: This project is now in maintenance mode. I won't be adding new features or actively maintaining the project as I have moved on to other projects and priorities. While I will address critical bugs and security issues as needed, active development has ceased from my end. I do encourage the community to continue to contribute to the project if they find it useful. Thank you for using lanarky!

Lanarky is a **python (3.9+)** web framework for developers who want to build microservices using LLMs.
Here are some of its key features:

- **LLM-first**: Unlike other web frameworks, lanarky is built specifically for LLM developers.
  It's unopinionated in terms of how you build your microservices and guarantees zero vendor lock-in
  with any LLM tooling frameworks or cloud providers
- **Fast & Modern**: Built on top of FastAPI, lanarky offers all the FastAPI features you know and love.
  If you are new to FastAPI, visit [fastapi.tiangolo.com](https://fastapi.tiangolo.com) to learn more
- **Streaming**: Streaming is essential for many real-time LLM applications, like chatbots. Lanarky has
  got you covered with built-in streaming support over **HTTP** and **WebSockets**.
- **Open-source**: Lanarky is open-source and free to use. Forever.

To learn more about lanarky and get started, you can find the full documentation on [lanarky.ajndkr.com](https://lanarky.ajndkr.com)

## Installation

The library is available on PyPI and can be installed via `pip`:

```bash
pip install lanarky
```

## Getting Started

Lanarky provides a powerful abstraction layer to allow developers to build
simple LLM microservices in just a few lines of code.

Here's an example to build a simple microservice that uses OpenAI's `ChatCompletion` service:

```python
from lanarky import Lanarky
from lanarky.adapters.openai.resources import ChatCompletionResource
from lanarky.adapters.openai.routing import OpenAIAPIRouter

app = Lanarky()
router = OpenAIAPIRouter()


@router.post("/chat")
def chat(stream: bool = True) -> ChatCompletionResource:
    system = "You are a sassy assistant"
    return ChatCompletionResource(stream=stream, system=system)


app.include_router(router)
```

Visit [Getting Started](https://lanarky.ajndkr.com/getting-started) for the full tutorial on building
and testing your first LLM microservice with Lanarky.

## Contributing




Contributions are more than welcome! If you have an idea for a new feature or want to help improve lanarky,
please create an issue or submit a pull request on [GitHub](https://github.com/ajndkr/lanarky).

See [CONTRIBUTING.md](https://github.com/ajndkr/lanarky/blob/main/CONTRIBUTING.md) for more information.

See [Lanarky Roadmap](https://github.com/users/ajndkr/projects/6) for the list of new features and future milestones.

## License

The library is released under the [MIT License](https://github.com/ajndkr/lanarky/blob/main/LICENSE).
```

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/tools/ajndkr-lanarky`](/api/graphcanon/tools/ajndkr-lanarky)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
