SlideShare a Scribd company logo
Django & Buildout
                                           Horst Gutmann
                                        zerok@zerokspot.com




http://creativecommons.org/licenses/by-nc-sa/3.0/at/   Photo: http://flickr.com/photos/yakobusan/2363688612/
Django
• Web Framework in Python
• MVC
• ... has tons of great features that are
  actually not really relevant for the topic at
  hand
• Summary: <3
                       2
Django and its libs
• What do we usually need ...
 • Django
 • django-tagging
 • django-threadedcomments
 • (if things like DB-bindings are already
    installed)

                      3
All of that you have to
      install on ...
•   ... your own machine
•   ... your server

•   ... and basically every other machine that has
    anything to do with the development




                        4
Installing from & with ...

•   Straight from an SCM-checkout

    •   Sadly that’s still very common since the apps
        are still quite young

•   Using a setup.py

•   Using setuptools and easy_install (PyPI <3)



                           5
Being root helps

• You have to either install these libraries as
  root user
• ... or you have to start messing around with
  the PYTHONPATH
  • ... which normally results in just a big
    mess


                       6
virtualenv

      • virtualenv lets you                       $ virtualenv myenv
          install Python packages
          without being root                      $ source myenv/bin/activate


      • It lets you build
                                                  $ cd /some/lib

                                                  $ python setup.py install
          environments for those
                                                  ....
          packages that you load
          at will                                 $ deactivate




Photo: http://flickr.com/photos/fensterbme/145621388/
                                           7
virtualenv
•   ... is a great tool if you want to try a new
    library

•   But it doesn’t solve the problem that you have
    to manually reconstruct the environment
    every time.

•   The environments are not portable (C-
    extensions?)

•   ... and not moveable (experimental right now)

                          8
zc.buildout
         •   Buildout now lets you build a whole
             environment with just one config-file

         •   Basically, it’s similar to Maven in the Java-world,
             just without XML ;-)

         •   A project consists of multiple parts

         •   Each part defines, where its data is coming from
             and where to store it


Photo: http://flickr.com/photos/mdpettitt/2521514631/
                                           9
Recipes exist ...
• ... that download eggs and build a wrapped
  interpreter to test them
• ... that download a source-distribution and
  install it
• ... that checkout code from Subversion
• ... and much much more
                      10
A small example
                                   $ buildout
>>> buildout.cfg                       PyPI           Canonical




[buildout]
parts = sample

[sample]
recipe = zc.recipe.eggs
interpreter = myinterpreter
eggs =
    storm==0.12
                                   $./bin/myinterpreter
                                   > from storm.locals import *



                              11
Buildout for Django

•   What is in for Django developers?

    •   A simple way to install dependencies

    •   ... and to freeze them at a version

    •   ... and naturally really fast deployment (even
        with a WSGI-script)



                           12
djangorecipe
• Recipe for Django projects by Jeroen
  Vloothuis:
  http://pypi.python.org/pypi/djangorecipe/
• Creates a Django project with a   given
  version
• ... and creates a wrapper for manage.py
  with all eggs and other dependencies
  loaded

                     13
Another example
[buildout]
parts = django svnapps

[django]
recipe = djangorecipe
version = 1.0
project = mysite
settings = settings
extra-paths =
    ${svnapps:location}/tagging

[svnapps]
recipe = iw.recipe.subversion
urls =
    http://django-tagging.googlecode.com/svn/trunk/ tagging



                            14
./bin/django
import sys
sys.path[0:0] = [
  '$HOME/.buildout/eggs/djangorecipe-0.12.1-py2.6.egg',
  '$HOME/.buildout/eggs/zc.recipe.egg-1.1.0-py2.6.egg',
  '$HOME/.buildout/eggs/zc.buildout-1.1.1-py2.6.egg',
  '$HOME/.buildout/eggs/setuptools-0.6c9-py2.6.egg',
  '$HOME/tmp/buildout2/parts/django',
  '$HOME/tmp/buildout2',
  '$HOME/tmp/buildout2/parts/svnapps/tagging',
  ]

import djangorecipe.manage
if __name__ == '__main__':
   djangorecipe.manage.main('mysite.settings')



                           15
mod_wsgi?

• djangorecipe can also be used to create a
  WSGI-script
  • Option: wsgi = true
  • ./bin/django.wsgi
• Naturally also includes all the dependencies

                     16
Summary
•   Buildout provides easy dependency management
    from a multitude of sources (public or not and not
    only with setuptools)

•   Dependencies AND freezing of them

•   For developing on a Django project all you need is
    one buildout.cfg

•   djangorecipe also provides you with a WSGI-script

•   Migrating to it is very easy :-)

                            17
Some links

• http://www.djangoproject.com
• http://pypi.python.org/pypi/zc.buildout/
• http://pypi.python.org/pypi/djangorecipe/
• Icons: http://graffletopia.com/stencils/144
• Pony: http://djangopony.com
                      18

