File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
1027python3 -m venv .venv
1128```
1229
13- Activate virtual environment:
30+ Activate the virtual environment:
1431
1532``` sh
1633source .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
2542Generate distribution packages:
@@ -28,16 +45,16 @@ Generate distribution packages:
2845python3 -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
Original file line number Diff line number Diff line change 1+ build == 1.2.2.post1
2+ twine == 6.1.0
You can’t perform that action at this time.
0 commit comments