Skip to content

Latest commit

 

History

History
67 lines (60 loc) · 1.46 KB

File metadata and controls

67 lines (60 loc) · 1.46 KB

PyQaver

PyQaver is a PHP like WebServer for Python.
It comes with some of PHP's Features

Installation

Install PyQaver Using pip or pip3
pip

pip install PyQaver

pip3

pip3 install PyQaver

Usage

PyQaver is easy to use,
and Does Not Require much Configuration.

index.py

from PyQaver import Server

server = Server()
server.start("localhost",8080)

PyQaver on default it is set to only parse Python codes in .htm and .html files.
Which you can change with the Accept Class.
index.py

from PyQaver import Server,Accepts

accepts = Accepts();
accepts.reset([".html",".js"])

server = Server()
server.start("localhost",8080)

This will tell PyQaver to parse Python Codes in .html and .js files.

This is an example .js file.
script.js

console.log("Hello From JavaScript");
<?python
print("console.log('Hello From Python')")
?>

index.html

<html>
<head>
<title>PyQaver</title>
<script src="script.js"></script>
</head>
<body>
<?python
print("<h1>Hello From PyQaver!</h1>")
?>
</body>
</html>

You can also import modules too and access the filesystem.
Checkout Some cool demos here

Contribution

PyQaver is still new and open to contributions.
Happy Coding