This commit is contained in:
Simon-Martin Schröder 2025-12-16 11:27:11 +01:00 committed by GitHub
commit 81a2481186
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,14 @@ When creating projects, uv supports two basic templates: [**applications**](#app
[**libraries**](#libraries). By default, uv will create a project for an application. The `--lib` [**libraries**](#libraries). By default, uv will create a project for an application. The `--lib`
flag can be used to create a project for a library instead. flag can be used to create a project for a library instead.
| Option | When to Use | Project Layout |
| --------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `--bare` | You only want a minimal `pyproject.toml` without README, pin file, or source | Just `pyproject.toml` (can combine with `--lib` or `--build-backend`) |
| *(default)* / `--app` | Youre building a simple application (script, CLI, web server) | Flat layout with `main.py`, `README.md`, `.python-version`, `pyproject.toml` |
| `--package` | You want an installable packaged app (e.g. CLI on PyPI, tests, entry points) | `src/` layout with package module, `pyproject.toml` including build system |
| `--lib` | Youre creating a reusable library to distribute on PyPI | Like `--package`, but with `py.typed` and intended for import by other projects |
## Target directory ## Target directory
uv will create a project in the working directory, or, in a target directory by providing a name, uv will create a project in the working directory, or, in a target directory by providing a name,