Skip to content

Commit 3aad7cc

Browse files
committed
add CLI example
1 parent f31bc4c commit 3aad7cc

3 files changed

Lines changed: 13 additions & 0 deletions

File tree

{{cookiecutter.project_slug}}/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ dependencies = []
1414
name = "{{ cookiecutter.author_name }}"
1515
email = "{{ cookiecutter.author_email }}"
1616

17+
[project.scripts]
18+
{{ cookiecutter.project_slug }} = "{{ cookiecutter.project_slug }}.__main__:main"
19+
1720
[dependency-groups]
1821
dev = [
1922
"autoflake",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from .hello import hello
2+
3+
__all__ = [
4+
'hello',
5+
]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from . import hello
2+
3+
4+
def main() -> None:
5+
print(hello('CLI'))

0 commit comments

Comments
 (0)