Skip to content

Commit 6df0f67

Browse files
Update project_publishing.md
1 parent bff69b3 commit 6df0f67

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

episodes/project_publishing.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,30 @@ exercises: 15
2222
::::::::::::::::::::::::::::::::::::::::::::::::
2323

2424
## Introduction
25-
Once we have created our project, defined all the necessary metadata in our toml file, its time to publish our project. Let see the tools and steps we need to acheive this.
25+
Once we have created our project, defined all the necessary metadata in the toml file, its time to publish our project. Let see the tools and steps we need to acheive this.
26+
We need to install the following tools
27+
1. `build` : A tool to read the ['pyproject']toml file and build the package files
28+
```bash
29+
pip install build
30+
31+
python -m build
32+
```
33+
This command creates a dist directory containing two files:
34+
```output
35+
```
36+
A wheel file (e.g., my_minimal_package-0.0.1-py3-none-any.whl).
37+
38+
A source archive (e.g., my-minimal-package-0.0.1.tar.gz).
39+
40+
2. `twine` : A tool for securely uploading packages to PyPI and TestPyPI.
41+
```bash
42+
pip install build twine
43+
44+
twine upload --repository testpypi dist/*
45+
```
46+
You'll be prompted to enter your TestPyPI username and password. It's recommended to use an API token instead of your password. When prompted for your password, paste the token in.
47+
48+
That's it! After the upload is successful, your package will be available on TestPyPI.
2649
2750
::::::::::::::::::::::::::::::::::::: keypoints
2851

0 commit comments

Comments
 (0)