3 ms·
Juno looks to be simple and the developer has chosen a good set of libraries to build it on. It is a demonstration of the inherent simplicity in using well writ
by FraaJad 17y ago
Juno looks to be simple and the developer has chosen a good set of libraries to build it on. It is a demonstration of the inherent simplicity in using well written, WSGI aware python libraries.
IMO, web.py qualifies to be called "really lightweight"
take for instance the hello world code:
import web
urls = (
'/(.*)', 'hello'
)
app = web.application(urls, globals())
class hello:
def GET(self, name):
if not name:
name = 'world'
return 'Hello, ' + name + '!'
if __name__ == "__main__":
app.run()
This has two advantages over the Juno code..
1. more `REST`y (GET/POST)
2. `app` object is a wsgi callable..
More importantly, web.py does not need have any external library dependencies unless you choose to use mysql/postgresql when you have to install the db interface libraries. I had problem running the hello world Juno code because I did not have pysqlite2 installed.. huh? why do I need pysqlite2 to return a string?
While some may object saying that web.py has a case of NIH, the code of web.py itself does not reflect any such attitude. The whole library is just a directory of aptly named modules. You can plop it anywhere in the python path and start coding ..