Metadata-Version: 2.1
Name: morph-data
Version: 0.1.9
Summary: Morph is a python-centric full-stack framework for building and deploying data apps.
Home-page: https://www.morph-data.io
License: Apache-2.0
Author: Morph
Author-email: contact@morphdb.io
Requires-Python: >=3.9,<3.13
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database :: Front-Ends
Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Widget Sets
Requires-Dist: Jinja2 (>=3.1.4,<4.0.0)
Requires-Dist: aiomysql (>=0.2.0,<0.3.0)
Requires-Dist: boto3 (>=1.26.80,<2.0.0)
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: colorama (>=0.4.6,<0.5.0)
Requires-Dist: colorlog (>=6.8.2,<7.0.0)
Requires-Dist: cryptography (>=42.0.8,<43.0.0)
Requires-Dist: duckdb (>=1.0.0,<2.0.0)
Requires-Dist: fastapi (>=0.115.4,<0.116.0)
Requires-Dist: fastapi-inertia (>=1.0.3,<2.0.0)
Requires-Dist: google (>=3.0.0,<4.0.0)
Requires-Dist: google-api-python-client (>=2.139.0,<3.0.0)
Requires-Dist: google-cloud-bigquery (>=3.25.0,<4.0.0)
Requires-Dist: gspread (>=6.1.2,<7.0.0)
Requires-Dist: httpx (>=0.27.0,<0.28.0)
Requires-Dist: itsdangerous (>=2.2.0,<3.0.0)
Requires-Dist: pandas (>=2.1.3,<3.0.0)
Requires-Dist: paramiko (>=3.4.0,<4.0.0)
Requires-Dist: psycopg2-binary (>=2.9.9,<3.0.0)
Requires-Dist: pyarrow (>=17.0.0,<18.0.0)
Requires-Dist: pydantic (>=2.5.3,<3.0.0)
Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
Requires-Dist: python-multipart (>=0.0.17,<0.0.18)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Requires-Dist: requests (>=2.31.0,<3.0.0)
Requires-Dist: snowflake-connector-python (>=3.11.0,<4.0.0)
Requires-Dist: sqlalchemy (>=2.0.36,<3.0.0)
Requires-Dist: sqlalchemy-pytds (>=1.0.2,<2.0.0)
Requires-Dist: sqlglot (>=25.22.0,<26.0.0)
Requires-Dist: sshtunnel (>=0.4.0,<0.5.0)
Requires-Dist: starlette (>=0.41.3,<0.42.0)
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
Requires-Dist: toml (>=0.10.2,<0.11.0)
Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
Requires-Dist: urllib3 (>=1.26.18,<2.0.0)
Requires-Dist: uvicorn (>=0.32.0,<0.33.0)
Project-URL: Repository, https://github.com/morph-data/morph
Description-Content-Type: text/markdown

![Header](https://data.morphdb.io/assets/header.png)

## Features

[Morph](https://www.morph-data.io/) is a python-centric full-stack framework for building and deploying AI apps.

- **Fast to start** 🚀 - Allows you to get up and running with just three commands.
- **Deploy and operate 🌐** - Easily deploy your AI apps and manage them in production. Managed cloud is available for user authentication and secure data connection.
- **No HTML/CSS knowledge required🔰** - With **Markdown-based syntax** and **pre-made components**, you can create flexible, visually appealing designs without writing a single line of HTML or CSS.
- **Customizable 🛠️** - **Chain Python and SQL** for advanced AI workflows. Custom CSS and custom React components are available for building tailored UI.

## Quick start

1. Install morph

```bash
pip install morph-data
```

2. Create a new project

```bash
morph new
```

3. Start dev server

```bash
morph serve
```

4. Visit `http://localhsot:8080` on browser.

## How it works

Understanding the concept of developing an AI app in Morph will let you do a flying start.

1. Develop the AI workflow in Python and give it an alias.
2. Create an .mdx file. Each .mdx file becomes a page of your app.
3. Place the component in the MDX file and specify the alias to connect to.

```
.
├─ pages
│  └─ index.mdx
└─ python
   └─ chat.py
```

## Building AI Apps

### A little example

1. Create each files in `python` and `pages` directories.

Python: Using Langchain to create a AI workflow.

```python
import morph
from morph import MorphGlobalContext
from morph_lib.stream import stream_chat
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage

@morph.func
def langchain_chat(context: MorphGlobalContext):
    llm = ChatOpenAI(model="gpt-4o")
    messages = [HumanMessage(context.vars["prompt"])]
    for token in llm.stream(messages):
        yield stream_chat(token.content)
```

MDX: Define the page and connect the data.

```typescript
# 🦜🔗 Langchain Chat

<Chat postData="langchain_chat" height={300} />
```

2. Run `morph serve` to open the app!

![AI App](https://data.morphdb.io/assets/gif/langchain-demo.gif)

## Documentation

Visit https://docs.morph-data.io for more documentation.

## Contributing

Thanks for your interest in helping improve Morph ❤️

- Before contributing, please read the [CONTRIBUTING.md](CONTRIBUTING.md).
- If you find any issues, please let us know and open [an issue](https://github.com/morph-data/morph/issues/new/choose).

## Lisence

Morph is [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) licensed.

