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
Packager son projet Django
Search
Bruno Renié
April 14, 2012
Programming
620
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Packager son projet Django
Bruno Renié
April 14, 2012
Transcript
24 slides
Bruno Renié Djangocong 2012 Packager son projet Django
distribuer / déployer du code
git
dépendances rollback traçabilité
PaaS
contraintes géographiques architecturales culturelles
packaging
installer son application comme une simple bibliothèque* * configuration laissée
au soin de l'utilisateur
simplicité traçabilité reproductibilité
OS Application deb / RPM setup.py
None
django nettoyez-moi tout ça
arrêter d'altérer sys.path project/ __init__.py urls.py app1/ __init__.py models.py app2/
from project.app1.views import stuff
Application réutilisable : package séparé from project.app.models import Stuff from
registration.models import RegistrationProfile Application non réutilisable : embarquée
requirements : versions explicites Django==1.4 PIL==1.1.6 pas de liens git
setup.py from distutils.core import setup from setuptools import find_packages with
open('requirements.txt') as reqs: install_requires = reqs.read().split('\n') setup( name='project', version=__import__('project').__version__, packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=install_requires, )
MANIFEST.in pour tout ce qui est non-python include requirements.txt recursive‐include
project * recursive‐exclude project *.pyc recursive‐exclude project *.scss exclude project/settings.py
settings project/default_settings.py Packagé : Déployé : settings.py from project.default_settings import
* DATABASES = { … }
layout final requirements.txt setup.py MANIFEST.in project/ __init__.py default_settings.py settings.py app1/
app2/
Déploiement
env/ public/ static/ settings.py wsgi.py ./env/bin/gunicorn wsgi:application utiliser add2virtualenv pour
rendre wsgi et settings importables sans toucher PYTHONPATH
pip et paquets privés --find-links : file:///path/to/packages --index-url : structure
de type http://pypi.python.org/simple/ bien héberger tous ses paquets pypi tombe, les versions disparaissent
Workflow final Déployer (incrément n° de version) python setup.py sdist
(upload) pip install ‐U project ‐‐find‐links … Rollback pip install project==X.Y.Z ‐‐find‐links …
https://github.com/brutasse/fab-bundle @brutasse
[email protected]
More Decks by Bruno Renié
See All by Bruno Renié
Visibility for web developers
brutasse
3
490
Decentralization & real-time with PubSubHubbub
brutasse
1
210
Deployability of Python Web Applications
brutasse
17
2.4k
Stop writing settings files
brutasse
21
2.7k
Class-based Views: patterns and anti-patterns
brutasse
9
1.7k
Staticfiles : tout ce qu'il faut savoir, rien que ce qu'il faut savoir
brutasse
4
610
Introduction to Django
brutasse
3
480
Other Decks in Programming
See All in Programming
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
360
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
130
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
540
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
430
[DroidKnights 2026] Workflow AX 적용기 — 자동 정책 정리부터 E2E까지
dayeon
0
120
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
240
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
220
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
960
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
210
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
440
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
3
320
LLM 101
dalinaum
0
520
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Abbi's Birthday
coloredviolet
5
11k
GraphQLとの向き合い方2022年版
quramy
50
15k
Code Review Best Practice
trishagee
74
20k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
990
How Software Deployment tools have changed in the past 20 years
geshan
3
35k
A Soul's Torment
seathinner
9
3.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
We Are The Robots
honzajavorek
0
460
Test your architecture with Archunit
thirion
2
2.5k