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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
JuanPablo
December 12, 2014
Programming
520
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
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
110
Oxlintのカスタムルールの現況
syumai
5
910
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
100
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
400
CSC307 Lecture 17
javiergs
PRO
0
290
ECR拡張スキャンでSBOMを収集して サプライチェーン攻撃の影響調査を 爆速で終わらせてみた
akihisaikeda
2
210
Oxcを導入して開発体験が向上した話
yug1224
4
260
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
120
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1.1k
Moments When Things Go Wrong
aurimas
3
130
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
140
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
410
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Test your architecture with Archunit
thirion
1
2.3k
Accessibility Awareness
sabderemane
1
130
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
Practical Orchestrator
shlominoach
191
11k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
810
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
240
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
130
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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/