Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
python-version: "3.12"
- name: Install dependencies
run: pip install -e ".[dev,django,websockets]"
run: pip install -e ".[dev]"
- name: Check formatting
run: ruff format --check .
- name: Lint
Expand All @@ -26,6 +26,7 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
Expand All @@ -34,6 +35,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install -e ".[dev,django,websockets]"
run: pip install -e ".[dev]"
- name: Run tests
run: pytest tests/ -q --tb=short
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.0b0] - 2026-02-23

### Breaking Changes

- **`fastapi`, `uvicorn`, and `jinjax` are no longer installed by default.**
These packages have been moved from mandatory core dependencies to the optional
`[fastapi]` extras group. Existing FastAPI users must update their install command:

```bash
# Before (0.2.x)
pip install component-framework

# After (0.3.0+)
pip install "component-framework[fastapi]"
```

**CI pipelines** that install the bare package without specifying an extras group
will break silently after this upgrade. Update all install commands in CI
configuration files (GitHub Actions, Dockerfile, tox.ini, Makefile, etc.).

**Transitive dependents** — downstream projects that relied on `fastapi` or
`jinjax` being pulled in transitively through this library will also be affected.
Audit your dependency tree if you see unexpected ImportError messages after upgrading.

### Added

- `[fastapi]` optional extras group — installs `fastapi>=0.109.0`,
`uvicorn[standard]>=0.27.0`, and `jinjax>=0.41`.
- `[dev-base]` optional extras group — test tooling without adapter extras,
used by the CI isolation matrix.
- `[all]` convenience extras group — installs all runtime extras
(`[fastapi,django,websockets]`).
- Actionable `ImportError` messages on all adapter modules — attempting to import
an adapter without its extras group now raises a clear error naming the missing
package and the install command needed to resolve it. Example:

```
ImportError: 'fastapi' is not installed.
Install the 'fastapi' extra: pip install 'component-framework[fastapi]'
```

- CI extras isolation matrix — each extras group (`base`, `fastapi`, `django`,
`all`) is now tested in isolation to prevent cross-adapter contamination.
- `pytest.importorskip` guards on all adapter test modules — adapter tests skip
cleanly instead of failing with `ImportError` when the relevant extras group is
not installed.

### Changed

- `[dev]` extras group now self-references all runtime extras via
`component-framework[dev-base,fastapi,django,websockets]`. Installing `.[dev]`
continues to provide the full development environment.
- `pydantic>=2.0` is now the only mandatory runtime dependency.

## [0.2.0b0] - 2025-XX-XX

Initial Beta release. See README for full feature list.
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,66 @@ Framework-agnostic server components with LiveView-style interactivity inspired

## Development Status

**Current Version:** 0.2.0-beta
**Current Version:** 0.3.0-beta
**API Documentation:** [fsecada01.github.io/component-framework](https://fsecada01.github.io/component-framework/)

The framework has a complete, tested feature set covering the full Beta roadmap. APIs are solidifying — the core lifecycle, permissions, composition, and testing utilities are stable. We welcome feedback before the 1.0 release.

---

## Adapter Support

| Framework | Status | Install extra | Notes |
|-----------|--------|---------------|-------|
| **FastAPI** | ✅ Supported | `[fastapi]` | Includes JinjaX renderer and WebSocket adapter |
| **Django** | ✅ Supported | `[django]` | Includes Channels, Cotton, and template renderer |
| **Flask** | 🗓 Planned | — | [Tracking issue #5](https://github.com/fsecada01/component-framework/issues/5) |
| **Litestar** | 🗓 Planned | — | [Tracking issue #6](https://github.com/fsecada01/component-framework/issues/6) |

---

## Installation

Install only what you need — `pydantic` is the only mandatory dependency:

```bash
# Django projects
pip install "component-framework[django]"

# FastAPI projects
pip install "component-framework[fastapi]"

# Both adapters
pip install "component-framework[fastapi,django]"

# Everything
pip install "component-framework[all]"
```

### Migrating from 0.2.x

> ⚠️ **Breaking change in 0.3.0**: `fastapi`, `uvicorn`, and `jinjax` are no longer
> installed by default.

If you were using the FastAPI adapter, add `[fastapi]` to your install command:

```bash
# Before
pip install component-framework

# After
pip install "component-framework[fastapi]"
```

**CI pipelines** — any workflow step that installs `component-framework` without
specifying an extras group will stop receiving FastAPI automatically. Update all
install commands in your GitHub Actions, Dockerfile, tox.ini, Makefile, or other
CI configuration files.

See [CHANGELOG.md](CHANGELOG.md) for the full list of changes.

---

## Features

### Core
Expand Down
34 changes: 21 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "component-framework"
version = "0.2.0b0"
version = "0.3.0b0"
description = "Framework-agnostic server components with LiveView-style interactivity"
readme = "README.md"
requires-python = ">=3.11"
Expand All @@ -20,22 +20,14 @@ classifiers = [
]

dependencies = [
"fastapi>=0.109.0",
"uvicorn[standard]>=0.27.0",
"jinjax>=0.41",
"pydantic>=2.0",
]

[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-django>=4.5.0",
"httpx>=0.26.0",
"ruff>=0.1.0",
"ty>=0.0.18",
"pre-commit>=3.5.0",
"pdoc>=14.0",
fastapi = [
"fastapi>=0.109.0",
"uvicorn[standard]>=0.27.0",
"jinjax>=0.41",
]
django = [
"django>=4.2",
Expand All @@ -46,6 +38,22 @@ django = [
websockets = [
"websockets>=12.0",
]
dev-base = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-django>=4.5.0",
"httpx>=0.26.0",
"ruff>=0.1.0",
"ty>=0.0.18",
]
dev = [
"component-framework[dev-base,fastapi,django,websockets]",
"pre-commit>=3.5.0",
"pdoc>=14.0",
]
all = [
"component-framework[fastapi,django,websockets]",
]

[project.urls]
Homepage = "https://github.com/fsecada01/component-framework"
Expand Down
Loading