Skip to content

DevBash1/Qaver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A PHP like WebServer for Python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages