Skip to main content

The Modern Fullstack Python Meta-Framework: Build high-performance web apps .

Project description

Nexy

Nexy is a modular fullstack meta-framework designed to simplify modern web development. By bridging the gap between FastAPI backends and Vite-powered frontend ecosystems (React, Vue, Svelte, Solid.js), Nexy 2 allows you to build rich, interactive applications within a unified Python environment.

The Nexy 2 Vision

Nexy 2 transforms the development experience by masking complex architectural patterns behind an intuitive interface. The framework handles the orchestration between the Python server and the JavaScript client, allowing you to focus exclusively on business logic and UI.

Core Concepts

Mastering Nexy involves three essential pillars:

1. The .nexy Format (Polyglot Component)

While Nexy is fully functional for pure backend development (FastAPI-based APIs), the .nexy file is its powerful optional unit for building fullstack interfaces. It allows for a fluid composition of multiple languages:

  • Header (Python): Defined within --- blocks, this is where you declare properties (prop) and import components (whether they are .nexy, .vue, .tsx, .mdx, or even Python functions).
  • Template (HTML/Jinja2): The structure of your component, rendered server-side with the power of Jinja2.
---
# Definition Logic (Python)
title : prop[str] = "Nexy Component"
from "@/components/Card.nexy" import Card
from nexy import Vite  # Automatic asset injection
---
<!-- Server Rendering (Jinja2) -->
<div class="p-6 bg-white rounded-xl shadow-lg">
    <h1 class="text-2xl font-bold">{{ title }}</h1>
    <Card content="I can contain other components." />
</div>

2. Intelligent Hybrid Routing

Nexy scales with your project size:

  • File-Based Routing: Your src/routes/ directory structure defines your URLs (e.g., index.nexy -> /).
  • Module-Based Routing: For enterprise architectures, use a modular approach inspired by NestJS.
  • Hybrid Rendering: Mix static pages and dynamic API routes within the same project.

3. Unified Ecosystem via Vite

Nexy is framework-agnostic. You can import and use React, Vue, Svelte, or Solid.js components directly within your Nexy templates. The Vite build pipeline handles everything, ensuring optimal performance and zero configuration.

Tooling and Development

Nexy CLI (nx)

The nx command-line tool centralizes your development workflow:

  • nx init or nexy init: Initializes a Nexy project.
  • nx dev or nexy dev: Starts the Nexy server for development with Vite in parallel.
  • nx build or nexy build: Compiles your assets for optimized production deployment.
  • nx start or nexy start: Starts the Nexy server for production without Vite in parallel.

VS Code Extension (Alpha)

A dedicated extension (LSP) is included in the repository (currently in Alpha) to provide a first-class development experience: real-time diagnostics, prop and import auto-completion, and contextual snippets.

Getting Started

Prerequisites

  • Python 3.10+
  • Node.js 18+

Installation

pip install nexy

Project Initialization

nexy init

The interactive assistant will help you choose your preferred frontend framework and enable Tailwind CSS.

Run

nexy dev

Security and Reliability

  • Strict Typing: Pydantic integration for robust data and prop validation.
  • Native Protection: Automatic Jinja2 character escaping against XSS vulnerabilities.
  • Architectural Integrity: Built on SOLID principles for long-term maintainability.

License

Distributed under the MIT License.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexy-2.0.0b9.tar.gz (50.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexy-2.0.0b9-py3-none-any.whl (81.8 kB view details)

Uploaded Python 3

File details

Details for the file nexy-2.0.0b9.tar.gz.

File metadata

  • Download URL: nexy-2.0.0b9.tar.gz
  • Upload date:
  • Size: 50.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.17

File hashes

Hashes for nexy-2.0.0b9.tar.gz
Algorithm Hash digest
SHA256 f5aba97f285926201792e2436cda5ee1a7be33d312f3b56004a226e23d49f14c
MD5 24ebd64918d681ff0300dc1ba09ab267
BLAKE2b-256 647644139fb5a60cd49c48c8272a4649ccc717443388834577876bbc9027cf86

See more details on using hashes here.

File details

Details for the file nexy-2.0.0b9-py3-none-any.whl.

File metadata

  • Download URL: nexy-2.0.0b9-py3-none-any.whl
  • Upload date:
  • Size: 81.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.17

File hashes

Hashes for nexy-2.0.0b9-py3-none-any.whl
Algorithm Hash digest
SHA256 bc068d4569c3bae6044fcb64a0cd1f67d4a6f2efa995651af9271f786e462861
MD5 02d00f692a7e2f7bbc3b157623ee03e2
BLAKE2b-256 2258f15197ac4e14f4d80895da8072f90e77bc86cdaeb0921c41cfbbf999fe40

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