Need help with fuqit?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

457 Stars 39 Forks GNU Affero General Public License v3.0 60 Commits 2 Opened issues


The FuqIt Web Framework. Shit files into a dir, get some web.

Services available


Need anything else?

Contributors list

# 95,070
56 commits
# 190,325
3 commits

The FuqIt Web Framework

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.

How It Works

  1. fuqit init -into test
  2. ./bin/fuqit run -chroot test
  3. Browser http://localhost:8000/

That's it. Look in this project's test/app/ directory to see me doing stupid crap with it to see if it works.

Resolution Order

Easy, and designed to treat raw .html Jinja2 templates the same as a .py file module:

  1. If it's in /static/ it's a static file.
  2. If it has an extension it's a template.
  3. If it ends in / it's either /index.html or a module.
  4. Otherwise it's a module named after the path with / changed to . unless there is a directory with the same path, then this will produce a redirect.
  5. Modules are found by trying to import longest to shortest paths.


  • / -> /index.html or /
  • /the/stupid/place/stuff.txt -> jinja template same path
  • /the/other/place/index.html -> same thing
  • /mystuff/cool -> a module named
  • /dir/that/exists -> redirect to /dir/that/exists/
  • /mymodule/the/path/after/that -> import give it sub_path=/the/path/after/that

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/ 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']

Using It

You can play with the example by doing this::

./bin/fuqit run -chroot examples/test -app app

Then go to 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

Writing A .html Handler

Here's how you do it:

  1. Make a .html file in the app directory.
  2. Put jinja2 syntax stuff in it.
  3. You get a web variable to play with that has all the gear, including sessions, headers, response_headers, and a module function for easily loading code.
  4. Hit it with a browser. That's it.

Writing A Module Handler

Here's how you do it:

  1. Make a .py file with the name you want.
  2. Put either a run, GET, or POST method in it. run handles every possible request, GET or POST handles just those.
  3. Your method will get one parameter, web, which has .session, .headers, .app, and everything.
  4. Return a string for the body; a body, code, headers tuple; or just call"somefuqitpath.html", web)

Remember that if you have say / and you get a URL of /myapp/stuff/things, then this module will run and it'll get a web.sub_path == '/stuff/things'.

Static Files

Here's how you do it:

  1. mkdir app/static
  2. Put the static crap in there.
  3. Any URL with /static/ in front serves out of there.

If you actually host it you should have your fronting web server serve them straight out of there.


FuqIt took the public domain database module and uses that. The best docs for it is currently from the folks over at

You use a database by doing two things:

  1. Edit the file that fuqit makes for you. Inside there is an initial configuration that makes a db variable configured from the call.
  2. Change the data.database call to use the database you want. It's currently setup to use a SQLite3 database.

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. Database Modifications

There are a few minor modifications to the default that you need to know:

  1. It's renamed data so that it can be more than just for databases and so it doesn't conflict with the db variable in
  2. I added a web.db.get() function that's a reduced version of that is used to just get one record.

As I evolve's DB I'll just call it the API and document it differently.

But That's Magic!

I will refer you to our official Mascot:

Magic Is Awesome

Investor Statement

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!

HN Too Easy

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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.