Skip to content

Commit 6abbc7a

Browse files
build: add requirements.txt and update README.md
1 parent 7da7ec7 commit 6abbc7a

2 files changed

Lines changed: 27 additions & 8 deletions

File tree

README.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,41 @@
22

33
🐍 Python package template
44

5+
## Install
6+
7+
[Python](https://pypi.org/project/python_package_template/):
8+
9+
```sh
10+
pip install python_package_template
11+
```
12+
13+
## Usage
14+
15+
Print greeting:
16+
17+
```py
18+
from python_package_template import template
19+
print(template.hello())
20+
```
21+
522
## Development
623

7-
Create virtual environment:
24+
Create the virtual environment:
825

926
```sh
1027
python3 -m venv .venv
1128
```
1229

13-
Activate virtual environment:
30+
Activate the virtual environment:
1431

1532
```sh
1633
source .venv/bin/activate
1734
```
1835

19-
Install PyPA's [build](https://github.com/pypa/build):
36+
Install the dependencies:
2037

2138
```sh
22-
python3 -m pip install --upgrade build
39+
python3 -m pip install -r requirements.txt
2340
```
2441

2542
Generate distribution packages:
@@ -28,16 +45,16 @@ Generate distribution packages:
2845
python3 -m build
2946
```
3047

31-
Install [Twine](https://github.com/pypa/twine):
48+
Upload all of the archives under `dist`:
3249

3350
```sh
34-
python3 -m pip install --upgrade twine
51+
python3 -m twine upload --repository testpypi dist/*
3552
```
3653

37-
Upload all of the archives under `dist`:
54+
Install the package:
3855

3956
```sh
40-
python3 -m twine upload --repository testpypi dist/*
57+
python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps python_package_template
4158
```
4259

4360
## License

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build==1.2.2.post1
2+
twine==6.1.0

0 commit comments

Comments
 (0)