Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Empaquetando y distribuyendo código python con...
Search
JuanPablo
December 12, 2014
Programming
510
0
Share
Empaquetando y distribuyendo código python con pip
JuanPablo
December 12, 2014
More Decks by JuanPablo
See All by JuanPablo
Nodejs, mocha y un poco de travis-ci
juanpabloaj
0
63
Creando paquetes para npm
juanpabloaj
0
37
Unit test
juanpabloaj
0
130
Other Decks in Programming
See All in Programming
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
450
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
670
t *testing.T は どこからやってくるの?
otakakot
1
710
Making the RBS Parser Faster
soutaro
0
520
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
180
Don't Prompt Harder, Structure Better
kitasuke
0
780
Vibe NLP for Applied NLP
inesmontani
PRO
0
480
Offline should be the norm: building local-first apps with CRDTs & Kotlin Multiplatform
renaudmathieu
0
230
アーキテクチャモダナイゼーションとは何か
nwiizo
19
5.5k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
110
AI時代のエンジニアリングの原則 / Engineering Principles in the AI Era
haru860
0
620
YJITとZJITにはイカなる違いがあるのか?
nakiym
0
250
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
280
The Cult of Friendly URLs
andyhume
79
6.8k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
380
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.2k
New Earth Scene 8
popppiees
3
2.1k
First, design no harm
axbom
PRO
2
1.2k
KATA
mclloyd
PRO
35
15k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
280
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Music & Morning Musume
bryan
47
7.2k
Prompt Engineering for Job Search
mfonobong
0
280
Transcript
Empaquetando y distribuyendo código python con pip Juan Pablo Abarzua
11 Diciembre 2014
– http://www.jeffknupp.com/blog/2014/04/03/dont-write-python-scripts-write- python-libraries/ “Don't Write Python Scripts, Write Python Libraries”
No escribas scripts, escribe librerías o mejor aun, escribe paquetes
distribuibles.
pip El gestionador de paquetes de Python
• https://pip.pypa.io/en/latest/installing.html • wget https://bootstrap.pypa.io/get-pip.py • python get-pip.py pip install
Virtualenv Entornos virtuales, instalaciones sin modificar el sistema.
virtualenv • pip install virtualenv • pip install virtualenvwapper •
mkdir ~/envs • export WORKON_HOME=~/envs • source /usr/local/bin/virtualenvwrapper.sh
• mkvirtualenv env_ejemplo • workon env_ejemplo • pip install django
Creando un entorno virtual
None
• pip freeze • pip freeze > requirements.txt • pip
install -r requirements.txt requirements.txt
Creando un modulo distribuible
None
• mkvirtualenv env_ejemplo_modulo • workon env_ejemplo_modulo • pip install -e
. • pip list • pip uninstall modulo-simple
None
Creando una aplicación de consola distribuible
None
• mkvirtualenv env_ejemplo_command • workon env_ejemplo_command • pip install -e
. • pip uninstall hola-meetup
None
• Hasta este punto cualquiera que descargue el código o
lo clone de un repositorio publico puede instalarlo.
PyPI - the Python Package Index
• Crear un cuenta en https://pypi.python.org/pypi • Crear el
archivo ~/.pypirc [distutils] index-servers= pypi [pypi] repository = https://pypi.python.org/pypi username = <your production user name goes here> password = <your production password goes here>
• python setup.py register -r pypi • python setup.py sdist
upload -r pypi
• pip search slacker-cli • https://pypi.python.org/pypi/slacker-cli/
• pip install git+git://github.com/juanpabloaj/repo_name.git@branch_name Instalando desde un repositorio git
• http://juanpabloaj.com/2014/08/03/Virtualenv-y- virtualenvwapper/ • http://juanpabloaj.com/wiki/pip/ • https://hynek.me/articles/sharing-your-labor-of-love- pypi-quick-and-dirty/ • http://peterdowns.com/posts/first-time-with-pypi.html
• http://www.jeffknupp.com/blog/2014/04/03/dont-write- python-scripts-write-python-libraries/ • http://choosealicense.com/