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
530
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
66
Creando paquetes para npm
juanpabloaj
0
38
Unit test
juanpabloaj
0
130
Other Decks in Programming
See All in Programming
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
480
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
210
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
210
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
130
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
200
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
9
6.1k
AIが無かった頃の素敵な出会いの話
codmoninc
1
370
AIエージェントで 変わるAndroid開発環境
takahirom
2
770
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.6k
OpenSpecのproposalにbrainstormingを持たせてみた
tigertora7571
1
190
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
170
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
740
Featured
See All Featured
Scaling GitHub
holman
464
140k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
650
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
How to train your dragon (web standard)
notwaldorf
97
6.7k
Technical Leadership for Architectural Decision Making
baasie
3
460
Large-scale JavaScript Application Architecture
addyosmani
515
110k
For a Future-Friendly Web
brad_frost
183
10k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Docker and Python
trallard
47
4.1k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
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/