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 details)
Built Distribution
File details
Details for the file wkweb-0.0.0.8.tar.gz
.
File metadata
- Download URL: wkweb-0.0.0.8.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70c91dfaf9f8c6b8c0560f1545ee4921e5238b260da7c7826d6ebd02bf720cc0 |
|
MD5 | 739b4b3309bfa4c93d315596eb4de105 |
|
BLAKE2b-256 | 167306691cdcbad03a1946e5a5a6e933b68e4d60407a5760d0f888f674027edb |
File details
Details for the file wkweb-0.0.0.8-py3-none-any.whl
.
File metadata
- Download URL: wkweb-0.0.0.8-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c37041eb81f6f469f7c1fbaec5bc60fc61fb3097ca6265cfe52b60d7fd4da458 |
|
MD5 | 083dfef80e9cba33966a33ae2a8e747c |
|
BLAKE2b-256 | 1118cb2e991d561defb5daab307730c688833a008ec91b7537a19e15d236f865 |