Skip to main content

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 the logging is as follows

    log_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

index.py-0.0.3.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

index.py-0.0.3-py2.py3-none-any.whl (11.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file index.py-0.0.3.tar.gz.

File metadata

  • Download URL: index.py-0.0.3.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6

File hashes

Hashes for index.py-0.0.3.tar.gz
Algorithm Hash digest
SHA256 576d88c90080ea1dc123222b6d02795a0b0565782ab9f524b9d7bcc01fac64ea
MD5 324346607365faf594d4b279fdd09b36
BLAKE2b-256 3b6800c7def7214599af99f9c2dec9c31b7398cf1510c728a56cdbadb259d304

See more details on using hashes here.

File details

Details for the file index.py-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: index.py-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6

File hashes

Hashes for index.py-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 86c0632b34a285c0b86d2caa4f91c7ea04e0396d036d4cae9cc39e91ff7eddcb
MD5 dbe123b003f97a8ea8dd6141d11108e8
BLAKE2b-256 92a55db5dff3c4783de175d0d52dd4cd61ca6725f79e11cb4ec574a1d30db6b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page