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
Release history Release notifications | RSS feed
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)