Morph is a python-centric full-stack framework for building and deploying data apps.
- Fast to start 🚀 - Allows you to get up and running with just three commands.
- Deploy and operate 🌐 - Easily deploy your data 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 data workflows. Custom CSS and custom React components are available for building tailored UI.
- Install morph
pip install morph-data
- Create a new project
morph new
- Start dev server
morph serve
- Visit
http://localhsot:9002
on browser.
Understanding the concept of developing a data app in Morph will let you do a flying start.
- Develop the data processing in Python and give it an alias.
- Create an .mdx file. Each .mdx file becomes a page of your app.
- Place the component in the MDX file and specify the alias to connect to.
.
├─ pages
│ └─ index.mdx
├─ python
│ └─ closing_deals_vis.py
└─ sql
└─ closing_deals.sql
- Create each files in
sql
,python
andpages
directories.
SQL: Using DuckDB to read CSV file.
{{
config(
name = "example_data",
connection = "DUCKDB"
)
}}
select
*
from
read_csv("example.csv")
Python: Using Plotly to create a chart.
import plotly.express as px
import morph
from morph import MorphGlobalContext
@morph.func
@morph.load_data("example_data")
def example_chart(context: MorphGlobalContext):
df = context.data["example_data"].groupby("state").sum(["population"]).reset_index()
fig = px.bar(df, x="state", y="population")
return fig
MDX: Define the page and connect the data.
export const title = "Starter App"
# Starter App
Morph is a full-stack framework for building data apps using Python, SQL and MDX.
## Data
<Grid cols="2">
<div>
<DataTable loadData="example_data" height={300} />
</div>
<div>
<Embed loadData="example_chart" height={300} />
</div>
</Grid>
- Run
morph serve
to open the app!
Visit https://docs.morph-data.io for more documentation.
Morph is Apache 2.0 licensed.