Skip to main content

a fast and simple micro-framework for small web applications

Project description


eweb(easy web) is a fast and simple micro-framework for small web applications. Its goal is to enable you to develop web applications in a simple and understandable way.

With it, you don't need to know the HTTP protocol, or how Python communicates with JavaScript.



Create a file, such as

from eweb import Server

def hello(name):
    return 'hello %s!' % name

if __name__ == '__main__':
    server = Server(port=5000)['hello'] = hello


  1. Create a folder named static
  2. Create a HTML file in the static folder, such as index.html:
<!DOCTYPE html>
   <meta charset="UTF-8">
   <script src="/service.js"></script>
   //say hello'hello', {'name': 'eweb'}, function(data){
       Anything you want to do


Run the Then, visit http://localhost:5000/index.html in your browser. You will get alert message "hello eweb!".

It's also easy if you want to develop desktop applications with eweb. At this point, usually, you need a callback function and a random port to start the server. What you need to do will be like this:

from eweb import Server

def hello(name):
    return 'hello %s!' % name

def callback():
    print('Server startup completed!')
    import webbrowser'http://localhost:%s/index.html' % server.port)

if __name__ == '__main__':
    server = Server(port=None)['hello'] = hello

Run, then, after the server is started, the index.html page will open automatically in the browser.


The static folder is a resource folder, and files under this folder can be accessed directly. So, usually, HTML, CSS, and JavaScript files should be placed in this folder, and other private files should not be placed in this folder.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eweb-0.0.6.tar.gz (4.1 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page