Skip to main content

Thom's COokie CUtter for Python

Project description

Thom's COokie CUtter for Python (CoCuP)

Description

A 'cookie cutter' to create a blank template for a python package in the target directory.

cocup will create a skeleton Python package with the following architechture:

my_package/
├── setup.py
├── LICENSE
├── README.md
├── .gitignore
├── my_package/
│   ├── __init__.py
│   ├── __main__.py
│   ├── main.py
│   ├── parser/
│   │   ├── __init__.py
│   │   └── parser.py
│   ├── utils/
│   │   ├── __init__.py
│   │   └── errors.py
├── example_data/
│   ├── example_in/
│   └── example_out/
└── tests/

Minimal scripts will be generated to produce a functioning skeleton package with a simple parser and basic logging functions.

Installation

Either clone this repository, or download and install with PyPI:

pip install cocup

Usage

Minimal Usage

At minimum cocup requires two positional arguments: the project name and description. For example, to create a package called my_package, navigate to an empty directory and run:

cocup my_package 'a description of my package'

IMPORTANT: By default, cocup creates a GPL3.0 license for the package. If you want to use a different license, you can either select a different license with -l, or delete this license and replace it with you own. You alone are responsible for licensing your software! You have been warned!

Recommended Usage

I recommend to use cocup with additional parameters to help you populate the package with information about the author. Specifically:

cocup my_package 'a description of my package' -a 'John Smith' -e john.smith@email.com

Other Parameters

There are a few other parameters that might be useful:

-l change the license, IMPORTANT: Defaults to GPL3.0, see above.

-r add requirements to the setup.py (e.g. -r numpy,matplotlib)

-h print the help text for the parser

Citation

None - go crazy!

Version Log

  • 0.1.0
    • initial version
  • 0.1.1
    • fixed a bug when creating a setup.py with no requirements
  • 0.1.2
    • fixed printing and logging errors in main.py template
    • fixed inconsistent indentation in parser.py template

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

cocup-0.1.2.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

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

cocup-0.1.2-py3-none-any.whl (38.2 kB view details)

Uploaded Python 3

File details

Details for the file cocup-0.1.2.tar.gz.

File metadata

  • Download URL: cocup-0.1.2.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for cocup-0.1.2.tar.gz
Algorithm Hash digest
SHA256 285c789ab421c9b52be1002fc5398ca8bc9dd37f49a93bdfa3c1df2c44cb4db6
MD5 9aaae6f7696ab683274d3d5c26c0e11b
BLAKE2b-256 82363035a888668b8e8871ae2ea68c1299eb47637d6a6a2e1ede42e9a70b6be1

See more details on using hashes here.

File details

Details for the file cocup-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: cocup-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 38.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for cocup-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eefe9b1a2d3887e247dfbb8d6ac4b1990b6c4b2e28610a5318c64c06b110b199
MD5 a44cf57206fc6082b96d5a9d3607c1ff
BLAKE2b-256 3fb73af06d0941c33fa84240b09dec246c0e7dc6fd8876d088bdf1f3ff01099c

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