Skip to main content

Python PIP Toolchain cli

Project description

pepsin

Python Project Initializer CLI Tool, uses pip

To install packages

Discarded previous version for not maintaining and complexity of code

In Development

Currently the goal is to create a simple tool to manage dependencies, Initialize projects (django, fastapi, flask) with production ready features. Initialize pytest, tox, github actions etc. Managing scripts to run, (Inspired by npm run)

So primary goal is to -

  1. Create a toolchain to manage dependencies
  2. Project initialization
  3. Managing scripts
  4. File generation based on templates (tox, pytest)
  5. Dockerizing and customization hook

pepsin's code structure is heavily inspired by django.core.management pepsin implements almost the similar strategy of code writing and work process. pepsin cli library is written using builtin libraries like argparse importlib pkgutil sys os etc. For storing libraries and managing dependencies, yaml file has been selected as it has a very basic and minimalistic syntax.

Requirements

python 3.6+

Installation

$ pip3 install pepsin

Before use

pepsin generates or uses pepsin.yaml file to store all your metadata, project configuration, project libraries and dependencies pepsin.yaml config file

name: GameOfChairs # Name of the project
author: Khan Asfi Reza # Author's name
email: info@khanasfireza.com # Author's email
venv: venv # Virtualenv directory name
license: MIT # Project license type
libraries:
  # Installed libraries
  - django
  - psycopg2
  - djangorestframework
  - django-channels

If any failure or error occurs a failed.pepsin.log will be created mentioning the problem

Usage

1. init

$ pepsin init

Init command generates basic python project to get start with, It will interactively ask you to fill the required fields

$ pepsin init
$ pepsin Generate Project
$ ----------------------
$ Project Name[project]:
$ Author[]:
$ Email[]:
$ License[]:

File structure

Project  Directory
|____ venv
|____ pepsin.yaml
|____ Readme.md
|____ .gitignore
|____ project
      |___ main.py
      |___ __init__.py

Optional Arguments:

name the name of the project and pepsin will create a project with the given project name

Example:

$ pepsin init project_name

Options

option description type required default
--venv Virtual environment directory string false venv
--h Help text boolean false
--no-input Ignores input prompt boolean(flag) false venv

2. install

Command Alias: add i

Install required dependencies and libraries

$ pepsin install django

or

$ pepsin i django

or

$ pepsin add django

Also text file with list of libraries can be installed with -r flag

$ pepsin install -r requirements.txt

Note: install command will by default create a pepsin.yaml file and a virtualenv directory named venv

option description type required default
-r Install from the given requirements file string false null
--h Help text boolean false

3. uninstall

Uninstall a library that is installed in your envrionment

$ pepsin uninstall

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

pepsin-1.0.0b0.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

pepsin-1.0.0b0-py3-none-any.whl (35.2 kB view details)

Uploaded Python 3

File details

Details for the file pepsin-1.0.0b0.tar.gz.

File metadata

  • Download URL: pepsin-1.0.0b0.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pepsin-1.0.0b0.tar.gz
Algorithm Hash digest
SHA256 5c7c4ec47dc5812927ee914b5a600c9341a5bb73413de260552e63e0425367c3
MD5 11c1f5cf535cb5be7e35c7dc90d4c07e
BLAKE2b-256 f206d3fcaeed921cba935c5ad0c03e0098e429f7c5eea1f63782f861e70dcf31

See more details on using hashes here.

File details

Details for the file pepsin-1.0.0b0-py3-none-any.whl.

File metadata

  • Download URL: pepsin-1.0.0b0-py3-none-any.whl
  • Upload date:
  • Size: 35.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pepsin-1.0.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 7248ec4100210020e58e7bebd240f2ad7ff83958f9da747fec6428827e699531
MD5 da29f515afa929356eb2da0656a99088
BLAKE2b-256 b1dcd7b6360a2819335da35218ac6add75b84472d7b1e5e7e3e3115031d02159

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