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.0.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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