Skip to main content

An HTML preprocessor for Python

Project description

PyHP (Python Hypertext Preprocessor)

PyHP is a Python script that can be used to write Python code in HTML, then execute it and render it to a page.

Getting Started

Installation

To use this project, install it using pip:

pip install python-hypertext-preprocessor

Alternatively, clone the repository and install the dependencies:

git clone https://github.com/Benjymack/pyhp.git
cd pyhp
pip install -r requirements.txt

Running the example Flask server

To run a simple Flask server with the pip installed version, use the following command:

python -m pyhp server path/to/directory

If you cloned from GitHub:

python -m src.pyhp server examples

In both cases, the server will be available at http://localhost:5000/

Running individual files

To run an individual example file, use the following command:

python -m pyhp file path/to/file.pyhp

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-hypertext-preprocessor-1.1.1.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.

File details

Details for the file python-hypertext-preprocessor-1.1.1.tar.gz.

File metadata

File hashes

Hashes for python-hypertext-preprocessor-1.1.1.tar.gz
Algorithm Hash digest
SHA256 3c16a4b2590e9c45bbbe2c0088bcc41d17d14d4c5c06720b10666f65ffa0b62b
MD5 f0e89faf3ce034b21ca8304ffc64c983
BLAKE2b-256 9fda872fffc804ca2fbb0737ad010381f82e021b1d4f83703f0becfd33435d20

See more details on using hashes here.

File details

Details for the file python_hypertext_preprocessor-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_hypertext_preprocessor-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a31788ddc24eb3eb71e6faceb8eec0b850516941dc992851af4919b757ce3d4c
MD5 fd401f4db40dc0e76b31956afb973180
BLAKE2b-256 062fc7a6fca3025478ed4360fe5c043942cd9547ce9b7d42d6ea80d1c5f3af75

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