helloworld
It's a simple python package that prints hello world!
PIP install
-
Test\prerelease https://test.pypi.org/project/azhelloworldpackage/
pip install -i https://test.pypi.org/simple/ azhelloworldpackage
-
Production https://pypi.org/project/azhelloworldpackage/
pip install azhelloworldpackage
Test locally from source code
pip install .
python test.py
Create local package
-
Make sure you have the latest versions of setuptools, wheel installed:
pip install --user --upgrade setuptools wheel
-
python setup.py sdist bdist_wheel
-
under
dist
there will be one or many*.whl
file you can install it locallypip install C:/some-dir/some-file.whl
orpip install /dist/some-file.whl
Steps to upload your package to the Python Package Index under your account:
-
get user account https://test.pypi.org
-
get user account https://pypi.org
-
Make sure you have the latest versions of setuptools, wheel and twine installed:
pip install --user --upgrade setuptools wheel
pip install --user --upgrade twine
-
Rename azhelloworldpackage, your package name can contains letters, numbers, _ , and -. It also must not already taken on pypi.org you need to rename
name
insetup.py
file and rename the folder structure `
/yourpackagename init.py
`
-
python setup.py sdist bdist_wheel
-
Upload it to test\prerelease environment
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
-
Test newly uploaded package
pip install -i https://test.pypi.org/simple/ yourpackagename
-
Upload it to production environment
twine upload dist/*
-
Test your package
pip install yourpackagename
Resource https://packaging.python.org/tutorials/packaging-projects/#uploading-your-project-to-pypi