The FuqIt Web Framework. Shit files into a dir, get some web.
I'm kind of tired of following the stupid rules of MVC and want to just try out making something where I shit files into a directory and they just work. This Python web framework (if you can call it that) is my first crack at something like that. I basically did this on a Saturday morning because I was bored. If you don't like it, then oh well, life goes on.
That's it. Look in this project's test/app/ directory to see me doing stupid crap with it to see if it works.
Easy, and designed to treat raw .html Jinja2 templates the same as a .py file module:
Examples:
It uses the python mimetypes module to figure out mimetypes by extension. No, I don't know how to add new extensions to it.
It has ephemeral sessions based on cookies, which means that they go away when you reboot the process. To use sessions you can either use them raw from fuqit/sessions.py or just do this:
from fuqit.sessions import with_session@with_session def GET(variables, session): session['count'] = session.get('count', 1) + 1 return "COUNT: %d" % session['count']
You can play with the example by doing this::
./bin/fuqit run -chroot examples/test -app app
Then go to http://127.0.0.1:8000/ and you'll get my little demo testing app. It's in the app directory and just has some files for testing the rendering.
You can get help for run with:
./bin/fuqit help -for run
Here's how you do it:
Here's how you do it:
Remember that if you have say /myapp.py and you get a URL of /myapp/stuff/things, then this module will run and it'll get a web.sub_path == '/stuff/things'.
Here's how you do it:
If you actually host it you should have your fronting web server serve them straight out of there.
FuqIt took the public domain web.py database module and uses that. The best docs for it is currently from the Web.py folks over at http://webpy.org/docs/0.3/tutorial#databasing.
You use a database by doing two things:
That's it. Once you have that configure, the web variable in templates and modules will have a web.db variable for you to do database stuff with.
There are a few minor modifications to the default web.py that you need to know:
As I evolve web.py's DB I'll just call it the fuqit.data API and document it differently.
I will refer you to our official Mascot:
Do you have a load of money and are you looking for the next Meteor to waste it on? Well this project is currently looking for funding and it's already been on the top of HackerNews!
Act fast because pretty soon I'll have a spare Sunday and FuqIt will become more secure than both Meteor and Ruby On Rails and then you'll miss out on investing in the next hottest thing. You'll have to go buy some Gucci hand bags or a DVF dress to be in-fashion instead. Can't have that now.