python side projects etssi-jan-2013
TRANSCRIPT
![Page 1: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/1.jpg)
PYTHON
SIDE PROJECTS
by @ahmonteroEnero 2013
lunes, 28 de enero de 13
![Page 2: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/2.jpg)
HOLAlunes, 28 de enero de 13
![Page 3: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/3.jpg)
MI DEFINICIÓN
★ TIEMPO LIBRE
★ ¿ ZONA DE CONFORT ?
★ PERSONA / S
lunes, 28 de enero de 13
![Page 4: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/4.jpg)
MOTIVACIONES
✓ CONSTRUIR
✓ APRENDER
✓ EXPONERSE
lunes, 28 de enero de 13
![Page 5: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/5.jpg)
MOTIVACIONES
✓ CONSTRUIR
✓ APRENDER
✓ EXPONERSE
✓DIVERTIRSElunes, 28 de enero de 13
![Page 6: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/6.jpg)
INTRANSCENDENTE
lunes, 28 de enero de 13
![Page 7: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/7.jpg)
INTRANSCENDENTE
‣ # USUARIOS
lunes, 28 de enero de 13
![Page 8: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/8.jpg)
INTRANSCENDENTE
‣ # USUARIOS
‣ # DESCARGAS
lunes, 28 de enero de 13
![Page 9: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/9.jpg)
INTRANSCENDENTE
‣ # USUARIOS
‣ # DESCARGAS
‣ ¿RECHAZADA APP STORE?
lunes, 28 de enero de 13
![Page 10: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/10.jpg)
INTRANSCENDENTE
‣ # USUARIOS
‣ # DESCARGAS
‣ ¿RECHAZADA APP STORE?
‣ MODELO DE NEGOCIOlunes, 28 de enero de 13
![Page 11: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/11.jpg)
AMORlunes, 28 de enero de 13
![Page 12: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/12.jpg)
MUST LIST
lunes, 28 de enero de 13
![Page 13: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/13.jpg)
MUST LIST
✓ TERMINADO
lunes, 28 de enero de 13
![Page 14: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/14.jpg)
MUST LIST
✓ TERMINADO ➡ 100 %
lunes, 28 de enero de 13
![Page 15: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/15.jpg)
MUST LIST
✓ TERMINADO
✓ HONESTIDAD
➡ 100 %
lunes, 28 de enero de 13
![Page 16: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/16.jpg)
MUST LIST
✓ TERMINADO
✓ HONESTIDAD
✓ ENLACES
➡ 100 %
lunes, 28 de enero de 13
![Page 17: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/17.jpg)
MUST LIST
✓ TERMINADO
✓ HONESTIDAD
✓ ENLACES
➡ 100 %
➡ GITHUB, WEB…
lunes, 28 de enero de 13
![Page 18: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/18.jpg)
MUST LIST
✓ TERMINADO
✓ HONESTIDAD
✓ ENLACES
✓ NO MIEDOS
➡ 100 %
➡ GITHUB, WEB…
lunes, 28 de enero de 13
![Page 19: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/19.jpg)
VENTAJAS
‣ VALORACIÓN
‣ DIFERENCIACIÓN
‣ APTITUDES
lunes, 28 de enero de 13
![Page 20: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/20.jpg)
VENTAJAS
‣ VALORACIÓN
‣ DIFERENCIACIÓN
‣ APTITUDES
lunes, 28 de enero de 13
![Page 21: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/21.jpg)
VENTAJAS
‣ VALORACIÓN
‣ DIFERENCIACIÓN
‣ APTITUDES
‣ DEMOSTRACIÓN DE...lunes, 28 de enero de 13
![Page 22: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/22.jpg)
AMORlunes, 28 de enero de 13
![Page 23: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/23.jpg)
EJEMPLOS
lunes, 28 de enero de 13
![Page 24: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/24.jpg)
EJEMPLOS
lunes, 28 de enero de 13
![Page 25: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/25.jpg)
EJEMPLOS
lunes, 28 de enero de 13
![Page 26: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/26.jpg)
EJEMPLOS
lunes, 28 de enero de 13
![Page 27: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/27.jpg)
IDEA
✓ SIMPLE
✓ CON UN FIN ESPECÍFICO
✓ SENTIDO
lunes, 28 de enero de 13
![Page 28: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/28.jpg)
EJECUCIÓN
✓ SENCILLA
✓ MEJORAS EN ITERACIONES
✓ NO PRE - OPTIMIZAR
lunes, 28 de enero de 13
![Page 29: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/29.jpg)
Minimun Viable Product
lunes, 28 de enero de 13
![Page 30: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/30.jpg)
NoComplicarseLaVida
lunes, 28 de enero de 13
![Page 31: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/31.jpg)
PROYECTO 1
✓ JUGAR CON BOTTLEPY
✓ DEPLOY EN VPS
lunes, 28 de enero de 13
![Page 32: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/32.jpg)
REQUISITOS I
✓ BOTTLEPY
✓ NGINX
✓ GUNICORN
✓ SUPERVISOR
lunes, 28 de enero de 13
![Page 33: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/33.jpg)
REQUISITOS II
✓ VPS
✓ DIGITAL OCEAN
✓ PROMO CODE: SSDBEAR20
✓ 20 $ ~ 3 MESES
lunes, 28 de enero de 13
![Page 34: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/34.jpg)
BOTTLEPY
✓ UN ARCHIVO
✓ LIBRERÍA ESTÁNDAR PYTHON
✓ ROUTING, TEMPLATES, FORMULARIOS, COOKIES…
✓ COMPATIBLE HTTP WSGIlunes, 28 de enero de 13
![Page 35: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/35.jpg)
BOTTLEPY
➡ PROYECTOS GRANDES
➡ ORM
➡ LAYOUT PROYECTO
CUIDADO CON:
lunes, 28 de enero de 13
![Page 36: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/36.jpg)
EJEMPLOimport bottle
app = bottle.default_app()
@app.route('/', method='GET')@app.route('/greet/<name:re:[a-z]+>', method='GET')def greet(name='world'): res = {} res['status'] = 'OK' res['result'] = 'Hello %s' % name
return res
if __name__ == '__main__': bottle.run(app, host='localhost', port=5000, debug=True, reloader=True)
lunes, 28 de enero de 13
![Page 37: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/37.jpg)
EJEMPLO➡ PETICIÓN
http://127.0.0.1:5000/greet/antonio
➡ RESULTADO{
"status": "OK",
"result": "Hello antonio"
}
lunes, 28 de enero de 13
![Page 38: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/38.jpg)
FIBONACCI Iclass Fibonacci(object): def __init__(self, steps): self.a = 0 self.b = 1 self.index = 0 self.steps = steps
def calculate(self): if self.steps > 0: if self.steps == 1: yield self.a else: yield self.a yield self.b self.index = self.index + 2 while self.index < self.steps: self.a, self.b = self.b, self.a + self.b self.index = self.index + 1 yield self.b else: raise Exception('\'steps\' must be an integer >= 0')
lunes, 28 de enero de 13
![Page 39: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/39.jpg)
FIBONACCI [email protected]('/fibonacci', method='POST')def fibonacci(): res = {} steps = bottle.request.forms.steps
try: steps = int(steps) fib = Fibonacci(steps) seq = fib.calculate() res['status'] = 'OK' res['result']={} res['result']['sequence'] = [n for n in seq]
except Exception as e: res['status'] = 'Error' res['message'] = '%s' % e
return res
lunes, 28 de enero de 13
![Page 40: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/40.jpg)
EJEMPLO➡ PETICIÓN
➡ RESULTADO{ "status": "OK", "result": { "sequence": [0, 1, 1, 2, 3] }}
POST http://127.0.0.1:5000/fibonacci
steps = 5
lunes, 28 de enero de 13
![Page 41: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/41.jpg)
NGINX
upstream app_server { server 127.0.0.1:8001 fail_timeout=0;}
server { server_name 127.0.0.1; listen 127.0.0.1:80;
root /home/username/projects/project1;
location / { try_files $uri @proxy_to_app; } location @proxy_to_app{ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off;
proxy_pass http://app_server; }}
sudo nano /etc/nginx/sites-available/project1
lunes, 28 de enero de 13
![Page 42: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/42.jpg)
SUPERVISOR
[program:project1]command= /home/username/projects/project1/venv/bin/gunicorn -c /home/username/projects/project1/gunicorn.prod.conf project1:appdirectory=/home/username/projects/project1autostart=trueautorestart=trueredirect_stderr=true
sudo nano /etc/supervisor/conf.d/project1.conf
lunes, 28 de enero de 13
![Page 43: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/43.jpg)
LOCALHOST1. GIT CLONE HTTPS://GITHUB.COM/AHMONTERO/SIDE-PROJECTS-SPEECH.GIT
2. CD SIDE-PROJECTS-SPEECH
3. CHMOD +X SETUP_ENV.SH
4. ./SETUP_ENV.SH
5. SOURCE __VEN__/BIN/ACTIVATE
6. PIP INSTALL -R REQUIREMENTS.TXT
7. PYTHON PROJECT1.PY
8. HTTP://127.0.0.1:5000/GREET/ANTONIO
lunes, 28 de enero de 13
![Page 44: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/44.jpg)
PROYECTO 1I
✓ WEB SCRAPING
✓ API HTTP REST
✓ DJANGO + TWITTER
✓ BOOTSTRAP
lunes, 28 de enero de 13
![Page 45: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/45.jpg)
BRAINSTORMING
✓ OFERTAS DE TRABAJO
✓ EMPRESAS JÓVENES E
INNOVADORAS
✓ RISAS
lunes, 28 de enero de 13
![Page 46: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/46.jpg)
ESPECIFICACIONES
✓ PARSEAR OFERTAS
✓ CLASIFICARLAS
✓ LOGIN CON TWITTER
✓ COMENTARIOS
lunes, 28 de enero de 13
![Page 47: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/47.jpg)
REQUISITOS
✓ BEAUTIFUL SOUP
✓ DJANGO
✓ NGINX
✓ GUNICORN
✓ SUPERVISORlunes, 28 de enero de 13
![Page 48: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/48.jpg)
DATA SCRAPING
✓ BEAUTIFUL SOUP
✓ SCRIPT INDEPENDIENTE
✓ USA API HTTP
lunes, 28 de enero de 13
![Page 49: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/49.jpg)
API HTTP REST I
✓ DJANGO-TASTYPIE
✓ DOCUMENTACIÓN
✓ AUTENTICACIÓN
✓ EXTENSIBLE (NOSQL…)
lunes, 28 de enero de 13
![Page 50: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/50.jpg)
API HTTP REST II
✓ AUTENTICACIÓN
✓ API_USER
✓ API_KEY
✓ SIN COMPLICACIONES
lunes, 28 de enero de 13
![Page 51: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/51.jpg)
DISEÑO
lunes, 28 de enero de 13
![Page 52: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/52.jpg)
DISEÑO
✓ NO SOY DISEÑADOR
lunes, 28 de enero de 13
![Page 53: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/53.jpg)
DISEÑO
✓ NO SOY DISEÑADOR
✓ FÁCIL…
lunes, 28 de enero de 13
![Page 54: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/54.jpg)
DISEÑO
✓ NO SOY DISEÑADOR
✓ FÁCIL…
✓ COPIO DISEÑO WEB DE
BOOTSTRAP
lunes, 28 de enero de 13
![Page 55: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/55.jpg)
lunes, 28 de enero de 13
![Page 56: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/56.jpg)
LAYOUT PROYECTO
lunes, 28 de enero de 13
![Page 57: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/57.jpg)
LAYOUT PROYECTO
lunes, 28 de enero de 13
![Page 58: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/58.jpg)
LAYOUT PROYECTO
Requirements separados
lunes, 28 de enero de 13
![Page 59: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/59.jpg)
LAYOUT PROYECTO
Archivos deployRequirements separados
lunes, 28 de enero de 13
![Page 60: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/60.jpg)
LAYOUT PROYECTO
Archivos deploy
Aplicaciones
Requirements separados
lunes, 28 de enero de 13
![Page 61: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/61.jpg)
LAYOUT PROYECTO
Archivos deploy
Aplicaciones
Requirements separados
Algunos PaaS lo necesitan
lunes, 28 de enero de 13
![Page 62: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/62.jpg)
LAYOUT PROYECTO
Archivos deploy
Parser ofertas
Aplicaciones
Requirements separados
Algunos PaaS lo necesitan
lunes, 28 de enero de 13
![Page 63: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/63.jpg)
REQUIREMENTS
beautifulsoup4djangodjango-tastypiedjango-twittergunicornhoncholxmlpsycopg2recaptcha-client
/requirements/_base.txt
lunes, 28 de enero de 13
![Page 64: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/64.jpg)
REQUIREMENTS
-r _base.txtdjango-debug-toolbar==0.9.4
/requirements/local.txt
-r _base.txt
/requirements/production.txt
lunes, 28 de enero de 13
![Page 65: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/65.jpg)
SETTINGS
DJANGO_APPS = ( # Default Django apps: 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.webdesign',)
THIRD_PARTY_APPS = ( # Wsgi http server 'gunicorn', # Api 'tastypie',)
# Apps specific for this project go here.LOCAL_APPS = ( 'web', 'api', 'twitter',)
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
/angryjobs/settings/base.py
lunes, 28 de enero de 13
![Page 66: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/66.jpg)
SETTINGS
DJANGO_APPS = ( # Default Django apps: 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.webdesign',)
THIRD_PARTY_APPS = ( # Wsgi http server 'gunicorn', # Api 'tastypie',)
# Apps specific for this project go here.LOCAL_APPS = ( 'web', 'api', 'twitter',)
INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS
/angryjobs/settings/base.py
lunes, 28 de enero de 13
![Page 67: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/67.jpg)
SETTINGS
from os.path import join, normpathfrom os import environfrom base import *
API_USER = environ.get('TE_API_USER', '')API_KEY = environ.get('TE_API_KEY', '')
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': normpath(join(DJANGO_ROOT, 'angryjobs.db')), 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', }}
/angryjobs/settings/local.py
lunes, 28 de enero de 13
![Page 68: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/68.jpg)
EJECUCIÓN
✓ NO USAR MANAGE.PY
django-admin.py syncdb --pythonpath='angryjobs' --settings=angryjobs.settings.local
django-admin.py runserver --pythonpath='angryjobs' --settings=angryjobs.settings.local
✓ USAR DJANGO-ADMIN.PY
lunes, 28 de enero de 13
![Page 69: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/69.jpg)
VENTAJAS
✓ CONTROL DE VERSIONES
✓ DATOS SENSIBLES A SALVO
✓ ENTORNOS IGUALES
lunes, 28 de enero de 13
![Page 70: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/70.jpg)
LOCALHOST1. GIT CLONE HTTPS://GITHUB.COM/AHMONTERO/ANGRYJOBS.GIT
2. CD ANGRYJOBS
3. CHMOD +X SETUP_ENV.SH
4. ./SETUP_ENV.SH
5. SOURCE __VEN__/BIN/ACTIVATE
6. PIP INSTALL -R REQUIREMENTS/LOCAL.TXT
7. DJANGO-ADMIN.PY SYNCDB --PYTHONPATH='ANGRYJOBS' --SETTINGS=ANGRYJOBS.SETTINGS.LOCAL
8. DJANGO-ADMIN.PY RUNSERVER --PYTHONPATH='ANGRYJOBS' --SETTINGS=ANGRYJOBS.SETTINGS.LOCAL
9. PYTHON UPDATER/FETCH_DATA.PY
10. HTTP://127.0.0.1:8000lunes, 28 de enero de 13
![Page 71: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/71.jpg)
NÚMEROS
✓ ~ 40 HORAS
✓ VERANO
✓ NINGÚN COMENTARIO
✓ POCOS RETWEETS
lunes, 28 de enero de 13
![Page 72: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/72.jpg)
NÚMEROS
✓ ~ 40 HORAS
✓ VERANO
✓ NINGÚN COMENTARIO
✓ POCOS RETWEETS
➡ NO SIESTA
lunes, 28 de enero de 13
![Page 73: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/73.jpg)
photo credit: http://www.flickr.com/photos/notemily/5590023825/
lunes, 28 de enero de 13
![Page 74: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/74.jpg)
EXPERIENCIA
✓ SETTINGS SEPARADOS
✓ BEAUTIFULSOAP
✓ ÚTIL EN 1 ENTREVISTA
✓ DIVERSIÓN
lunes, 28 de enero de 13
![Page 75: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/75.jpg)
photo credit: http://www.flickr.com/photos/pjlewis/65273119
lunes, 28 de enero de 13
![Page 76: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/76.jpg)
PROYECTO 1II
✓ DIGITAL OCEAN API
✓ NO PYTHON WRAPPER?
✓ IDEA!
lunes, 28 de enero de 13
![Page 77: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/77.jpg)
ESPECIFICACIONES
✓ WRAPPER API HTTP
✓ MÉTODOS DEFINIDOS WEB
✓ DOCUMENTACIÓN
lunes, 28 de enero de 13
![Page 78: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/78.jpg)
REQUISITOS I
✓ PYTHON
✓ REQUESTS
lunes, 28 de enero de 13
![Page 79: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/79.jpg)
EXPERIENCIA
✓ REQUESTS MOLA
✓ ~ 20$ CRÉDITO
✓ NOMBRADO EN BLOG
✓ PEGATINAS!!
lunes, 28 de enero de 13
![Page 80: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/80.jpg)
lunes, 28 de enero de 13
![Page 81: Python side projects etssi-jan-2013](https://reader031.vdocument.in/reader031/viewer/2022022200/58a5d9cb1a28abd14d8b4d1b/html5/thumbnails/81.jpg)
FINlunes, 28 de enero de 13