An Apache Wicket-like component based WSGI framework
Project description
Ayame is a component based WSGI framework. It is inspired by Apache Wicket, Apache Click and Flask.
Requirements
Python 3.8+
Werkzeug
secure-cookie
Example Application
app.wsgi app/ HelloWorld.html
app.wsgi
from ayame import Ayame, Page
from ayame.basic import Label
class HelloWorld(Page):
def __init__(self):
super().__init__()
self.add(Label('message', 'Hello World!'))
application = Ayame(__name__)
map = application.config['ayame.route.map']
map.connect('/', HelloWorld)
HelloWorld.html
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ayame="http://hattya.github.io/ayame">
<head>
<title>HelloWorld</title>
</head>
<body>
<p ayame:id="message">...</p>
</body>
</html>
License
Ayame is distributed under the terms of the MIT License.
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
ayame-0.3.tar.gz
(91.5 kB
view details)
Built Distribution
ayame-0.3-py3-none-any.whl
(47.6 kB
view details)
File details
Details for the file ayame-0.3.tar.gz
.
File metadata
- Download URL: ayame-0.3.tar.gz
- Upload date:
- Size: 91.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ed182b3bf3fb5bcc258961656232fbadec8f892530ace4f5f612af4ab48d934 |
|
MD5 | cfca8c1a2e4896e0ca1ef83a9f4bf27d |
|
BLAKE2b-256 | 4bc5886648ce6d091a803af6f5d3874a22be46b58c5f5940b7a39033cdb50eb1 |
File details
Details for the file ayame-0.3-py3-none-any.whl
.
File metadata
- Download URL: ayame-0.3-py3-none-any.whl
- Upload date:
- Size: 47.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05946aa715db6e5765229609c6497eb09d568e8b59485d01b414558181953b82 |
|
MD5 | 1ee02d2b15939e1fa7b4cfc1363d770b |
|
BLAKE2b-256 | 841cd3bc2105b88007dc189b011b30b2f3e64b14e482c739120d18ea045b452d |