Skip to content

Small async Python web-framework done for perverts with love. Just for fun.

License

Notifications You must be signed in to change notification settings

sweetpalma/perver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐍 Perver: Async Web Framework

Copyright 2016 SweetPalma <sweet.palma@yandex.ru>
https://raw.githubusercontent.com/SweetPalma/Perver/master/logo.png

Perver is a small experimental web-framework with embedded async server. You just download it, include it and run it. And it just works - no other dependencies but Python Standart Library. Sounds easy? Take a look at example then:

Installation

Download this into your working directory. Dont forget, you need Python 3.4 or newer. Done, you're ready to go.

P.S. If your browser doesn't download it, simply displaying a text file - press on that link with right mouse button and choose "Save As".

Example: "Hello World" in perverted style

from perver import Perver
server = Perver()

@server.route('/')
def page_main(self):
    return self.redirect('/hello/perverts')

@server.route('/hello/{name}')
def page_hello(self, name):
    return 'Hello, ' + name

server.start('', 80)

Make a script or paste that in your Python console. Now open your localhost - and magic will happen! You can even type something different - if you like classical 'Hello World' more.

Features?

  • Server: You don't need any other server to test your code. Perfect for small projects and prototyping.
  • Asynchronous: It uses non-blocking IO, forget about creepy one-client issues in small frameworks.
  • Routing:: Requests to function-call mapping for clean and dynamic URLs.
  • Utilities: Batteries included - POST/GET, cookies, headers and other HTTP-related data.

License

See the LICENSE file for more information. And don't use my perverted python logo for anything else, please.

Credits

Hardly inspired by BottlePy.

Want more?

Read reference with examples.

About

Small async Python web-framework done for perverts with love. Just for fun.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages