How To Make The Package in Python - Data Driven Investor - Medium
How To Make The Package in Python - Data Driven Investor - Medium
2020, 12:09
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 1 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
All lowercase
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 2 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
ankitpackage
├── ankitpackage
└── __init__.py
├── setup.py
Python module.
setup(name='ankitpackage',
version='0.1',
description='First python package',
url='http://github.com/storborg/funniest',
author='Ankit',
author_email='[email protected]',
license='MIT',
packages=['ankitpackage'],
zip_safe=False)
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 3 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
this:
ankitpackage
├── ankitpackage
└── __init__.py
└── utilities.py
├── setup.py
In utilities.py :
def joke():
return ('That is my first package!')
. . .
Import in local
Now we can install the package locally (for use on our system),
by running the following command:
$ pip3 install .
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 4 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
. . .
Publishing On GitHub
GitHub
GitHub, Inc. is a US-based global company that provides
hosting for software development version control using Git.
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 5 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
ankitpackage
├── ankitpackage
└── __init__.py
└── utilities.py
├── setup.py
├── .gitignore
In .gitignore :
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 6 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
$ git init
$ git add .
$ git commit -m "first commit"
$ git remote add origin
https://github.com/rajputankit22/ankitpackage.git
git push -u origin master
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 7 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
. . .
Publishing On PiPy
The setup.py script is also our main entrypoint to register the
package name on PyPI and upload source distributions.
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 8 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 9 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 10 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 11 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
3537 signups
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 12 z 13
How to make the Package in Python - Data Driven Investor - Medium 03.03.2020, 12:09
https://medium.com/datadriveninvestor/how-to-make-the-package-in-python-a82292aeb775 Strona 13 z 13