Metadata-Version: 2.4
Name: lence
Version: 0.3.4
Summary: A lightweight data visualization framework
Project-URL: Homepage, https://github.com/osks/lence
Project-URL: Documentation, https://github.com/osks/lence
Project-URL: Repository, https://github.com/osks/lence
Author-email: Oskar Skoog <oskar@osd.se>
License-Expression: MIT
License-File: LICENSE
Keywords: dashboard,data,duckdb,markdoc,visualization
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Requires-Dist: click>=8.0
Requires-Dist: duckdb>=0.10.0
Requires-Dist: fastapi>=0.109.0
Requires-Dist: markdoc-py>=0.2.1
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: sqlglot==28.10.0
Requires-Dist: uvicorn[standard]>=0.27.0
Provides-Extra: dev
Requires-Dist: httpx>=0.26.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# Lence

Lightweight BI as code and data visualization framework. Write
markdown pages with SQL queries, render charts and tables.

## Usage

```bash
# Install lence
pip install lence

# Create a new project
lence init my-project
cd my-project

# Run development server
lence edit
```

Then open http://localhost:8000


## Example Page

Create `pages/dashboard.md`:

````markdown
# Sales Dashboard

```sql monthly
SELECT strftime(date, '%Y-%m') as month, SUM(amount) as total
FROM orders GROUP BY 1
```

{% line_chart data="monthly" x="month" y="total" /%}

{% datatable data="monthly" /%}
````

## Development

```bash
# Set up environment
make env

# Run development server
make dev
```

## Tech Stack

- **Backend**: Python, FastAPI, DuckDB
- **Frontend**: TypeScript, Lit, Vite
- **Syntax**: Markdoc
