{ "info": { "author": "Konstantin Tretyakov", "author_email": "kt@ut.ee", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Plugins", "Framework :: Paste", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Software Development" ], "description": "===========================\nPython Boilerplate Template\n===========================\n\nThis is a `PasteScript `_ template for generating a Python project. It provides simple starting points for using some of the popular best-practices:\n\n * Proper `setuptools `_-compatible package layout.\n * `py.test `_-based tests.\n * `buildout `_ for managing development tools or developing multiple-package projects\n * Usage of the `Travis-CI `_ continuous integration service.\n\nNote that the same template is available for use with `cookiecutter `_ via `this repository `_.\n\nInstallation\n------------\n\nThe easiest way to install the package is via ``easy_install`` or ``pip``::\n\n $ easy_install python_boilerplate_template\n \nNote that the package is a plugin to the ``paster`` tool. The ``paster`` tool is provided by the ``PasteScript`` package (it will be installed automatically with ``python_boilerplate_template``). The ``paster`` executable should appear in your Python's ``bin/`` (in Windows ``Scripts/``) directory. You might need to add that directory to your ``PATH`` to run the executable.\n\nUsage\n-----\n\nTo initialize a directory layout for a new project, ensure that ``paster`` is in your path and run::\n\n $ paster create -t python_boilerplate \n \nAfter asking some basic questions, the tool will create the following project layout for you::\n\n /\n |\n +-- .gitignore # Git configuration\n +-- .travis.yml # Travis-CI configuration \n +-- bootstrap.py # Buildout bootstrap-script\n +-- buildout.cfg # Buildout project configuration\n +-- setup.cfg # Configuration for py.test and other tools\n +-- README.md # Information on how to use the project\n +-- src/ # Directory for keeping (possible multiple) project eggs\n |\n +- / # First egg of the project\n |\n +-- package/ # Python source files\n +-- tests/ # Tests\n +-- .gitignore # Git configuration\n +-- .travis.yml # Travis-CI configuration\n +-- setup.cfg # Configuration for py.test and other tools\n +-- setup.py # Package metadata\n +-- MANIFEST.in # Files to include in the package\n +-- README.rst # Package description\n +-- LICENSE.txt # License\n +-- CHANGELOG.txt # Changelog\n\nThis structure suggests you develop your project as a collection of eggs, with each egg having its separate subdirectory within ``src/``. Each egg uses the standard setuptools layout, and the whole project relies on buildout to organize the parts.\n\nProject preparation\n-------------------\n\nThe next thing to do after having created the project layout is to add the code to a version control repository. There are two common options for you to choose from:\n\n 1. For smaller single-package projects you might want to keep only the Python's package code (i.e. ``src/``) under version control, and consider the rest (the ``buildout.cfg`` and all that comes with it) to be your local development environment.\n 2. For larger projects you should consider keeping the whole development environment (including ``buildout.cfg``, perhaps several eggs under ``src``, docs in ``doc``, etc) under version control.\n\n**If you decided in favor of Option 1**:\n\n - Create a version control repository under ``src/``. Here is an example with Git::\n\n > cd src/\n > git init\n > git add .\n > git commit -m \"Initial package structure\"\n \n If you are using Github, proceed by creating a `` repository on the Github website, and then doing::\n\n > git remote add origin https://github.com//.git\n > git push origin master\n\n - You can safely delete the ``.travis.yml`` file in the root of the project (but leave the one within the ``src/`` directory).\n\n**If you decided in favor of Option 2**:\n\n - Create a version control repository under the project root. The Git/Github example above applies, except for the first ``cd`` line.\n - Drop ``.travis.yml`` from the ``src/`` directory (leave the one in the project root).\n\nBefore you begin developing your code, you may wish to tune the ``src//README.rst`` file. This file should contain a detailed description of what your package is supposed to do. In particular, when you submit your package to PyPI, the contents of this file will be shown on the package index page. \n\nIn addition, the ``LICENSE.txt`` included with the boilerplate code is a copy of the ``MIT`` license. If you project uses a different license, replace this file to match.\n\nEventually, you will also want to edit the ``README.md`` to reflect the development instructions that apply to your project.\n\nFinally, review the settings in ``src//setup.py`` (e.g., the ``classifiers`` parameter might require tuning).\n\nOnce you are done with the preparation, you can start developing by running ``python bootstrap.py`` and then ``buildout``. See next section.\n\nCommon development tasks\n------------------------\n\n * **Setting up the development environment before first use**::\n \n > python bootstrap.py\n > export PATH=$PWD/bin:$PATH \n (in Windows: set PATH=%CD%\\bin;%PATH%)\n > buildout\n \n * | **Running tests**\n | Tests are kept in the `tests` directory and are run using:\n\n ::\n\n > py.test\n \n * **Creating Sphinx documentation**::\n \n > sphinx-quickstart\n (Fill in the values, edit documentation, add it to version control)\n (Generate documentation by something like \"cd docs; make html\")\n \n (See `this guide `_ for more details)\n \n * | **Specifying dependencies for your package**:\n | Edit the ``install_requires`` line in ``src//setup.py`` by listing all the dependent packages.\n\n * | **Producing executable scripts**:\n | Edit the ``console_scripts`` section of ``entry_points`` in ``src//setup.py``. Then run ``buildout``. The corresponding scripts will be created in the ``bin/`` subdirectory. Note that the boilerplate project already contains one dummy script as an example.\n\n * | **Debugging the code manually**: \n | Simply run ``bin/python``. This generated interpreter script has the project package included in the path.\n \n * **Publishing the package on Pypi**::\n \n > cd src/\n > python setup.py register sdist upload\n \n * **Creating an egg or a windows installer for the package**::\n \n > cd src/\n > python setup.py bdist_egg\n or\n > python setup.py bdist_wininst\n \n * | **Travis-CI integration**:\n | To use the Travis-CI continuous integration service, follow the instructions at the `Travis-CI website `_ to register an account and connect your Github repository to Travis. The boilerplate code contains a minimal ``.travis.yml`` configuration file that might help you get started.\n\n * | **Other tools**:\n | The initial ``buildout.cfg`` includes several useful code-checking tools under the ``[tools]`` section. Adapt this list to your needs (remember to run ``buildout`` each time you change ``buildout.cfg``).\n\n * | **Working with setup.py**:\n | If you are working on a small project you might prefer to drop the whole ``buildout`` business completely and only work from within the package directory (i.e. make ``src\\`` your project root). In this case you should know that you can use\n\n ::\n \n > python setup.py develop\n \n to include the package into the system-wide Python path. Once this is done, you can run tests via::\n \n > python setup.py test\n \n Finally, to remove the package from the system-wide Python path, run::\n \n > python setup.py develop -u\n\n * | **Developing multi-package projects**:\n | Sometimes you might need to split your project into several packages, or use a customized version of some package in your project. In this case, put additional packages as subdirectories of ``src/`` alongside the original ``src/``, and register them in ``buildout.cfg``. For example, if you want to add a new package to your project, do\n\n ::\n \n > cd src/\n > cookiecutter https://github.com/audreyr/cookiecutter-pypackage.git\n or\n > paster create \n \n Then add ``src/`` to version control and add the directory ``src/`` to the ``develop`` list in ``buildout.cfg``. Also, if necessary, add ```` to the ``[main]`` part of ``buildout.cfg`` and mention it in the ``[pytest]`` configuration section of ``setup.cfg``.\n\nReferences\n----------\n\n * PyPI Page: http://pypi.python.org/pypi/python_boilerplate_template\n * Github: https://github.com/konstantint/python-boilerplate-template\n * Cookiecutter version: https://github.com/konstantint/cookiecutter-python-boilerplate\n * Blog post: http://fouryears.eu/2014/03/19/structure-of-a-python-project/\n * Useful reading\n - http://www.jeffknupp.com/blog/2013/08/16/open-sourcing-a-python-project-the-right-way/\n * Related projects: `[1] `_, `[2] `_, `[3] `_.\n\n\nCopyright & License\n-------------------\n\nCopyright (c) 2014, `Konstantin Tretyakov `_. MIT License.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://kt.era.ee/", "keywords": "pastescript template package", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "python_boilerplate_template", "package_url": "https://pypi.org/project/python_boilerplate_template/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python_boilerplate_template/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://kt.era.ee/" }, "release_url": "https://pypi.org/project/python_boilerplate_template/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "PasteScript template for initializing a new buildout/pytest/travis/setuptools-enabled Python project", "version": "1.0.1" }, "last_serial": 1039432, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "8a9e079befd5d1c2423bed91c1c38417", "sha256": "1bbaade6fcf8f4b316dbb6c3c603ca0d3748732425232d34647dfd06ad437663" }, "downloads": -1, "filename": "python_boilerplate_template-1.0.zip", "has_sig": false, "md5_digest": "8a9e079befd5d1c2423bed91c1c38417", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30636, "upload_time": "2014-03-21T20:54:19", "url": "https://files.pythonhosted.org/packages/31/1d/289acc5da27ead87ccccc1935fa901f279a33d01a278402b3ab343b2bae5/python_boilerplate_template-1.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "88a116c08617e8f471fd70795408f8f4", "sha256": "50373dc98e1ae25f65ab9f9ced3512f896deed22ffe37b06125c375ccfe7ec25" }, "downloads": -1, "filename": "python_boilerplate_template-1.0.1.zip", "has_sig": false, "md5_digest": "88a116c08617e8f471fd70795408f8f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30885, "upload_time": "2014-03-24T15:24:53", "url": "https://files.pythonhosted.org/packages/89/e3/1d389d17ddebfbf5c7901dc0f047d16fb0cf3138766e6e8f6530b63ec182/python_boilerplate_template-1.0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "88a116c08617e8f471fd70795408f8f4", "sha256": "50373dc98e1ae25f65ab9f9ced3512f896deed22ffe37b06125c375ccfe7ec25" }, "downloads": -1, "filename": "python_boilerplate_template-1.0.1.zip", "has_sig": false, "md5_digest": "88a116c08617e8f471fd70795408f8f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30885, "upload_time": "2014-03-24T15:24:53", "url": "https://files.pythonhosted.org/packages/89/e3/1d389d17ddebfbf5c7901dc0f047d16fb0cf3138766e6e8f6530b63ec182/python_boilerplate_template-1.0.1.zip" } ] }