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
0
510
Empaquetando y distribuyendo código python con pip
JuanPablo
December 12, 2014
Tweet
Share
More Decks by JuanPablo
See All by JuanPablo
Nodejs, mocha y un poco de travis-ci
juanpabloaj
0
62
Creando paquetes para npm
juanpabloaj
0
35
Unit test
juanpabloaj
0
130
Other Decks in Programming
See All in Programming
AI活用のコスパを最大化する方法
ochtum
0
120
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
1.1k
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
160
The Ralph Wiggum Loop: First Principles of Autonomous Development
sembayui
0
3.7k
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
110
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
450
株式会社 Sun terras カンパニーデック
sunterras
0
2k
PJのドキュメントを全部Git管理にしたら、一番喜んだのはAIだった
nanaism
0
240
CSC307 Lecture 13
javiergs
PRO
0
310
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
230
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
540
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
250
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
150
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Evolving SEO for Evolving Search Engines
ryanjones
0
150
Crafting Experiences
bethany
1
80
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
200
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
How to Talk to Developers About Accessibility
jct
2
150
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.1k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
210
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
140
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/