More Related Content

What's hot

An intro to the JAMStack and Eleventy
An intro to the JAMStack and EleventyAn intro to the JAMStack and Eleventy
An intro to the JAMStack and Eleventy
Luciano Mammino
 
Grunt: the wild boar dev's best friend - WordCamp London 2018
Grunt: the wild boar dev's best friend - WordCamp London 2018Grunt: the wild boar dev's best friend - WordCamp London 2018
Grunt: the wild boar dev's best friend - WordCamp London 2018
Marco Chiesi
 
Grooscript gr8conf 2015
Grooscript gr8conf 2015Grooscript gr8conf 2015
Grooscript gr8conf 2015
Jorge Franco Leza
 
Grooscript greach
Grooscript greachGrooscript greach
Grooscript greach
Jorge Franco Leza
 
Node js实践
Node js实践Node js实践
Node js实践
jay li
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as code
Julian Simpson
 
Terminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interfaceTerminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interface
Jon Peck
 
Plone and docker
Plone and dockerPlone and docker
Plone and docker
Alin Voinea
 
Grooscript and Grails 3
Grooscript and Grails 3Grooscript and Grails 3
Grooscript and Grails 3
Jorge Franco Leza
 
CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)
Soshi Nemoto
 
Webinar - Setup MySQL with Puppet
Webinar - Setup MySQL with PuppetWebinar - Setup MySQL with Puppet
Webinar - Setup MySQL with Puppet
OlinData
 
Front-end tools
Front-end toolsFront-end tools
Front-end tools
Gleb Vinnikov
 
Grunt All Day
Grunt All DayGrunt All Day
Grunt All Day
douglasknudsen
 
Docker Demo @ IuK Seminar
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK Seminar
Martin Scharm
 
Sage 2 19_v5_busby
Sage 2 19_v5_busbySage 2 19_v5_busby
Sage 2 19_v5_busby
Ben Busby
 
Continuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScriptContinuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScript
Lars Thorup
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hype
bridgetkromhout
 
Native Containers on Windows 10 using Docker – a game changer for developers
Native Containers on Windows 10 using Docker – a game changer for developersNative Containers on Windows 10 using Docker – a game changer for developers
Native Containers on Windows 10 using Docker – a game changer for developers
Jorge Arteiro
 
Zenoss: Buildout
Zenoss: BuildoutZenoss: Buildout
Zenoss: Buildout
Jeffrey Clark
 
Magento 2 Capistrano Deploy
Magento 2 Capistrano DeployMagento 2 Capistrano Deploy
Magento 2 Capistrano Deploy
Duke Dao
 

What's hot (20)

An intro to the JAMStack and Eleventy
An intro to the JAMStack and EleventyAn intro to the JAMStack and Eleventy
An intro to the JAMStack and Eleventy
 
Grunt: the wild boar dev's best friend - WordCamp London 2018
Grunt: the wild boar dev's best friend - WordCamp London 2018Grunt: the wild boar dev's best friend - WordCamp London 2018
Grunt: the wild boar dev's best friend - WordCamp London 2018
 
Grooscript gr8conf 2015
Grooscript gr8conf 2015Grooscript gr8conf 2015
Grooscript gr8conf 2015
 
Grooscript greach
Grooscript greachGrooscript greach
Grooscript greach
 
Node js实践
Node js实践Node js实践
Node js实践
 
Adventures in infrastructure as code
Adventures in infrastructure as codeAdventures in infrastructure as code
Adventures in infrastructure as code
 
Terminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interfaceTerminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interface
 
Plone and docker
Plone and dockerPlone and docker
Plone and docker
 
Grooscript and Grails 3
Grooscript and Grails 3Grooscript and Grails 3
Grooscript and Grails 3
 
CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)CI : the first_step: Auto Testing with CircleCI - (MOSG)
CI : the first_step: Auto Testing with CircleCI - (MOSG)
 
Webinar - Setup MySQL with Puppet
Webinar - Setup MySQL with PuppetWebinar - Setup MySQL with Puppet
Webinar - Setup MySQL with Puppet
 
Front-end tools
Front-end toolsFront-end tools
Front-end tools
 
Grunt All Day
Grunt All DayGrunt All Day
Grunt All Day
 
Docker Demo @ IuK Seminar
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK Seminar
 
Sage 2 19_v5_busby
Sage 2 19_v5_busbySage 2 19_v5_busby
Sage 2 19_v5_busby
 
Continuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScriptContinuous Integration for front-end JavaScript
Continuous Integration for front-end JavaScript
 
Docker in Production: Reality, Not Hype
Docker in Production: Reality, Not HypeDocker in Production: Reality, Not Hype
Docker in Production: Reality, Not Hype
 
