Skip to content

Commit 7da7ec7

Browse files
1 parent 94d457c commit 7da7ec7

4 files changed

Lines changed: 74 additions & 1 deletion

File tree

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
1-
# python-package-template
1+
# python_package_template
2+
23
🐍 Python package template
4+
5+
## Development
6+
7+
Create virtual environment:
8+
9+
```sh
10+
python3 -m venv .venv
11+
```
12+
13+
Activate virtual environment:
14+
15+
```sh
16+
source .venv/bin/activate
17+
```
18+
19+
Install PyPA's [build](https://github.com/pypa/build):
20+
21+
```sh
22+
python3 -m pip install --upgrade build
23+
```
24+
25+
Generate distribution packages:
26+
27+
```sh
28+
python3 -m build
29+
```
30+
31+
Install [Twine](https://github.com/pypa/twine):
32+
33+
```sh
34+
python3 -m pip install --upgrade twine
35+
```
36+
37+
Upload all of the archives under `dist`:
38+
39+
```sh
40+
python3 -m twine upload --repository testpypi dist/*
41+
```
42+
43+
## License
44+
45+
[MIT](LICENSE)

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[project]
2+
name = "python_package_template"
3+
version = "1.0.0-alpha"
4+
authors = [
5+
{ name="Mark", email="mark@remarkablemark.org" },
6+
]
7+
description = "Python package template"
8+
readme = "README.md"
9+
requires-python = ">=3.8"
10+
classifiers = [
11+
"Programming Language :: Python :: 3",
12+
"Operating System :: OS Independent",
13+
]
14+
license = "MIT"
15+
license-files = ["LICEN[CS]E*"]
16+
17+
[project.urls]
18+
Homepage = "https://github.com/remarkablemark/python_package_template"
19+
Issues = "https://github.com/remarkablemark/python_package_template/issues"

src/python_package_template/__init__.py

Whitespace-only changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def hello(name: str="World") -> str:
2+
"""
3+
Greet a name.
4+
5+
Args:
6+
name (str): The optional name.
7+
8+
Returns:
9+
greeting (str): The greeting.
10+
"""
11+
return f"Hello, {name}!"

0 commit comments

Comments
 (0)