my_sample

Not the most useful package


Keywords
sample, pip, tutorial
License
MIT
Install
pip install my_sample==0.4.0

Documentation

my_sample

my_sample is a Python package designed to explain how to distribute packages via PyPI (the Python Package Index) so they can be installed using pip.

No se recomienda su uso para fines ajenos a los descritos arriba. This package works with Python 2 and 3.

Installation

pip install my_sample

Usage

Instantiate a questionnaire and add a couple of questions.

from my_sample import MySample
s = MySample() # amazing

Tests

Not yet...

Contributing

If you want to improve my_sample, fork the repo and submit a pull request!

License

This code is licensed under the MIT License.

How To

El mejor tutorial acerca de PyPI que he encontrado está aquí.

Hay más información aquí.

First, create accounts with https://pypi.python.org/ and https://testpypi.python.org/pypi. Then create your ~.pypirc file.

~/.pypirc

[distutils]
index-servers =
  pypi
  pypitest

[pypi]
repository=https://pypi.python.org/pypi
username=<username>
password=<password>

[pypitest]
repository=https://testpypi.python.org/pypi
username=<username>
password=<password>

Tag your release and upload it to GitHub.

# add a tag to a package so that package can be submitted to PyPI
git tag <version> -m "Adds a versioning tag so that we can submit this to PyPI."

git push --tags origin master
# file is now available for download here
# https://github.com/<user>/<repo>/tarball/<tag>

Submit your package to pypitest first. Check that it works, then submit it to pypi.

# submit to pypi test server
python setup.py register -r pypitest
python setup.py sdist upload -r pypitest
pip install -i https://testpypi.python.org/pypi <package name>

# submit to pypi
python setup.py register -r pypi
python setup.py sdist upload -r pypi
pip install <package name>

"development mode"

pip install -e .

upgrade pip, this is the first thing you should try if pip fails to install something pip install --upgrade pip