Native Containers on Windows 10 using Docker – a game changer for developers
Native Containers on Windows 10 using Docker – a game changer for developersNative Containers on Windows 10 using Docker – a game changer for developers
Native Containers on Windows 10 using Docker – a game changer for developers
 
Zenoss: Buildout
Zenoss: BuildoutZenoss: Buildout
Zenoss: Buildout
 
Magento 2 Capistrano Deploy
Magento 2 Capistrano DeployMagento 2 Capistrano Deploy
Magento 2 Capistrano Deploy
 

Similar to Django & Buildout (en)

Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platform
Jean-Michel Bouffard
 
Jython on Django
Jython on DjangoJython on Django
Jython on Django
fwierzbicki
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
Kris Buytaert
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
MarcinStachniuk
 
Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or Gal
Chad Woolley
 
Marek Kuziel - Deploying Django with Buildout
Marek Kuziel - Deploying Django with BuildoutMarek Kuziel - Deploying Django with Buildout
Marek Kuziel - Deploying Django with Buildout
marekkuziel
 
Continuous Integration Step-by-step
Continuous Integration Step-by-stepContinuous Integration Step-by-step
Continuous Integration Step-by-step
Michelangelo van Dam
 
Django Deployment with Fabric
Django Deployment with FabricDjango Deployment with Fabric
Django Deployment with Fabric
Jonas Nockert
 
Virtualenv
VirtualenvVirtualenv
Virtualenv
WEBdeBS
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
Roger Barnes
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructure
Sergiy Kukunin
 
Django district pip, virtualenv, virtualenv wrapper & more
Django district  pip, virtualenv, virtualenv wrapper & moreDjango district  pip, virtualenv, virtualenv wrapper & more
Django district pip, virtualenv, virtualenv wrapper & more
Jacqueline Kazil
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
Robert Lujo
 
Ultimate Survival - React-Native edition
Ultimate Survival - React-Native editionUltimate Survival - React-Native edition
Ultimate Survival - React-Native edition
Richard Radics
 
JavaFX JumpStart @JavaOne 2016
JavaFX JumpStart @JavaOne 2016JavaFX JumpStart @JavaOne 2016
JavaFX JumpStart @JavaOne 2016
Hendrik Ebbers
 
Vagrant and puppet: Deployment made easy
Vagrant and puppet: Deployment made easyVagrant and puppet: Deployment made easy
Vagrant and puppet: Deployment made easy
Geronimo Orozco
 
“warpdrive”, making Python web application deployment magically easy.
“warpdrive”, making Python web application deployment magically easy.“warpdrive”, making Python web application deployment magically easy.
“warpdrive”, making Python web application deployment magically easy.
Graham Dumpleton
 
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみた
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみたネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみた
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみた
furusin
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenv
Markus Zapke-Gründemann
 

Similar to Django & Buildout (en) (20)

Getting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platformGetting started with open mobile development on the Openmoko platform
Getting started with open mobile development on the Openmoko platform
 
Jython on Django
Jython on DjangoJython on Django
Jython on Django
 
How I hack on puppet modules
How I hack on puppet modulesHow I hack on puppet modules
How I hack on puppet modules
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
 
Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or Gal
 
Marek Kuziel - Deploying Django with Buildout
Marek Kuziel - Deploying Django with BuildoutMarek Kuziel - Deploying Django with Buildout
Marek Kuziel - Deploying Django with Buildout
 
Continuous Integration Step-by-step
Continuous Integration Step-by-stepContinuous Integration Step-by-step
Continuous Integration Step-by-step
 
Django Deployment with Fabric
Django Deployment with FabricDjango Deployment with Fabric
Django Deployment with Fabric
 
Virtualenv
VirtualenvVirtualenv
Virtualenv
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructure
 
Django district pip, virtualenv, virtualenv wrapper & more
Django district  pip, virtualenv, virtualenv wrapper & moreDjango district  pip, virtualenv, virtualenv wrapper & more
Django district pip, virtualenv, virtualenv wrapper & more
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
Ultimate Survival - React-Native edition
Ultimate Survival - React-Native editionUltimate Survival - React-Native edition
Ultimate Survival - React-Native edition
 
JavaFX JumpStart @JavaOne 2016
JavaFX JumpStart @JavaOne 2016JavaFX JumpStart @JavaOne 2016
JavaFX JumpStart @JavaOne 2016
 
Vagrant and puppet: Deployment made easy
Vagrant and puppet: Deployment made easyVagrant and puppet: Deployment made easy
Vagrant and puppet: Deployment made easy
 
“warpdrive”, making Python web application deployment magically easy.
“warpdrive”, making Python web application deployment magically easy.“warpdrive”, making Python web application deployment magically easy.
“warpdrive”, making Python web application deployment magically easy.
 
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみた
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみたネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみた
ネイティブAndroidエンジニアがVueNativeでiOSアプリを作ってみた
 
Arbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenvArbeiten mit distribute, pip und virtualenv
Arbeiten mit distribute, pip und virtualenv
 

Recently uploaded

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
Techgropse Pvt.Ltd.
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 

Recently uploaded (20)

Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdfAI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
AI-Powered Food Delivery Transforming App Development in Saudi Arabia.pdf
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 

Django & Buildout (en)

  • 1. Django & Buildout Horst Gutmann zerok@zerokspot.com http://creativecommons.org/licenses/by-nc-sa/3.0/at/ Photo: http://flickr.com/photos/yakobusan/2363688612/
  • 2. Django • Web Framework in Python • MVC • ... has tons of great features that are actually not really relevant for the topic at hand • Summary: <3 2
  • 3. Django and its libs • What do we usually need ... • Django • django-tagging • django-threadedcomments • (if things like DB-bindings are already installed) 3
  • 4. All of that you have to install on ... • ... your own machine • ... your server • ... and basically every other machine that has anything to do with the development 4
  • 5. Installing from & with ... • Straight from an SCM-checkout • Sadly that’s still very common since the apps are still quite young • Using a setup.py • Using setuptools and easy_install (PyPI <3) 5
  • 6. Being root helps • You have to either install these libraries as root user • ... or you have to start messing around with the PYTHONPATH • ... which normally results in just a big mess 6
  • 7. virtualenv • virtualenv lets you $ virtualenv myenv install Python packages without being root $ source myenv/bin/activate • It lets you build $ cd /some/lib $ python setup.py install environments for those .... packages that you load at will $ deactivate Photo: http://flickr.com/photos/fensterbme/145621388/ 7
  • 8. virtualenv • ... is a great tool if you want to try a new library • But it doesn’t solve the problem that you have to manually reconstruct the environment every time. • The environments are not portable (C- extensions?) • ... and not moveable (experimental right now) 8
  • 9. zc.buildout • Buildout now lets you build a whole environment with just one config-file • Basically, it’s similar to Maven in the Java-world, just without XML ;-) • A project consists of multiple parts • Each part defines, where its data is coming from and where to store it Photo: http://flickr.com/photos/mdpettitt/2521514631/ 9
  • 10. Recipes exist ... • ... that download eggs and build a wrapped interpreter to test them • ... that download a source-distribution and install it • ... that checkout code from Subversion • ... and much much more 10
  • 11. A small example $ buildout >>> buildout.cfg PyPI Canonical [buildout] parts = sample [sample] recipe = zc.recipe.eggs interpreter = myinterpreter eggs = storm==0.12 $./bin/myinterpreter > from storm.locals import * 11
  • 12. Buildout for Django • What is in for Django developers? • A simple way to install dependencies • ... and to freeze them at a version • ... and naturally really fast deployment (even with a WSGI-script) 12
  • 13. djangorecipe • Recipe for Django projects by Jeroen Vloothuis: http://pypi.python.org/pypi/djangorecipe/ • Creates a Django project with a given version • ... and creates a wrapper for manage.py with all eggs and other dependencies loaded 13
  • 14. Another example [buildout] parts = django svnapps [django] recipe = djangorecipe version = 1.0 project = mysite settings = settings extra-paths = ${svnapps:location}/tagging [svnapps] recipe = iw.recipe.subversion urls = http://django-tagging.googlecode.com/svn/trunk/ tagging 14
  • 15. ./bin/django import sys sys.path[0:0] = [ '$HOME/.buildout/eggs/djangorecipe-0.12.1-py2.6.egg', '$HOME/.buildout/eggs/zc.recipe.egg-1.1.0-py2.6.egg', '$HOME/.buildout/eggs/zc.buildout-1.1.1-py2.6.egg', '$HOME/.buildout/eggs/setuptools-0.6c9-py2.6.egg', '$HOME/tmp/buildout2/parts/django', '$HOME/tmp/buildout2', '$HOME/tmp/buildout2/parts/svnapps/tagging', ] import djangorecipe.manage if __name__ == '__main__': djangorecipe.manage.main('mysite.settings') 15
  • 16. mod_wsgi? • djangorecipe can also be used to create a WSGI-script • Option: wsgi = true • ./bin/django.wsgi • Naturally also includes all the dependencies 16
  • 17. Summary • Buildout provides easy dependency management from a multitude of sources (public or not and not only with setuptools) • Dependencies AND freezing of them • For developing on a Django project all you need is one buildout.cfg • djangorecipe also provides you with a WSGI-script • Migrating to it is very easy :-) 17
  • 18. Some links • http://www.djangoproject.com • http://pypi.python.org/pypi/zc.buildout/ • http://pypi.python.org/pypi/djangorecipe/ • Icons: http://graffletopia.com/stencils/144 • Pony: http://djangopony.com 18