Skip to main content

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.

https://img.shields.io/pypi/v/ayame.svg https://github.com/hattya/ayame/actions/workflows/ci.yml/badge.svg https://semaphoreci.com/api/v1/hattya/ayame/branches/master/badge.svg https://ci.appveyor.com/api/projects/status/67nbqb4ej84liu9m?svg=true https://codecov.io/gh/hattya/ayame/branch/master/graph/badge.svg

Requirements

  • Python 3.6+

  • setuptools

  • 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.

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.2.zip (133.2 kB view hashes)

Uploaded Source

Built Distribution

ayame-0.2-py2.py3-none-any.whl (47.3 kB view hashes)

Uploaded Python 2 Python 3

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