Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Empaquetando y distribuyendo código python con...
Search
JuanPablo
December 12, 2014
Programming
540
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
67
Creando paquetes para npm
juanpabloaj
0
38
Unit test
juanpabloaj
0
140
Other Decks in Programming
See All in Programming
AmebaブログはKMPから卒業します
kmars0605
0
290
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
230
JIS keyboard support in Omarchy
lef237
0
170
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.5k
続・コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions-again
handlename
0
140
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
270
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
250
Performance Optimization With LLMs
xleitix
0
220
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
130
sbt 2.0: takeoff
eed3si9n
0
170
Railsバージョンを4倍にした話
optim
0
820
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
380
Featured
See All Featured
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
880
Everyday Curiosity
cassininazir
0
370
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Product Roadmaps are Hard
iamctodd
55
13k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
550
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
550
Building Adaptive Systems
keathley
44
3.3k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
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/