Skip to main content

Create Python Script CLI

Project description

My logo

in development

PyPlater is a Python CLI Tool to generate, build, and create boilerplate code for python projects Including linting, formatting, unit testing, and package managing from prebuilt and your own custom templates

Get Setup

Install PyPlater

$ pip install pyplater-cli

Commands

PyPlater CLI supports two templating types:

  • template: a project file structure using the cookiecutter library
  • snippet: a small directory literal for commonly used modules

Pyplater Save

Save project directorys as snippets or templates

PyPlater Save

Options

  • Type: template/snippet
  • Directory: the directory you with to copy
  • Name: the name of the new template/snippet

Example

Save a template

$ pyplater save template path/to/folder <name>

Save a snippet

$ pyplater save snippet path/to/folder <name>

PyPlater Insert

Add snippet files to existing projects or generate not template project

PyPlater Insert

Options

  • Type: template/snippet
  • -n/--name: namee of template/snippet

Example

Insert a template

$ pyplater insert template -n <custom_name> -t <saved_template>

Insert a snippet

$ pyplater insert snippet -n <saved_snippet>

PyPlater Git

Initialize a git repository to hold your templates/snippets that you can then push an pull from

PyPlater Git

Options

  • Actions: push/pull
  • Options: template/snippet
  • -n/--name: template/snippet name

Examples

Initialize Git Repository (Personal access token is not stored)

$ pyplater git init -u <github_username> -t <personal_access_token>

Push templates to repository

$ pyplater git push all

or

$ pyplater git push snippet -n <snippet_name>

Pull templates from repository

$ pyplater pull all

or

$ pyplater pull snippet <snippet_name>

PyPlater View

View all saved snippets/templates or view a specific snippet's/template's file structure

PyPlater View

Options

  • [Type]: (snippets, templates)
  • --name: specific tamplate or snippet

Examples

$ pyplater view snippets

$ pyplater view templates --name your_project

PyPlater Edit

Open your template and snippets in vs code

Options

  • Types: template/snippet
  • -n/--name: name of template or snippet

Examples

$ pyplater edit snippet -n <name>

PyPlater Run

Define commands in the pyproject.toml to run your custom scripts with pyplater

$ pyplater run script
$ pyplater run test

pyproject.toml

[pyplater.scripts]
script = "python ./main/script/main.py"
test = "python -m unittest:discover tests/"

PyPlater Remove

Remove Templates and/or Snippets from your device

Options

  • [Name]: name of the template/snippet
  • --type: (template, snippet)

Example

$ pyplater remove your_project --type 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

pyplater_cli-1.0.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

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

pyplater_cli-1.0.0-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file pyplater_cli-1.0.0.tar.gz.

File metadata

  • Download URL: pyplater_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.12 Linux/5.15.0-1041-azure

File hashes

Hashes for pyplater_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 dd3cdead7e26b120ddbab3a877ac861cbcd0292df21474012d2f238e78a1cc4e
MD5 981206958b58498bb61fd168513e6da2
BLAKE2b-256 67b79a25387a87fd9bae721083918a03beb50e218900a73927e67f2e0af5f941

See more details on using hashes here.

File details

Details for the file pyplater_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyplater_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.12 Linux/5.15.0-1041-azure

File hashes

Hashes for pyplater_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e82abd68c04d6df06d581cb475f44f2d9aa750d338712329f23d7875245a3667
MD5 ee5597d39f0c642b790cac7133afd6d4
BLAKE2b-256 2d6d55b3f49b3b0666e532d8ab162a0328a4e7163382984428df1ad231c3ff71

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