Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,36 @@
# python-template

`ctrl+F python-template`, replace with your name.
`ctrl+F python_template`, replace with your name.
Rename all dirs with python + template after that.


This project uses [`uv`](https://github.com/astral-sh/uv)

This project uses [`uv`](https://github.com/astral-sh/uv), which can be installed in one line:
```bash
# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
```

To get started with the project:

```
git clone https://github.com/marksverdhei/python-template.git
cd python-template
```

Then install project with
```
uv sync --dev
source .venv/bin/activate
```

For development, make sure to install the project with the `-e` flag
so the source code isn't distributed to `.venv`:
```
uv pip install -e .
```

Then you can run the default cli, which can be customized in `cli.py` and `pyproject.toml`
```
$ python-template
Hello from python-template
```

How to install:
```bash
pip install git+https://github.com/marksverdhei/python-template.git
Expand Down
10 changes: 2 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,18 @@ name = "python-template"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "marksverdhei", email = "marksverdhei@hotmail.com" }
]
requires-python = ">=3.12"
dependencies = [
"pydantic>=2.11.3",
]
dependencies = []

[project.scripts]
python_template = "python_template:cli.main"
python-template = "python_template:cli.main"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[dependency-groups]
dev = [
"ipykernel>=6.29.5",
"ipython>=9.1.0",
"pytest>=8.3.5",
"ruff>=0.11.4",
Expand Down
15 changes: 2 additions & 13 deletions src/python_template/cli.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
from pydantic import BaseModel


class CLIArgs(BaseModel):
pass


def parse_args():
return {}


def main():
args = parse_args()
print("Your args are:", args)
print("Hello from python-template")


if __name__ == "__main__":
main()
main()
Loading