Skip to content

jwaxy/PyWebic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PyWebic: a Python library for dynamic web development.

PyWebic is a Python library designed for dynamic web development. The name comes from a combination of 'Python' and 'Webic', which is a made-up word representing the idea of a dynamic web. I chose this name because it aligns with the library's goal of making web development more dynamic and efficient using Python.

Installation:

pip install git+https://github.com/jwaxy/PyWebic.git

Example:

example.py

import asyncio
from pywebic import WebServer

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)

srv = WebServer(loop=loop)

loop.run_until_complete(srv.run())
loop.close()

index.html

<!DOCTYPE html>
<html>
<head>
	<title>PyWebic Example</title>
	<style>
		body {
			background-color: #f0f0f0;
			font-family: Arial, sans-serif;
			font-size: 16px;
			color: #333;
			margin: 0;
			padding: 0;
		}
		h1 {
			font-size: 32px;
			color: #0077ff;
			margin: 0;
			padding: 16px;
			text-align: center;
		}
		p {
			margin: 0;
			padding: 8px;
		}
	</style>
</head>
<body>
	<h1>PyWebic Example</h1>
	<p>This is a paragraph.</p>
    <p>The current time is <?py from datetime import datetime
print(datetime.now().strftime('%H:%M:%S')) ?></p>
</body>
</html>

Result:

Image of the result

About

PyWebic: a Python library for dynamic web development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published