Python - cllu/.rc GitHub Wiki
Stack
- Python: Python 3
- HTTP: requests
- Web: Flask
- ORM: SQLAlchemy
- Command line interface: docopt
Installation
I prefer to use the brewed Python 2, since it requires no sudo
$ brew install python python3
Global packages:
$ pip install supervisor # some packages are still Python 2 only
$ pip3 install ipython pandas jsonschema jinja2 tornado pyzmq
$ # ipython notebook requires jsonschema jinja2 tornado pyzmq
Always use virtual env
For Python 2.7, install virtualenv and use virtualenv venv
to create a new venv.
For Python 3.5, just use pyvenv-3.5 venv
to create a new venv.
A nice package is pip-tools
. After installation, you use requirements.in
to specify dependencies, use pip-compile
to generate the requirements.txt
file, and then pip-sync
to install package.