Skip to main content

A python devkit for web development, based on flask.

Project description

wkweb -- A Python Devkit For Web Development, Based On Flask

Install

pip3 install wkweb

Usage

from web import Appication,NestableBlueprint
app=Appication(__name__)
@app.route('/')
def home():
    return 'Hello, World!'
app.run() # visit http://localhost:5000 in your browser
  • NestableBlueprint
from web import Appication,NestableBlueprint
app=Appication(__name__)
@app.route('/')
def home():
    return 'Hello, World!'

bpa=NestableBlueprint('a',__name__,static_map={'/':'./'})
bpb=NestableBlueprint('b',__name__,static_map={'/b':'./data'})
bpa.register_blueprint(bpb,url_prefix='/b')
app.register_blueprint(bpa,url_prefix='/a')
app.run() 
# visit in your browser:
# http://localhost:5000/ 
# http://localhost:5000/a 
# http://localhost:5000/a/b 

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

wkweb-0.0.0.8.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

wkweb-0.0.0.8-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page