Skip to main content

Create a new FastApp project in one command

Project description

fastapp-new

Create a new FastApp project in one command.

How to use

Install uv following their guide for your system.

Run:

uvx fastapp-new awesomeapp

This will create a new project awesomeapp with a full-stack FastAPI app, configured with uv.

Enter the directory:

cd awesomeapp

Run the development server:

uv run fastapi dev

Open your browser and go to http://localhost:8000 to see your new FastApp project running.

Existing directory

If you want to create a new FastApp project in an existing directory, run the command without a project name:

uvx fastapp-new

Generated Stack

  • app/main.py - FastAPI app assembly and app.frontend()
  • app/routes.py - HTMX partial routes and JSON API routes
  • app/components.py - htpy server-side HTML components
  • frontend/ - static HTML/CSS frontend served by FastAPI
  • tests/ - starter pytest coverage for the generated app
  • AGENTS.md - coding-agent instructions for working on the generated project
  • knowledge/ - OKF-style stack references and official documentation links
  • pyproject.toml - managed by uv

Agent-ready projects

Generated projects include AGENTS.md and an OKF-style knowledge/ directory so coding agents can quickly understand how to run, modify, test, and deploy the app. AGENTS.md stays focused on project rules and commands, while knowledge/stack/ contains official documentation links and stack-specific notes for FastAPI, htmx, htpy, optional Modal deployment, Logfire, uv, and AGENTS.md.

Observability with Logfire

Logfire is optional. Passing --logfire installs logfire[fastapi], instruments the generated FastAPI app, and configures telemetry with send_to_logfire="if-token-present" so data is sent only when Logfire credentials or LOGFIRE_TOKEN are present.

For production, set LOGFIRE_TOKEN as an environment variable or deployment platform secret.

Deploy

The generated project supports FastAPI Cloud by default.

Deploy to FastAPI Cloud:

uv run fastapi deploy

Optional Modal Deployment

Passing --modal installs modal, writes modal_app.py, and adds Modal commands to the generated project docs:

uvx fastapp-new awesomeapp --modal

Then deploy to Modal:

uv run modal serve modal_app.py
uv run modal deploy modal_app.py

Positioning

fastapi-new creates a minimal general-purpose FastAPI project. fastapp-new is positioned for app development where FastAPI owns both sides of the product: static frontend serving, HTMX interactions, and JSON endpoints live in one Python project without a Node build step. Server-rendered HTML fragments are generated with htpy instead of raw string concatenation.

License

This project is licensed under the terms of the MIT license.

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

fastapp_new-0.0.4.tar.gz (57.6 kB view details)

Uploaded Source

Built Distribution

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

fastapp_new-0.0.4-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file fastapp_new-0.0.4.tar.gz.

File metadata

  • Download URL: fastapp_new-0.0.4.tar.gz
  • Upload date:
  • Size: 57.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fastapp_new-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e6c6587a3f5aeeb468ba41633af613748bd2e94cba9095bc997c5b6c72928f64
MD5 822763afdcae1301aa28147a238c158b
BLAKE2b-256 2ad453b80f4cd000c707c7894a39f2d68fce60c72f63e535f7cc43fde91c5226

See more details on using hashes here.

File details

Details for the file fastapp_new-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: fastapp_new-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fastapp_new-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 62342cb42225f6b84179bc6fac7c033c9dbe45c2b812b6c5eeb1f979e30eeb3f
MD5 9ebbf328bafd09b3ccf24d0febdf4393
BLAKE2b-256 0b80b8bc2abed1b590ac398a06d658f1082d7b02a3c9beb4f1b86f8f8f1b0f54

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