Package: pyquick
PyQuickThis is a python app/lib generator that creates a 'empty' python app/lib. And the app/lib 100% uses docker as base for development, test and build.
Of course, this project itself 100% on docker :DDemoGenerate A New Empty Python AppWhy PyQuick Created?Python's Pain PointsPython is interpreted language. Using latest python version's feature may make your code not work in environments of old versions.Install Python is boring. Linux distrubutions may have different python packages available. For e.g. installatin of python 3.7 on Centos 7 is not convenient. Though pyenv was invented for this but you still need to install pyenv firstly :).Python package management slightly sucks. Yes, virtualenv and pipenv are great for isolation. However, some python packages may need conflict binaries, which is not handled by either virtualenv or pipenv.Deployment is painful. Target system must have reuqired python version installed. This is not elegant for CI: Jenkins node has to have multiple python versions installed.Docker SavesDocker can provide nearly system-level isolation.No need to install others apart from dockerDev/Pod environments keeo consistent - prefect for CI/CD.PyQuick HelpsThough this is a super tiny python program but =>It gengerates astart-up python app/libfor you with Dockerfiles, SetUp Tools, Makefiles, Requirements and others ready.The project it generated is 100%based on Docker.You can immediately startVSCode to remotely codeyour project in container!Yourdevelopment environment all in code. Push it to any VCS then you will be able torestore itin a few minutesby one command.UsageRun As DockerThe docker image is pretty small - only 40+M.
So it will not take much time for you to pull it.# pull docker imagedockerpulljingweizhu/pyquick# generate a new python app in local path: ./myprojdockerrun--rm-it-u$(id-u$USER):$(id-g$USER)\-v${PWD}:/tmp/localjingweizhu/pyquick\app/tmp/local/myproj####  OR  #### generate a new python lib in local path: ./myprojdockerrun--rm-it-u$(id-u$USER):$(id-g$USER)\-v${PWD}:/tmp/localjingweizhu/pyquick\lib/tmp/local/myproj---- OR ----Intall From PyPi And Run ItNote:python>=3.7requiredpipinstallpyquick# generate a new python app in ./myprojpyquickapp./myproj####  OR  #### generate a new python lib in ./myprojpyquicklib./myprojTry Generated ProjectYou must have:docker: ">= 17.06"docker-compose: ">= 1.26"
installedAssume in above you input project name asmypyMake Itcd./myproj
makeThen check your containersdockerps-aA container namedmypy-devenvshould be running.Run It (app only)cd./myproj
makerun
makerunARGS='-h'Then check your containersdockerps-aA container namedmypy-prodshould be running.Intall To LocalIf have python environment in local machine,
you can install it:cd./myproj
makeinstallBuild A Python Packagecd./myproj
makedist
lsdist/*Use VSCode To Develop Generated ProjectStart VSCode, install Remote extention.Attach to your container : myproj-devenv in VSCodeOpen terminal. Your project folder attached to container already. Just run.vscode/install-vscode-extensions.shReload widdow. Then python extension and other cool extensions available.And Even More ...Format Codes Of Your Projectcd./myproj
makeautopep8Distribute Your Project To PyPiSet up two envs:TWINE_USERNAME=<yourpypiusername>TWINE_PASSWORD=<yourpypipassword>Runcd./myproj
makedist-uploadSource codePrerequisitiondocker: ">= 17.06"docker-compose: ">= 1.26"Install From CodemakeinstallRunmakerun
makerunARGS="-h"Distmakedist