This release is a pre-release and may not be stable for production use.
PyQuick
This 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 :D
Demo
Generate A New Empty Python App
Why PyQuick Created?
Python's Pain Points
- Python 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 Saves
- Docker can provide nearly system-level isolation.
- No need to install others apart from docker
- Dev/Pod environments keeo consistent - prefect for CI/CD.
PyQuick Helps
Though this is a super tiny python program but =>
- It gengerates a start-up python app/lib for you with Dockerfiles, SetUp Tools, Makefiles, Requirements and others ready.
- The project it generated is 100% based on Docker.
- You can immediately start VSCode to remotely code your project in container!
- Your development environment all in code. Push it to any VCS then you will be able to restore it in a few minutes by one command.
Usage
Run As Docker
The docker image is pretty small - only 40+M. So it will not take much time for you to pull it.
# pull docker image
docker pull jingweizhu/pyquick
# generate a new python app in local path: ./myproj
docker run --rm -it -u $(id -u $USER):$(id -g $USER) \
-v ${PWD}:/tmp/local jingweizhu/pyquick \
app /tmp/local/myproj
#### OR ###
# generate a new python lib in local path: ./myproj
docker run --rm -it -u $(id -u $USER):$(id -g $USER) \
-v ${PWD}:/tmp/local jingweizhu/pyquick \
lib /tmp/local/myproj
---- OR ----
Intall From PyPi And Run It
Note: python>=3.7 required
pip install pyquick
# generate a new python app in ./myproj
pyquick app ./myproj
#### OR ###
# generate a new python lib in ./myproj
pyquick lib ./myproj
Try Generated Project
You must have:
- docker: ">= 17.06"
- docker-compose: ">= 1.26" installed
Assume in above you input project name as mypy
Make It
cd ./myproj
make
Then check your containers
docker ps -a
A container named mypy-devenv should be running.
Run It (app only)
cd ./myproj
make run
make run ARGS='-h'
Then check your containers
docker ps -a
A container named mypy-prod should be running.
Intall To Local
If have python environment in local machine, you can install it:
cd ./myproj
make install
Build A Python Package
cd ./myproj
make dist
ls dist/*
Use VSCode To Develop Generated Project
- Start VSCode, install Remote extention.
- Attach to your container : myproj-devenv in VSCode
- Open terminal. Your project folder attached to container already. Just run
.vscode/install-vscode-extensions.sh
- Reload widdow. Then python extension and other cool extensions available.
And Even More ...
Format Codes Of Your Project
cd ./myproj
make autopep8
Distribute Your Project To PyPi
- Set up two envs:
TWINE_USERNAME=<your pypi username>
TWINE_PASSWORD=<your pypi password>
- Run
cd ./myproj
make dist-upload
Source code
Prerequisition
- docker: ">= 17.06"
- docker-compose: ">= 1.26"
Install From Code
make install
Run
make run
make run ARGS="-h"
Dist
make dist
Release files for pyquick 0.0.1a6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyquick-0.0.1a6.tar.gz | 14.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyquick-0.0.1a6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.6 kB
Release files / pyquick-0.0.1a6.tar.gz
| Download URL | pyquick-0.0.1a6.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
184c730d087192213345f9f1dc43cfbb4c984ec6efb517cfa23f9d7646ea3696
|
|
BLAKE2b-256 checksum How to use checksums |
e4ec2e61e4f1ed88993d00be68337908922b428cb14f9b6154a6c1817efd9c42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9
|
Release files / pyquick-0.0.1a6-py3-none-any.whl
| Download URL | pyquick-0.0.1a6-py3-none-any.whl |
|---|---|
| Size | 20.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c2b2133a38f9ff503ca6c6d79754dd0ebcf3c68d4b556538c118c5b2323a6891
|
|
BLAKE2b-256 checksum How to use checksums |
ad7d39ae2a5a1a219a6bf05f0ee95054d4ee14662dc30597910d878fbb956a83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.9
|