Spring Python intends to take the concepts that were developed, tested, and proven with the Spring Framework, and carry them over to the language of Python. If anyone has developed a solution using multiple technologies including Java, C#/.NET, and Python, they will realize that certain issues exist in all these platforms.
This is not a direct port of existing source code, but rather, a port of proven solutions, while still remaining faithful to the style, idioms, and overall user community of Python.
Note
Spring Python is an offshoot of the Java-based Spring Framework and Spring Security Framework, targeted for Python. Spring provides many useful features, and I wanted those same features available when working with Python.
–Greg Turnquist, Spring Python project lead
The following features have been implemented:
Spring Python is NOT another web framework. I think there are plenty that are fine to use, like Django, TurboGears, Zope, CherryPy, Quixote, and more. Spring Python is meant to provide utilities to support any python application, including a web-based one.
So far, the demos have been based on CherryPy, but the idea is that these features should work with any python web framework. The Spring Python team is striving to make things reusable with any python-based web framework. There is always the goal of expanding the samples into other frameworks, whether they are web-based, RIA, or thick-client.
You can order either a printed or electronic version of the Spring Python 1.1 book written by project creator Greg Turnquist. This contains a lot of code samples, diagrams, and descriptions of the concepts behind Spring Python. This book was completed right as Spring Python 1.1 was released, and 1.2.x was started, so it contains up-to-date information on the project.
If you want a release, check out Spring’s download site for Spring Python.
Spring Python has migrated to git, the distributed version control system. If you want the latest source code type:
git clone git://git.springsource.org/spring-python/spring-python.git
That will create a new spring-python folder containing the entire repository. This includes both the source code and the demo applications (PetClinic and SpringWiki). You will be on the master branch. From there, you can switch to various branches the team is working on, or create your own branch to experiment and develop patches.
You can browse the code at https://fisheye.springsource.org/browse/se-springpython-py.
This section is focused on helping you set up Spring Python.
This installs the core library of Spring Python. Version 1.2 supports Python 2.6+ (but not Python 3).
To use other features like CherryPy and Pyro, you need to execute some of the following extra steps.
You may not need all of these libraries. Determine what you need and then install it.
Another feature which is very useful, is to install everything (including Spring Python) inside a virtual environment. You can read A Primer on virtualenv to get an introduction to virtualenv. After installing easy_install, you simply type easy_install virtualenv to install this tool. From there, you can create an virtual installation by typing virtualenv –no-site-packages name_of_your_folder. On UNIX systems, to activate it, type . name_of_your_folder/bin/activate. The virtualenv will manipulate your path settings and point you to a different location of the python executable, a different easy_install and pip, and a different PYTHON_PATH. Essentially, python setup.py foobar will install into this folder you just created instead of the system version. For isolation, this is a highly recommended way to install everything.
Note
Using easy_install and pip vs. OS package installation tools
A lot of operating systems, like Ubuntu Linux, offer the same python libraries through tools like RPM, APT, etc. Due to personal experience, it is recommended to NOT use these when it comes to using Spring Python. Using OS package management can result in library upgrades when performing system upgrades. Using virtualenv is the best way to control the version of library installed and also shield your system from system upgrades.
Spring Python is released under the Apache Server License 2.0 and the copyright is held by SpringSource.
Spring Python’s official team (those with committer rights):
Many others have also contributed through reporting issues, raising questions, and even sending patches.
We like hearing about new people interesting in joining the project. We are also excited in hearing from people interested in working on a particular jira feature.
The way we do things around here, we like to work through a few patches before granting you any committer rights. You can checkout a copy of the code anonymously, and then work on your patch. Email your patch to one of the official team members, and we will inspect things. From there we will consider committing your patch, or send you feedback.
Before sending us a patch, we ask you to sign the SpringSource Individual Contributor Agreement.
After a few patches, if things are looking good, we may evaluate giving you committer rights.
Spring Python is a TDD-based project, meaning if you are working on code, be sure to write an automated test case and write the test case FIRST. For insight into that, take a trip into the code repository’s test section to see how current things are run. Your patch can get sold off and committed much faster if you include automated test cases and a pasted sample of your test case running successfully along with the rest of the baseline test suite.
You don’t have to become a team member to contribute to this project, but if you want to contribute code, then we ask that you follow the details of this process, because this project is focused on high quality code, and we want to hold everyone to the same standard.
Getting started with contributing
With all that said, happy coding!
To keep things up-to-date, we need to deprecate code from time to time. Python has built in functionality to put warnings into certain sections of code, so that if you import a deprecated module, you will be properly warned. With each major release (1.0, 2.0, 3.0, etc.), the Spring Python team has the option to remove any and all deprecated code.