Giter Club home page Giter Club logo

scaffold-py's Introduction

Scaffold for Python

Inspired by Zed Shaw’s recommended Python project structure from Learn Python the Hard Way exercise #46.

Each project you scaffold will create the following directory structure:

/[projectname]/
/[projectname]/setup.py
/[projectname]/bin
/[projectname]/docs
/[projectname]/[projectname]
/[projectname]/[projectname]/__init__.py
/[projectname]/tests
/[projectname]/tests/__init__.py
/[projectname]/tests/[projectname]_tests.py

Both setup.py and [projectname]_tests.py are set up automatically to reference your project name as a module. The rest is up to you!

Installing Scaffold

You can view the scaffold package on PyPi here: http://pypi.python.org/pypi/Scaffold/0.1.3

To install, simply use pip install scaffold

Running Scaffold

Scaffold installs itself as an executable Python script, so just enter the pyscaffold command on your favorite terminal:

pyscaffold -p "projectname" [-d {base directory}]

You can also run scaffold as a python module if needed:

python -m scaffold -p "projectname" [-d {base directory}]

The -p parameter is the name of your project and is a required field. If you don’t specify a base directory with the -d parameter, scaffold will assume that you want to create your project skeleton in your current working directory.

Sample Usage:

Just to give you an idea of what works and what doesn’t…

pyscaffold -p "http-utils" -d /c/repositories/
pyscaffold -p "mutliplex-py"
pyscaffold -p "lazarus" -d ../

Virtualenvwrapper support

Alternatively, if (the excellent) virtualenvwrapper is installed, Scaffold also works as a project template named base. So you could run:

mkproject -t base projectname

Then virtualenvwrapper will create the virtualenv and the project root and Scaffold will do the rest.

License

Licensed under Apache 2.0 – see license.txt for details.

Contribution

I’m not the most experienced Python programmer on the planet, so patches are most certainly welcome :)
-Aaron Stannard

scaffold-py's People

Contributors

aaronontheweb avatar benekastah avatar flashingpumpkin avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.