Skip to main content
lanarky-logo

stars Documentation Code Coverage License: MIT Twitter

PyPI version PyPI stats Supported Python Versions

A FastAPI framework to build production-grade LLM applications.

Table of Contents

🚀 Features

  • 🌐 multi-mode token streaming
  • 💬 Gradio plugin for fast prototyping
  • 🔗 supports LangChain
  • 🗄️ multiple LLM caching strategies

See Roadmap for upcoming features.

❓ Why?

Many open-source projects for developing and deploying LLM applications have either opinionated designs, particularly regarding deployment, or limitations in terms of scalability. This is where Lanarky comes in. Lanarky is an open-source project that provides Python users with an unopinionated web framework for constructing and deploying LLM applications. By leveraging FastAPI as its foundation, Lanarky ensures that applications built with it are production-ready and can be seamlessly deployed on any cloud provider.

💾 Installation

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

pip install lanarky

You can find the full documentation at https://lanarky.readthedocs.io/en/latest/.

🔥 Build your first Langchain app

from dotenv import load_dotenv
from fastapi import FastAPI
from langchain import ConversationChain
from langchain.chat_models import ChatOpenAI

from lanarky import LangchainRouter

load_dotenv()
app = FastAPI()

langchain_router = LangchainRouter(
    langchain_url="/chat",
    langchain_object=ConversationChain(
        llm=ChatOpenAI(temperature=0), verbose=True
    ),
    streaming_mode=0
  )
app.include_router(langchain_router)

See examples/ for list of available demo examples.

Create a .env file using .env.sample and add your OpenAI API key to it before running the examples.

demo

📍 Roadmap

🤩 Stargazers

Leave a ⭐ if you find this project useful.

Star History Chart

🤝 Contributing

Code check Publish

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.

See CONTRIBUTING.md for more information.

Contributors

⚖️ License

The library is released under the MIT License.

✨ Want to build LLM applications with us?

Are you interested in building LLM applications with us? We would love to hear from you! Reach out to us on Twitter @lanarky_io.

Let's connect and explore the possibilities of working together to create amazing LLM applications with Lanarky!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lanarky-0.7.14.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lanarky-0.7.14-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file lanarky-0.7.14.tar.gz.

File metadata

  • Download URL: lanarky-0.7.14.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/6.2.0-1011-azure

File hashes

Hashes for lanarky-0.7.14.tar.gz
Algorithm Hash digest
SHA256 6dfe0be43e7d91745aaa885fef99c8dbd718d2eee9c4e98fcef9de0c45e62f00
MD5 6b7e3f411f25e6ddf3f1049e44c965b5
BLAKE2b-256 8f96b7f105fd771efeabc66eebd3b82d1eebf32098d2943911df346ede87c095

See more details on using hashes here.

File details

Details for the file lanarky-0.7.14-py3-none-any.whl.

File metadata

  • Download URL: lanarky-0.7.14-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.9.18 Linux/6.2.0-1011-azure

File hashes

Hashes for lanarky-0.7.14-py3-none-any.whl
Algorithm Hash digest
SHA256 ae6fc8e323a633eab62e829e9b78beb8698b164d077a996e1e81a9bf1f5f4076
MD5 f37830e60d73988b29c4e6bdaca40a8b
BLAKE2b-256 0aaeeb792b77e7da96f9b497f60317d22b8be89361247b8a941fce55aa7e4c6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page