Search code examples
pythondjangodeploymentopen-sourcedistribution

distribute deploy python web application


I'm in the early phases of designing and implementing a python web project that i want to be able to easily distribute.

Coming from a primary PHP and Perl world i know how i would do the project in those lanuages but I am trying to find the best method for python.

Not sure if it matters, but I'm thinking of using django as the web framework, but still exploring other frameworks.

What i'm looking for is best practices to be able to bundle my application and have users just install it using pip.

Would i be able to package the wen application like that even if it using django or is that not the way its normally done? Would they instead just download the code and set it up like it was any other tar ball of code?

I tried searching around for this but i find mostly information on people deploying there own projects.

Thanks Dan


Solution

  • The answer depends of the size of your project.

    If it's a plugin that could be integrated to any web site, so probally just an app in the project, it's quite easy check the page of the django's doc

    If it's a full websitethen it's a little bit more complicated, since a django project depends on multiple settings that could differ from one system to an other I usually see the project being installed from a tar ball.

    I've seen packages like django-admintools bundle multiple apps in one package, but the user still need to create a basic django project.

    From what I know a full project cannot be install only by PIP.. the user always need to setup settings and the webserver (apache or nginx).

    I hope this helped you.