https://github.com/joaopalmeiro/template-python-uv-script
Opinionated Python + uv template for new scripts.
https://github.com/joaopalmeiro/template-python-uv-script
Last synced: about 1 month ago
JSON representation
Opinionated Python + uv template for new scripts.
- Host: GitHub
- URL: https://github.com/joaopalmeiro/template-python-uv-script
- Owner: joaopalmeiro
- License: mit
- Created: 2024-03-06T09:08:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-18T17:40:02.000Z (2 months ago)
- Last Synced: 2025-02-18T18:29:06.354Z (2 months ago)
- Language: Python
- Homepage:
- Size: 61.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# template-python-uv-script
[](https://github.com/astral-sh/uv)
[](https://github.com/astral-sh/ruff)
[](https://mypy-lang.org/)Opinionated [Python](https://www.python.org/) + [uv](https://github.com/astral-sh/uv) template for new scripts.
## Getting Started
1. Go to or create the project folder.
2. Get the template files:```bash
npx giget github:joaopalmeiro/template-python-uv-script . --force
```3. Search for `template-python-uv-script` and replace it with the project name. Ignore the template repository URL in the [NOTES.md](NOTES.md) file.
4. Search for `Opinionated [Python](https://www.python.org/) + [uv](https://github.com/astral-sh/uv) template for new scripts.` and replace it with the (short) project description.
5. Search for `João Palmeiro` and replace it with the author's name.
6. Open the [requirements.txt](requirements.txt) file and add the project-specific dependencies.
7. Delete the [deprecated/](deprecated) folder and the corresponding configuration in the [.vscode/settings.json](.vscode/settings.json) and [ruff.toml](ruff.toml) files.
8. Delete the [TEMPLATE.md](TEMPLATE.md) file.
9. Delete the [`Getting Started`](#getting-started) section.## Development
Install [uv](https://docs.astral.sh/uv/getting-started/installation/) (if necessary):
```bash
curl -LsSf https://astral.sh/uv/0.6.1/install.sh | sh
``````bash
uv python install
``````bash
uv venv
``````bash
source .venv/bin/activate
``````bash
uv pip install -r requirements.txt
``````bash
python 01.py
``````bash
ruff check
``````bash
mypy
``````bash
ruff check --fix
``````bash
ruff format
``````bash
deactivate
```