Skip to main content

Automatically create a command application

Project description

pycreator

Create boilerplate application thru the command-line!

TLDR;

pip install pycreator       # to install pycreator
pycreator goes brrr         # where brr is the name

Usage

create

This command allow to create a Python boilerplate application with the structure as showed below. Available commands for create:

-n, --name      -- application name (required)
-l, --location  -- location to create a new package. If none it will create at working directory

Structure of example application named brrr (pycreator create -n brrr)

brrr
│   LICENSE.md
│   README.md
│   VERSION
│
└───src
    └───brrr
        │   setup.py
        │   __init__.py
        │
        ├───actions
        │   │   action.py
        │   │   action_dispatcher.py
        │   │   version.py
        │   │   __init__.py
        │   │
        │   └───example_action
        │           example_action.py
        │           __init__.py
        │
        ├───core
        │       __init__.py
        │
        ├───framework
        │       messages.py
        │       __init__.py
        │
        └───main
                main.py
                __init__.py

add

Note: This is experimental function and it does not work always correct

The add function allow to add a new action into actions directory. To use it please be at brrr directory under src (please see an example above) and the type:

pycreator add -n action_name

New folder action_name and action_name.py will be created.

Note: Please import a new action in actions_dispatcher.py file manually.

New action should be added here, into ACTION_HANDLERS

class ActionDispatcher:
    ACTION_HANDLERS = [AddAction,
                       CreateAction,
                       GoesAction,
                       ShowVersion]

Build

Boilerplate app comes with preconfigured setup.py file which allow to create a .whl package. To build a package, go to src dir a type in the terminal:

pip install setuptools wheel
python setup.py sdist bdist_wheel

After operation in the newly created dir dist/ you should find a *.tar.gz & *.whl packages.

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

pycreator-0.2.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

pycreator-0.2.2-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file pycreator-0.2.2.tar.gz.

File metadata

  • Download URL: pycreator-0.2.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for pycreator-0.2.2.tar.gz
Algorithm Hash digest
SHA256 6d824cdaf2bcd14cb8d233ff997c5178fdf8990ec3b9e0220d26f5659b5aa589
MD5 19dc6734b9ca5099549245780e12f910
BLAKE2b-256 5ec4d1ffa8ddfcc936e68e80bfdb227f68bfc4059242961f827423d11111c26d

See more details on using hashes here.

File details

Details for the file pycreator-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: pycreator-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for pycreator-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a2f3a901094e91055c80cd7f42ca0c6c754c4755a3fec696d52c71549501bd11
MD5 d59e529c2d241e758fd60a20fe6d5553
BLAKE2b-256 7d6a502668b56bbdc1dae9a574d4d46bb26b04be6263acdaa86ec30d81248c02

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