Giter Club home page Giter Club logo

project_sketch's Introduction

project_sketch

A nerd's boilerplate for your Python project.

Usage

$ cp -r project_sketch <your_projects_name>
$ cd <your_projects_name>
$ mv project_sketch <your_projects_name>

And change every project_sketch word into <your_projects_name>.

Hierarchy

project_sketch
├── project_sketch
│   ├── _module
│   │   └── __init__.py
│   └── __init__.py
├── .gitignore
├── setup.py
├── Makefile
├── manage.py
├── requirements.txt
├── dev-requirements.txt
└── README.md

Explanation

  • project_sketch/

    The Python package of this project, mostly has the same name with root folder

  • project_sketch/init.py

    Essential file to claim a package, contains __version__ variable.

  • project_sketch/_module/

    A submodule of the project, there's also a necessary __init__.py under it.

    you can cp _module whatever-you-like to create a new submodule.

  • .gitignore

    Simple, effective gitignore, much less verbose than this windbag

  • setup.py

    You may hate it, but you can't ignore it. This setup.py does just what you want, and it automatically involves requirements.txt and README.md.

    If you rock, go and dig this.

  • Makefile

    We love Makefile, not Rakefile nor Gruntfile nor whatever requires extra program. This awesome Makefile contains three commands at your service:

    • make build

      Build Python package with setup.py.

    • make clean

      Clean files & folders generated by build.

    • make test

      Run tests (if you have any) with nose.

  • manage.py

    Try pip install click & ./manage.py ping to see how it works.

    If you are writing something that needs to run in a complicated way, and you realize that this sort of code should not be put in the package, this is what you need. manage.py is an entrance script which you can customize your own command in it. By default, it uses click to define commands & options, you can replace it by other things like docopt, or fabric (the file should be named fabfile.py then), if you prefer.

    If you are writing a pure import-only package, feel free to remove it.

  • requirements.txt

    Includes a click by default, this file contains packages your project depends on.

  • dev-requirements.txt

    Includes a nose by default, this file contains packages you need in developing environment, which are not necessary in production.

  • README.md

    A cute, well formatted README.md makes people happy. (True heros love README.rst :).

Questions and Answers

Q: Why there's no MANIFEST.in file in the directory?

Q: Why there's no setup.cfg file in the directory?

Q: How to build and publish a distribution?

Q: Should I use wheel as my distribution format?

Could be answered from http://python-packaging-user-guide.readthedocs.org/en/latest/distributing/

project_sketch's People

Contributors

reorx avatar wzyboy avatar

Stargazers

 avatar Greg Farnum avatar  avatar 孙强 avatar kyanne avatar Jing He avatar  avatar Riptide00 avatar  avatar Messyidea avatar 大毛 avatar  avatar Zhong Chen avatar  avatar  avatar EGOIST avatar septs avatar nwu avatar  avatar

Watchers

 avatar James Cloos avatar sgs 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.