Skip to main content

General purpose parameter validator for web development

Project description

# project_sketch

A nerd’s boilerplate for your Python project.

## Usage

`bash $ 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](https://github.com/github/gitignore/blob/master/Python.gitignore)

  • 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](https://pinboard.in/u:reorx/t:python/t:packaging).

  • 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](http://click.pocoo.org/3/) to define commands & options, you can replace it by other things like [docopt](http://docopt.org/), or [fabric](http://www.fabfile.org/) (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 details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

params-0.1.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

params-0.1.1-py2-none-any.whl (10.0 kB view details)

Uploaded Python 2

File details

Details for the file params-0.1.1.tar.gz.

File metadata

  • Download URL: params-0.1.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for params-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fee765d2cce35317e55d5209446f25aa32dd13b40fdd91b42a150d03a3a34268
MD5 43b46d091db4784bb1ef248c31f7ae82
BLAKE2b-256 0a71edfc0546f6bf4d685ef74d97746f99300469718bff5bf7751c6538bb4470

See more details on using hashes here.

File details

Details for the file params-0.1.1-py2-none-any.whl.

File metadata

File hashes

Hashes for params-0.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 496bbdc08b884c39a43d11624d1550e67ae39685a08fc0a17e6b7e17cc42f0de
MD5 2b979f35ce268d8fc85f61b0125880cc
BLAKE2b-256 ec0107bb25b12bf5ddfb5041b84dfe8b2e0587b0e7cfb831d638f6a7552a0685

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page