Skip to main content

A micro web framework

Project description


Webgo is a micro web framework.

It addresses a couple of problems:

  • Mapping URL to objects

  • Loading static files

  • Performing DB operations through ORM


Python 3.6+


$ pip3 install webgo


There is a simple implementation in demo directory, You can imitate it to build your own.


$ webgo demo

and access: http://localhost:8080

note: the work directory must be the same as project


Project Structure

You must construct project structure like this:

And import all .py files in

├── static
│   ├── css
│   │   └── demo.css
│   └── js
│       └── demo.js
└── templates
    └── index.html

Object Mapping

You can map any URL to any function.

from webgo.handler import get

def hello(request):
    return 'hello world'


You can save and query data through sqlite by orm.

>>> from webgo.orm import IntegerField, TextField, Model
>>> class Demo(Model): 
>>>     age = IntegerField('age') 
>>>     name = TextField('name') 

>>> Model.create_table()                                                
Table Demo created

>>> one = Demo(age=12, name='Bob')                                          

>>> one.age = 15                                                           


>>>  1

>>>  one.age                                                               
>>>  15

>>> Demo(age=10, name='Tom').save()

>>> recset = Demo.objects.query()

>>> print(recset)
<Demo RecorcdSet (1,2)>

Project details

Download files

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

Files for webgo, version 0.14.0
Filename, size File type Python version Upload date Hashes
Filename, size webgo-0.14.0-py3-none-any.whl (10.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size webgo-0.14.0.tar.gz (7.4 kB) File type Source Python version None Upload date Hashes View

Supported by

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