Skip to main content

Nestipy is a Python framework built on top of FastAPI that follows the modular architecture of NestJS

Project description

Nestipy Logo

Version Python License

Description

Nestipy is a Python framework built on top of FastAPI that follows the modular architecture of NestJS

Under the hood, Nestipy makes use of FastAPI, but also provides compatibility with a wide range of other libraries, like Blacksheep, allowing for easy use of the myriad of third-party plugins which are available.

Getting started

    pip install nestipy-cli
    nestipy new my_app
    cd my_app
    nestipy start --dev
    ├── src
    │    ├── __init__.py
    ├── app_module.py
    ├── app_controller.py
    ├── app_service.py
    ├── main.py
    ├── pyproject.toml
    ├── uv.lock
    ├── README.md
    
       

Documentation

View full documentation from here.

Support

Nestipy is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers. If you'd like to join them, please [read more here].

Stay in touch

License

Nestipy is MIT licensed.

Nestipy Web (Frontend)

Create a fullstack scaffold with the web UI:

    nestipy new my_app --web
    cd my_app
    nestipy start --dev --web --web-args "--vite --install"

Production static serving:

    nestipy run web:build
    nestipy start --web

Check environment health:

    nestipy doctor

Nested Layouts

You can add layout.py files in any folder under app/. The compiler nests layouts to match the folder structure (similar to Next.js).

  • app/layout.py wraps every page.
  • app/api/layout.py wraps only /api/*.

Import rules:

  • from layout import X resolves to the nearest layout.
  • from app.layout import X forces the root layout.

Action Security (Presets)

The CLI exposes flags to enable default Web Action security presets. These map to environment variables consumed by ActionsModule.for_root.

Examples:

nestipy start --dev --action-security --action-origins "http://localhost:5173" --action-csrf

Available flags:

  • --action-security/--no-action-security
  • --action-origins
  • --action-allow-missing-origin/--no-action-allow-missing-origin
  • --action-csrf/--no-action-csrf
  • --action-signature-secret
  • --action-permissions/--no-action-permissions

notfound.py (Planned)

We plan to add notfound.py at any level to define client-side 404 screens for that subtree, mirroring Next.js behavior.

Project details


Download files

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

Source Distribution

nestipy_cli-0.11.0.tar.gz (177.8 kB view details)

Uploaded Source

Built Distribution

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

nestipy_cli-0.11.0-py3-none-any.whl (207.1 kB view details)

Uploaded Python 3

File details

Details for the file nestipy_cli-0.11.0.tar.gz.

File metadata

  • Download URL: nestipy_cli-0.11.0.tar.gz
  • Upload date:
  • Size: 177.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.21

File hashes

Hashes for nestipy_cli-0.11.0.tar.gz
Algorithm Hash digest
SHA256 8f6073992640fb139d61218ea1ad836cf586391228454516a5e901ce08b4fb93
MD5 01bc068c19f9ac801198e3b08e673167
BLAKE2b-256 d9a2f6a86f108d7d552370f49924d3be42e0e34391304f59bcfda124c5dbf4d2

See more details on using hashes here.

File details

Details for the file nestipy_cli-0.11.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nestipy_cli-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 204375890e0afa29290bf76c78e6810b9610984dec2bcec46e54b89841dc44da
MD5 f80dd99b026a0693d4555f80288d4b5e
BLAKE2b-256 7f95ee980adadbb7a354234a3d68d9fc8edcb2ad4371bf2e039360049fc533c9

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