Python starter is a generic template for creating Python libraries and applications.
bin
– directory, where scripts are placed.src
– directory, where package code is placed.LICENCE.txt
– LGPL license text.README.rst
.CHANGES.txt
.setup.cfg
– setup configuration file.setup.py
– description.bootstrap.py
.docs
– directory, where package documentation is placed.Makefile
buildout.cfg
- buildout – isolated environment;
- pylint – code quality checker;
- sphinx and rst2pdf – for documentation;
- rmtoo – requirements management tool;
- nose – for testing.
- chaoflow.testing.ipython – for interactive doctest writing.
bin/start
– script, that prepares environment for new project.
Clone template:
git clone git://github.com/vakaras/Python-Starter.git ${PROJECT}
Here
${PROJECT}
is the directory name of your project.Change default repository. Assuming you are in project directory:
git remote rename origin template git remote add origin ${REPOSITORY} git push -u origin master
Here
${REPOSITORY}
is the URL of your public repository (at github or somewhere else).- Replace
README.rst
with yours. Start:
python3 bin/start ${APP_NAME} ${AUTHOR} ${AUTHOR_EMAIL}
Example:
python3 bin/start db-utils \ "Vytautas Astrauskas" \ vastrauskas@gmail.com
Buildout:
make buildout
If you want to update template:
git pull template master
If you want to include library created with this template into another project, just add egg name into projects buildout.cfg
and URL of your repository in [sources]
section, like this:
[buildout]
...
eggs =
...
db-utils
...
[sources]
db-utils = git git://github.com/vakaras/db-utils.git
...
- Python3
In Ubuntu you can install everything with command:
sudo apt-get install python3