pypi code example
Example 1: publish pypi
"""NOTE: Check for potential bugs or careless mistakes before uploading you work onto the
Python Package Index (PyPi)
"""
python3 -m pip install --upgrade twine setuptools
python3 setup.py sdist bdist_wheel
twine check dist/*
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
twine upload dist/*
Example 2: what is pypy
pypy is a compilable version of cpython
Example 3: pypi release
python3 setup.py sdist bdist_wheel
twine upload dist/*
Example 4: python upload to pip
1. Create files:
__init__.py setup.py README.md LICENSE
2. Check for setuptools and wheel:
pip install --user --upgrade setuptools wheel
3. Generate package:
py setup.py sdist bdist_wheel
4. Upload to pip:
twine upload dist/*
Example 5: PyPi
def = "The Python Package Index (PyPI) is a repository of software for the Python programming language." +
"PyPI helps you find and install software developed and shared by the Python community."
pip install -U <package name>
Example 6: pypi
To install any package from PyPi:
Type: python -m pip install <package name>
or simplay: pip install <package name>