Karloop introduction--hello World Hello, today for you to introduce a very lightweight web development framework, Karloop framework. Using Python development First we download the Karloop source for installation. Download the source address into

Source: Internet
Author: User



Hello everyone, today we introduce a very lightweight web development framework, Karloop framework. Developing with Python



First we download Karloop source for installation.



Source Address



After the download is successfully unzipped, enter the extracted path, enter the terminal, Run command: sudo python setup.py install



If it is a window system, open cmd, run: Python setup.py install



After the download was successfully installed, we wrote a hello.py



The contents are as follows:





# coding=utf-8
from karloop.KarlBaseApplication import BaseApplication  
from karloop.KarlBaseResponse import BaseResponse  


class HelloHandler(BaseResponse):  
    def get(self):  
       return self.response("hello world")  


handlers = {
    "/hello": HelloHandler
}


class HelloApplication(BaseApplication):
    def __init__(self):
        super(HelloApplication, self).__init__(handlers=handlers)


if __name__ == "__main__":
    application = HelloApplication()
    application.listen(port=8888)
    application.run()
At this point, save, run Python hello.py, visit Http://localhost:8888/hello, and the Hello World will appear.





Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.



Karloop introduction--hello World Hello, today for you to introduce a very lightweight web development framework, Karloop framework. Using Python development First we download the Karloop source for installation. Download the source address into


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.