Published: Fri, Jan 24, 2014 at 3:51pm

Tangled Web is a resource oriented Web framework that runs on Python 3.3+.

A Tangled Web application consists of an Application, Resources, and Representations. There are no "views" or "controllers". There are also no thread locals.

The framework and this site are both under active development (get the code here).


from wsgiref.simple_server import make_server

from tangled.web import Application, Resource

class Hello(Resource):

    def GET(self):
        if 'name' in self.urlvars:
            content = 'Hello, {name}'.format(**self.urlvars)
            content = 'Hello'
        return content

if __name__ == '__main__':
    settings = {
        'debug': True,
    app = Application(settings)
    app.mount_resource('hello', Hello, '/')
    app.mount_resource('hello_name', Hello, '/<name>')
    server = make_server('', 6666, app)

Source Code

It's on GitHub


Main documentation

Documentation for all tangled.* packages