Skip to content

sohail535/flasky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flasky

Trying to understand how python web frameworks work by copying the famous flask micro framework.

How to install?

Create a virtual env and install flit

$ pip install flit
$ git@github.com:sohail535/flasky.git
$ cd flasky
$ flit install --symlink

How to use it?

# hello.py
from flasky import Flasky

class Hello:
    def GET(self):
        return 'Hello flasky!!'

class Greet:
    def GET(self, message):
        return 'Hello ' + message + '!!'

urls = [
    ('/', Hello),
    ('/greet/<message>', Greet)
]

app = Flasky(urls)

if __name__ == '__main__':
    app.debug = True
    app.run()

Now run python hello.py

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages