Skip to main content
lanarky-logo

Lanarky

stars Documentation PyPI version Supported Python Versions Code Coverage License: MIT

Lanarky is an open-source framework to deploy LLM applications in production. It is built on top of FastAPI and comes with batteries included.

🚀 Features

  • supports LangChain
  • simple gradio chatbot UI for fast prototyping

See Roadmap for upcoming features.

❓ Why?

There are great low-code/no-code solutions in the open source to deploy your LLM projects. However, most of them are opinionated in terms of cloud or deployment code. This project aims to provide users with a cloud-agnostic and deployment-agnostic solution which can be easily integrated into existing backend infrastructures.

💾 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.routing 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.

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.2.tar.gz (12.6 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.2-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lanarky-0.7.2.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.9.16 Linux/5.15.0-1037-azure

File hashes

Hashes for lanarky-0.7.2.tar.gz
Algorithm Hash digest
SHA256 a2d0fb6109749de4e31e2ab4d24e9551408826091712e34d88aad055648a1566
MD5 ce27b9ae1d98e5cb7dbbc4be1338e247
BLAKE2b-256 352dfdaa87262b45143f44ea0ce91f405e15e41abd9c179c0f31feb7b17f8469

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lanarky-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.9.16 Linux/5.15.0-1037-azure

File hashes

Hashes for lanarky-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87f1ffcb278a4685d920335fe97f9ef4f0947631be4f67d080007fb219078806
MD5 e322f2962c265898c5c208b4b6fc403f
BLAKE2b-256 b2d93089d1a50e8ca498b213eb9fc9cca6269bdae8ef200196c707a8329b7088

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