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.3.tar.gz (57.5 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.3-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastapp_new-0.0.3.tar.gz
  • Upload date:
  • Size: 57.5 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.3.tar.gz
Algorithm Hash digest
SHA256 e2780044b1d702c2417f9f42663d4015ae318c5ec5be887286dc2e140b77cb82
MD5 8dfa9b1563544c0a33e7c1594c051550
BLAKE2b-256 0c3606f2ef860f9a87a487d1ada1f0d5bea88aa9dba5bbf89f5d972f0664b1b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastapp_new-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2b3a130321f10cb6b0e02f5d0a9f7dc7f599f3c4ed5dd43a3b9c900136ee78cb
MD5 87d440f55ce625fba66ac45341b41970
BLAKE2b-256 0eeab8eb9080ad1a0a432fdb6678f05c6caac8dff5595a2fbac945ce4db277b4

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