Oldschool Web Development for Humans™
Project description
index.py
Although I've never used PHP, I like its hot-swap mechanism. I expect to use index.py to make Python's Web program deployment easier.
Install
pip install -U index.py
Or get the latest version on Github
git clone https://github.com/abersheeran/index.py
sudo python3 setup.py install
How to use
Execute the command index
under the path where you place your Web program.
Configuration
Environment variables
At startup, index automatically reads the configuration from the environment variable that begins with INDEX_
.
like this
INDEX_DEBUG=on
INDEX_ENV=pro
Config file
At the root of your web program, the configuration in config.json will be read when index starts.
example:
{
"dev": {
"debug": true,
},
"pro": {
"debug": false,
"port": 34567,
"host": "0.0.0.0"
}
}
List
-
ENV
ENV
is an important configuration that allows for the distinction between different configuration environments. -
LOG_LEVEL
log_level
has five values, the corresponding table to thelogging
is as followslog_level loggins "critical" logging.CRITICAL "error" logging.ERROR "warning" logging.WARNING "info" logging.INFO "debug" logging.DEBUG
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for index.py-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86c0632b34a285c0b86d2caa4f91c7ea04e0396d036d4cae9cc39e91ff7eddcb |
|
MD5 | dbe123b003f97a8ea8dd6141d11108e8 |
|
BLAKE2b-256 | 92a55db5dff3c4783de175d0d52dd4cd61ca6725f79e11cb4ec574a1d30db6b2 |