How to build and deploy Python web applications

I have a Python web application consisting of several Python packages. What is the best way of building and deploying this to the servers?

Currently I'm deploying the packages with Capistrano, installing the packages into a virtualenv with bash, and configuring the servers with puppet, but I would like to go for a more Python based solution.

I've been looking a bit into zc.buildout, but it's not clear for me what I can/should use it for.

Asked by: Audrey945 | Posted: 28-01-2022

Answer 1

Depends on what Your infrastructure is. We're just using debian packages and buildbot to make them.

On other setups, I use Fabric scripts. As for format, I'm just using tbz2 files, but I've heard about people just depoloying eggs.

I'd strongly recommend having proper build and having BuildBot/Hudson to build packages, as using SCM beats the purpose and encourage bad practices.

Answered by: Julian300 | Posted: 01-03-2022

Answer 2

Paver is a rake/make work alike for python. I don't know if this is what your looking for, still haven't found anything equivalent to puppet for python...

Answered by: Chester608 | Posted: 01-03-2022

Answer 3

Would SCons do what you want?

Answered by: Catherine412 | Posted: 01-03-2022

Answer 4

pyinstall looks like it should be a simpler solution for you. At least as far as packaging the python stuff and installing in virtualenv goes. I don't know of a pythonic way to do server configuration...

Answered by: Lucas551 | Posted: 01-03-2022

Answer 5

I use Mercurial as my SCM system, and also for deployment too. It's just a matter of cloning the repository from another one, and then a pull/update or a fetch will get it up to date.

I use several instances of the repository - one on the development server, one (or more, depending upon circumstance) on my local machine, one on the production server, and one 'Master' repository that is available to the greater internet (although only by SSH).

The only thing it doesn't do is automatically update the database if it is changed, but with incoming hooks I could probably do this too.

Answered by: Julia784 | Posted: 01-03-2022

Similar questions

deployment - deploying python applications

Is it possible to deploy python applications such that you don't release the source code and you don't have to be sure the customer has python installed? I'm thinking maybe there is some installation process that can run a python app from just the .pyc files and a shared library containing the interpreter or something like that? Basically I'm keen to get the development benefits of a language like Python - ...

deployment - Howto deploy python applications inside corporate network

First let me explain the current situation: We do have several python applications which depend on custom (not public released ones) as well as general known packages. These depedencies are all installed on the system python installation. Distribution of the application is done via git by source. All these computers are hidden inside a corporate network and don't have internet...

python - How to get Applications Deployment status using WLST script in Weblogic

I am using below script for monitoring my weblogic resourcees like JDBC,JMS,but i want to monitor my applications status which has been deployed in my Weblogic server. Any help in adding deployment monitoring script into it will be a great help. Thanks in Advance!!! ########################################################################### import sys ...

deployment - Copying python applications to servers without internet connection

Currently I have a production server that doesn't have any connection to the internet (connections are not allowed). Since I have a massive number of applications which use tons of packages, I need to figure out the best way to deploy without pip or downloading every whl package. Which would be the most appropriate way to replicate the virtualenv for other servers? What would be the proper approach for that...

python - How to debug Web2py applications?

Is it possible? By debug I mean setting breakpoints, inspect values and advance step by step.

web applications - How would one make Python objects persistent in a web-app?

I'm writing a reasonably complex web application. The Python backend runs an algorithm whose state depends on data stored in several interrelated database tables which does not change often, plus user specific data which does change often. The algorithm's per-user state undergoes many small changes as a user works with the application. This algorithm is used often during each user's work to make certain important decisions...

Remote debugging of multi threaded Python Applications

How can I do remote debugging of a multi threaded Python application, running on an Embedded Linux based system, from Windows XP or Vista? So far I have only come across PyScripter based remote debugging. How does it perform?

design patterns - Open source examples of well designed Python applications

How will Python and Ruby applications be affected by .NET?

I'm curious about how .NET will affect Python and Ruby applications. Will applications written in IronPython/IronRuby be so specific to the .NET environment, that they will essentially become platform specific? If they don't use any of the .NET features, then what is the advantage of IronPython/IronRuby over their non .NET counterparts?

python - How can I get a list of the running applications with GTK?

How can I get a list of the running applications? I'm referring to the ones in the panel at the bottom of the screen.

django - Testing time sensitive applications in Python

I've written an auction system in Django. I want to write unit tests but the application is time sensitive (e.g. the amount advertisers are charged is a function of how long their ad has been active on a website). What's a good approach for testing this type of application? Here's one possible solution: a DateFactory clas...

python - Charts in django Web Applications

I want to Embed a chart in a Web Application developed using django. I have come across Google charts API, ReportLab, PyChart, MatPlotLib and ...

python - How do you deploy django applications for windows?

Closed. This question does not meet Stack Overflow guid...

Packaging Ruby or Python applications for distribution?

Are there any good options other than the JVM for packaging Python or Ruby applications for distribution to end-users? Specifically, I'm looking for ways to be able to write and test a web-based application written in either Ruby or Python, complete with a back-end database, that I can then wrap up in a convenient set of platform-independent packages (of some type) for deployment on Windows, Linux, OS X, and Free...

Still can't find your answer? Check out these communities...

PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python