distribute und pip als Ersatz für setuptools und easy_install bieten im Zusammenspiel mit virtualenv viele neue Möglichkeiten bei der Entwicklung und dem Deployment von Python-Applikationen. In diesem Vortrag stelle ich alle Werkzeuge kurz vor und zeige, wie man sie zusammen einsetzen kann.
T3CON12 Flow and TYPO3 deployment with surfTobias Liebig
Video: http://t3con12.chaoscdn.de/T3CON12DE.Int.Automate.FLOW3.and.TYPO3.Deployment.with.Surf.mp4
TYPO3.Surf on Forge: http://forge.typo3.org/projects/show/package-typo3-surf
EXT:coreapi on Forge: http://forge.typo3.org/projects/show/extension-coreapi
Buildout: creating and deploying repeatable applications in pythonCodeSyntax
We use buildout to deploy and create our python applications based on Plone or django.
This presentation explains the source of our work, the past and how and why we use buildout.
This presentation was used at PySS 14 conference in Donostia - San Sebastian
distribute und pip als Ersatz für setuptools und easy_install bieten im Zusammenspiel mit virtualenv viele neue Möglichkeiten bei der Entwicklung und dem Deployment von Python-Applikationen. In diesem Vortrag stelle ich alle Werkzeuge kurz vor und zeige, wie man sie zusammen einsetzen kann.
T3CON12 Flow and TYPO3 deployment with surfTobias Liebig
Video: http://t3con12.chaoscdn.de/T3CON12DE.Int.Automate.FLOW3.and.TYPO3.Deployment.with.Surf.mp4
TYPO3.Surf on Forge: http://forge.typo3.org/projects/show/package-typo3-surf
EXT:coreapi on Forge: http://forge.typo3.org/projects/show/extension-coreapi
Buildout: creating and deploying repeatable applications in pythonCodeSyntax
We use buildout to deploy and create our python applications based on Plone or django.
This presentation explains the source of our work, the past and how and why we use buildout.
This presentation was used at PySS 14 conference in Donostia - San Sebastian
Puppet can be used effectively and at scale without running as root. In many organizations, particularly large ones, different teams are responsible for different pieces of the infrastructure. In my case, I am on a team responsible for installation, configuration, upkeep, and monitoring of an application, but we are denied root access. Despite this, we have a rich puppet infrastructure thats saves us time and reduces configuration drift. I will present our model for success in this kind of limited environment, including recipes for using puppet as non root and some encouraging words and ideas for those who want to implement puppet, but the rest of their organization isn't ready yet.
Spencer Krum
Systems Admin, UTI Worldwide
Spencer is a Linux and application administrator with UTI Worldwide, a shipping and logistics firm. He lives and works in Portland. He has been using Linux and Puppet for years. Spencer is co-authoring (with William Van Hevelingen and Ben Kero) the second edition of Pro Puppet by James Turnbull and Jeff McCune, which should be available from Apress in alpha/beta E-Book in time for Puppet Conf '13. He enjoys hacking, tennis, StarCraft, and Hawaiian food.
Slides from my DockerCon EU 2017 Talk.
Find the abstract below:
"In this talk, we'll discover how Docker comes to the rescue of the Ops Team, while rebuilding from scratch our monitoring infrastructure. We'll start by quickly describing the challenges, to focus on why and how using docker saved the project. From fixing dependencies and isolation issues, implementing rolling upgrades and new features hot addition, to building a completely modular, scalable and resilient infrastructure, we'll talk about why CI/CD workflows, docker tooling and Docker Swarm were the key to success."
The perl on most linux distros is a mess. Docker makes it easier to build and packge a local perl and applications. Problem is that Docker's manuals produce a mess of their own.
Distributing perl on top of Gentoo's stage3 distro, busybox, or nothing at all made good alternatives. This talk includes basics of setting up docker, building a local perl for it, and packaging perl or applications into images for use in containers.
DevOps Series: Extending vagrant with Puppet for configuration managementFelipe
This is a short presentation on the reasons why you would augment your Vagrant installation with a full-fledged provisioner like Puppet and some examples of basic things you can do with it.
IPython is an interactive Python shell, it provides tools for interactive and parallel computing that are widely used in the scientific world. It can also benefit any other Python developer.
Streamline your development environment with dockerGiacomo Bagnoli
These days applications are getting more and more complex. It's becoming quite
difficult to keep track of all the different components an application needs in order to
function (a database, a message queueing system, a web server, a document
store, a search engine, you name it.). How many times we heard 'it worked on my
machine'?. In this talk we are going to explore Docker, what it is, how it works
and how much it can benefit in keeping the development environment consistent.
We are going to talk about Dockerfiles, best practices, tools like fig and vagrant,
and finally show an example of how it applies to a ruby on rails
application.
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGIMax Tepkeev
During the last 7 years the company I am working for developed more than 800 projects in PHP and Python. All this time we were using Apache+nginx for hosting this projects. In this talk I will explain why we decided to switch all our projects from Apache+nginx to uWSGI+nginx and how we did that.
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...Sebastian Neubauer
It is a little known fact, that docker was presented the first time to the world in a demo by Solomon Hykes at the PyCon US in Santa Clara in 2013. Furthermore, docker-compose (formerly known as Fig) is entirely written in python. This may lead to the impression, that docker and python is pure love and a match made in heaven. While for some use-cases this is true. But local development of python code inside a docker container is surprisingly broken, at least if you want to do it right. In this talk I will walk you through the proper setup of a local python development environment using docker. Including sane packaging, testing, automated setup in version control, IDE integration, docker-compose and more. I will share with you all the tiny surprises I encountered and you might have stumbled over yourself already too. As a spoiler, I will not be able to give nice solutions to all of them. But it might help you, to not feel stupid the next time you face one of them: Good news, probably it’s not you!
NOTE: SlideShare seems to have problems rendering some of my screenshots. Please visit
https://speakerdeck.com/uranusjr/we-buy-cheese-in-a-cheese-shop
for a correctly-displayed version.
ORIGINAL DESCRIPTION:
Python packaging is ______. But PyPA is trying to solve the problem. Let's take a look at how we got into this mess in the first place, and how did/will PyPA do to fix it.
Puppet can be used effectively and at scale without running as root. In many organizations, particularly large ones, different teams are responsible for different pieces of the infrastructure. In my case, I am on a team responsible for installation, configuration, upkeep, and monitoring of an application, but we are denied root access. Despite this, we have a rich puppet infrastructure thats saves us time and reduces configuration drift. I will present our model for success in this kind of limited environment, including recipes for using puppet as non root and some encouraging words and ideas for those who want to implement puppet, but the rest of their organization isn't ready yet.
Spencer Krum
Systems Admin, UTI Worldwide
Spencer is a Linux and application administrator with UTI Worldwide, a shipping and logistics firm. He lives and works in Portland. He has been using Linux and Puppet for years. Spencer is co-authoring (with William Van Hevelingen and Ben Kero) the second edition of Pro Puppet by James Turnbull and Jeff McCune, which should be available from Apress in alpha/beta E-Book in time for Puppet Conf '13. He enjoys hacking, tennis, StarCraft, and Hawaiian food.
Slides from my DockerCon EU 2017 Talk.
Find the abstract below:
"In this talk, we'll discover how Docker comes to the rescue of the Ops Team, while rebuilding from scratch our monitoring infrastructure. We'll start by quickly describing the challenges, to focus on why and how using docker saved the project. From fixing dependencies and isolation issues, implementing rolling upgrades and new features hot addition, to building a completely modular, scalable and resilient infrastructure, we'll talk about why CI/CD workflows, docker tooling and Docker Swarm were the key to success."
The perl on most linux distros is a mess. Docker makes it easier to build and packge a local perl and applications. Problem is that Docker's manuals produce a mess of their own.
Distributing perl on top of Gentoo's stage3 distro, busybox, or nothing at all made good alternatives. This talk includes basics of setting up docker, building a local perl for it, and packaging perl or applications into images for use in containers.
DevOps Series: Extending vagrant with Puppet for configuration managementFelipe
This is a short presentation on the reasons why you would augment your Vagrant installation with a full-fledged provisioner like Puppet and some examples of basic things you can do with it.
IPython is an interactive Python shell, it provides tools for interactive and parallel computing that are widely used in the scientific world. It can also benefit any other Python developer.
Streamline your development environment with dockerGiacomo Bagnoli
These days applications are getting more and more complex. It's becoming quite
difficult to keep track of all the different components an application needs in order to
function (a database, a message queueing system, a web server, a document
store, a search engine, you name it.). How many times we heard 'it worked on my
machine'?. In this talk we are going to explore Docker, what it is, how it works
and how much it can benefit in keeping the development environment consistent.
We are going to talk about Dockerfiles, best practices, tools like fig and vagrant,
and finally show an example of how it applies to a ruby on rails
application.
EuroPython 2014 - How we switched our 800+ projects from Apache to uWSGIMax Tepkeev
During the last 7 years the company I am working for developed more than 800 projects in PHP and Python. All this time we were using Apache+nginx for hosting this projects. In this talk I will explain why we decided to switch all our projects from Apache+nginx to uWSGI+nginx and how we did that.
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...Sebastian Neubauer
It is a little known fact, that docker was presented the first time to the world in a demo by Solomon Hykes at the PyCon US in Santa Clara in 2013. Furthermore, docker-compose (formerly known as Fig) is entirely written in python. This may lead to the impression, that docker and python is pure love and a match made in heaven. While for some use-cases this is true. But local development of python code inside a docker container is surprisingly broken, at least if you want to do it right. In this talk I will walk you through the proper setup of a local python development environment using docker. Including sane packaging, testing, automated setup in version control, IDE integration, docker-compose and more. I will share with you all the tiny surprises I encountered and you might have stumbled over yourself already too. As a spoiler, I will not be able to give nice solutions to all of them. But it might help you, to not feel stupid the next time you face one of them: Good news, probably it’s not you!
NOTE: SlideShare seems to have problems rendering some of my screenshots. Please visit
https://speakerdeck.com/uranusjr/we-buy-cheese-in-a-cheese-shop
for a correctly-displayed version.
ORIGINAL DESCRIPTION:
Python packaging is ______. But PyPA is trying to solve the problem. Let's take a look at how we got into this mess in the first place, and how did/will PyPA do to fix it.
This presentation covers how to perform the CRUD operation of database using Django Query-set API. The topics covered includes Creating new objects, Saving changes to existing objects, Retrieving objects from DB, Deleting objects & Complex lookups with Q objects.
jQuery is so easy to write and therefore so easy to write poor code also. As coders are we sure that what we write can easily be digested by the web page? Lets go and see how we can easily improve performance with same code with different approach.
Django ist ein in Python programmiertes Framework, dass die schnelle Entwicklung von Web-Applikationen ermöglicht. Dabei wird Wert auf sauberen Code und die Wiederverwendbarkeit von einzelnen Komponenten gelegt.
Christian Strappazzon - Presentazione Python Milano - Codemotion Milano 2017Codemotion
PyMI: siamo un gruppo di Sviluppatrici, Sviluppatori, Appassionati e Appassionate di Python a Milano. Ci incontriamo una volta al mese in Mikamai/LinkMe. Abbiamo degli eventi ricorrenti e molto apprezzati: "Pillole di Python" e "PyBirra". * Presentazione del gruppo * Python Blueprint: the language, the tools, the packages and the ecosystem.
distribute und pip als Ersatz für setuptools und easy_install bieten im Zusammenspiel mit virtualenv viele neue Möglichkeiten bei der Entwicklung und dem Deployment von Python-Applikationen. In diesem Vortrag stelle ich alle Werkzeuge kurz vor und zeige, wie man sie zusammen einsetzen kann.
This talk will try to cover the most important techniques and best practices used when creating Django web application.
Overview of the topics covered:
- development general principles and goals
- python/django project initial setup - project layout, git&venv&pip&shell, settings
- central project shell command - contains all commands to manage project
- "IDE" - editor & shell
- edit/run/test cycle
- deploy/test-remotely cycle
Disclaimer: techniques and practices presented are current AUTHOR'S optimal choice used for usual django project.
In this talk, we'll discover how Docker comes to the rescue of the Ops Team, while rebuilding from scratch our monitoring infrastructure. We'll start by quickly describing the challenges, to focus on why and how using docker saved the project. From fixing dependencies and isolation issues, implementing rolling upgrades and new features hot addition, to building a completely modular, scalable and resilient infrastructure, we'll talk about why CI/CD workflows, docker tooling and Docker Swarm were the key to success.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
2. Knowing where one's towel is
"Hey, you sass that hoopy Ford Prefect? There's a frood who really
knows where his towel is." (Sass: know, be aware of, meet, have sex
with; hoopy: really together guy; frood: really amazingly together
guy.)
3. Index
PIP virtual
env
r
r appe
l envw
v irtua
mabye...
and e
veryt
hing
:)
wers
ans
4. Prerequisites
It (maybe) works also
in other *nix and
with a little effort on
● Python :) Windows ;)
● linux ( unfortunately or fortunately :P )
● comfort with shell
● patience required
● internet connection ( not now, but we
work on the web, in the coils of the Python! )
5. What is PIP?
- pip installs packages. Python packages. -
pip is a tool for installing and
managing Python packages, such as
those found in the Python Package
Index (PyPI).
It’s a replacement for easy_install.
6. But... what is Easy Install?
Easy Install is a python module
(easy_install) bundled with
setuptools that lets you
automatically download, build, install,
and manage Python packages.
11. PIP configuration
- quickest look -
*nix $HOME/.pip/pip.conf [global]
timeout = 60
windows %HOME%pippip.ini [freeze]
timeout = 10
$ export PIP_DEFAULT_TIMEOUT=10 [install]
$ pip install django find-links =
http://mirror.com
Env. variables
override config file
Each command line options have a
PIP_<UPPER_NAME> environment variables
$ pip --default-timeout=60 install django
12. PyPI
- the Python Pakage Index -
PyPI is a repository of software for Python
and currently count 20481 packages.
The PyPI repository provides alternative locations that store the
packages.
[install]
use-mirrors = true
$ pip --use-mirrors ... mirrors =
$ export PIP_USE_MIRRORS=true http://d.pypi.python.org
http://b.pypi.python.org
You can create your own mirror, following the PEP 381 or using a tool
such as pep381client
13. Want to know more?
Read the docs!
( Luke! :D )
PIP
http://www.pip-installer.org/en/latest/index.html
14. WHY virtual environments?
● Isolation - Python packages and even version live
in their own 'planet' :)
● Permissions - No sudoers, the environment is
mine!!!
● Organization - each project can maintain its own
requirements file of Python packages.
● No-Globalization - don't require installing stuff
globally on the system.
15. PIP + virtualenv
● it's not recommended install packages
globally, but you can :)
● pip works fine with virtualenv!
● used in conjunction to isolate your
installation
Well... step forward: setup and play with
virtual environments!
16. What is virtualenv?
Is a tool to create isolated Python
environments.
Every virtualenv has pip installed in
it automatically (also easy_install)
under bin directory.
Does not require root access or
modify your system.
17. Installation
Using package manager, pip, the installer or using single file
(root)# apt-get install python-virtualenv
# or
(root)# pip install virtualenv
# or
$ curl -O
https://raw.github.com/pypa/virtualenv/master/virtualenv.py
18. Basic Usage
$ virtualenv ENV
This creates a folder ENV in the $PWD
You'll find python packages on ENV/lib/pythonX.X/site-packages
Interesting options!
$ virtualenv --no-site-packages --python=PYTHON_EXE ENV
Doesn't inherit global site-packages and use a different Python interpreter
19. Activate and Using ENV
$ cd ENV ; . bin/activate
(ENV) $ pip install django
Downloading/unpacking django
Downloading Django-1.4.tar.gz (7.6Mb): 5.2Mb downloaded
...
Also virtualenv has a config file
and its looks like pip.conf
20. Extending virtualenv
# django-day.py
import virtualenv, textwrap
output = virtualenv.create_bootstrap_script(textwrap.
dedent())"""
def after_install(options, home_dir):
subprocess.call([join(home_dir, 'bin', 'pip'),
'install',
'django'])
"""
f = open('django-bootstrap.py', 'w').write(output)
extend_parser(optparse_parser):
# add or remove option The script created is an
adjust_options(options, args):
# change options or args
extension to virtualenv
after_install(options, home_dir): and inherit all its options!
# after install run this
21.
22. virtualenvwrapper
by Doug Hellmann
is a set of extensions to Ian Bicking’s
virtualenv tool for creating isolated
Python development environments.
Features, taken verbatim from website:
● Organizes all of your virtual environments in one place.
● Wrappers for managing your virtual environments (create, delete, copy).
● Use a single command to switch between environments.
● Tab completion for commands that take a virtual environment as argument.
● User-configurable hooks for all operations.
● Plugin system for more creating sharable extensions. Your homework ;)
23. Installation
(root)# pip install virtualenvwrapper
$ cd ~
$ mkdir ~/.virtualenvs
Include environment vars needed into ~/.bashrc
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
export PIP_VIRTUALENV_BASE=$WORKON_HOME
export PIP_RESPECT_VIRTUALENV=true
A little tips: add to ~/.virtualenvs/postactivate
export PYTHONPATH=$PYTHONPATH:$VIRTUAL_ENV
24. Basic Commands
A brief introducion to manage virtual enviroment
$ mkvirtualenv --no-site-packages --python=PYTHON_EXE ENV
# same as virtualenv!
$ workon ENV (ENV) $ cdvirtualenv
# set virtualenv environment # go to home environment
(ENV) $
(ENV) $ deactivate
# deactivate current environment
$ rmvirtualenv ENV
# remove selected environment
25. More Commands :)
(ENV) $ lssitepackages
# list packages on current environment
(ENV) $ cdsitepackages
# go to site-packages directory
(ENV) $ add2virtualenv directory...
# adds the specified directories to the Python path
(ENV) $ toggleglobalsitepackages
# enable/disable global site-packages
Much more commands & options at
http://www.doughellmann.com/docs/virtualenvwrapper/command_ref.html
26. Simple Sample :P
$ mkvirtualenv --no-site-packages djangoday-rulez
(djangoday-rulez) $ deactivate
$ workon djangoday-rulez
(djangoday-rulez) $ cdvirtualenv
(djangoday-rulez) $ pip install django
... do some cool stuff ...
(djangoday-rulez) $ lssitepackages
(djangoday-rulez) $ deactivate
... do other stuff or switch project
... --- ...
... if it's not so cool ;) ...
$ rmvirtualenv djangoday-rulez
27. Tips & Hooks
virtual environment with "requirements.txt" file
$ mkvirtualenv --no-site-packages
--python=PYTHON_EXE -r django-requirements.txt
$ mkvirtualenv --no-site-packages
-r other-requirements.txt
Under ~/.virtualenvs you'll find the hook scripts that running pre/post
create, activate environments.
postmkvirtualenv
Hooks are simply plain-text files with shell commands. prermvirtualenv
You can customize them to change their behavior when an postrmvirtualenv
postactivate
event occurs. predeactivate
postdeactivate
See extending virtualenv-wrapper: http://bit.ly/IMP0vh
28. Not entirely unlike...
virtualenv virtualenvwrapper
http://bit.ly/141dCr
http://bit.ly/jbFVCe
31. pythonbrew !
pythonbrew is a program to automate the
building and installation of Python in the
users $HOME.
32. Installation
Recommended way
$ curl -kL http://xrl.us/pythonbrewinstall | bash
Add the following line into ~/.bashrc
[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.
pythonbrew/etc/bashrc
Last News!!!
The original project seems to be unmantained, but there is
a fork https://github.com/saghul/pythonz
(forked last week... Wait! I have a presentation to do! :D )
Long live pythonz!
33. Usage
Crash course!
$ pythonbrew install VERSION $ pythonbrew off
# install python VERSION # turn off pythonbrew
$ pythonbrew list -k $ pythonbrew use VERSION
# list available pythons # use specified python
$ pythonbrew list $ pythonbrew uninstall VERSION
# list installed pythons # uninstall python VERSION
$ pythonbrew switch VERSION
# permanently use specified python
34. which python
$ pythonbrew use 2.6.5
$ which python
/home/cstrap/.pythonbrew/pythons/Python-2.5.6/bin/python
$ pythonbrew off
$ which python
/usr/bin/python
Cool! And you can create isolated python environments
(it uses virtualenv) ...
35. Create and use pythonbrew
Always use
the --force,
Luke!
$ pythonbrew install --force 2.5.6
... wait... This could take a while...
$ pythonbrew use 2.5.6
$ pythonbrew venv init
$ pythonbrew venv create djangoday-proj
$ pythonbrew venv list # list all environments
$ pythonbrew venv use djangoday-proj
(djangoday-proj) $ pip install django
... do some cool stuff ...
... if it's not so cool ;) ...
$ pythonbrew venv delete djangoday-proj
36. Mostly Harmles...
● virtualenv & virtualenvwrapper
allow you to create and manage
environments using the system default
Python interpreter
● pythonbrew allow you to install
different Python interpreter, create
and manage virtual environments
...