Skip to main content

Module for easy python modules creation

Project description

Picnic is a simple template engine for writing python modules. You open a console and in any folder you type

picnic.py ModuleName

and it will produce the following folder, with (almost ?) all the files you need. All there is left to do is write the actual code :

/ModuleName
    /modulename
        /__init__.py
        /modulename.py # A file for the actual code
    /setup.py
    /README.rst
    /LICENCE.txt
    /MANIFEST.in
    /ez_setup.py # for Setuptools

The created package is configured to work with Setuptools because Setuptools rocks.

Options

Two useful options are -git and -dev (the order doesn’t matter):

picnic.py ModuleName -git -dev

The -git option will initialize a git repository with the newly created module (requires git installed):

# it will run these lines in the ModuleName folder
git init
git add .
git commit -m "Initial commit"
# it will also create a python-specific .gitignore file

The -dev option will run the following command at the end to install the newly created module in develop mode (i.e. you can do your changes on the module without needing to reinstall the module each time to test it)

sudo python setup.py develop

Installation and customization

From the source

Get a zip of the code, for instance on Github . Unzip the code in some folder. You can check the models of the files README.rst, setup.py etc in subfolder picnic/files and change them as you like. Then use the following command in the folder where the setup.py is

sudo python picnic.py install

Or even better, use this command instead, it will enable you to change the models of the files even after the installation:

sudo python picnic.py develop

With pip (not recommanded)

Type this in a terminal

sudo pip install picnic

The problem with this installation is that you cannot customize the templates.

Test

To test if it works go to any folder and type

picnic.py TestModule

Contribute

Picnic is an open source software originally written by Zulko and released under the MIT licence. Please help make picnic better, for instance by expanding the capabilities, providing advice for sounder standards if you are an experienced module-maker, reporting bugs, etc. We love forks and pull resquests ! Picnic is being developped on Github, that’s where you should go for troubleshooting and bug reports.

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

picnic-0.0.0.2.tar.gz (6.6 kB view details)

Uploaded Source

File details

Details for the file picnic-0.0.0.2.tar.gz.

File metadata

  • Download URL: picnic-0.0.0.2.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for picnic-0.0.0.2.tar.gz
Algorithm Hash digest
SHA256 9e89299a7ede1e2f70815c820e4dc2fb472240512644f5fc1aceb29f7ad7463b
MD5 282f3ffba99af238bcfecb7e8b7d78f2
BLAKE2b-256 05682025c57d0b1415e0cec1efe3dab407958ce86562f09b09cd3c089813ca38

See more details on using hashes here.

Supported by

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