1682 views|2 replies

1w

Posts

25

Resources
The OP
 

Micro Web Application Framework Featherweb [Copy link]

 

链接已隐藏,如需查看请登录或者注册
is a lean web application framework for MicroPython and esp8266 that requires very little RAM and resources to run

.

import featherweb
import gc

app = featherweb.FeatherWeb()

@app.route('/hello')
def Hello(request):
    """ Say Jello! """
    request.send("Jello!")

@app.route('/example.py')
def ExamplePy(request):
    """ Serve a binary file. """
    request.sendfile('/example.py')

def TimeoutCB():
    """ I'm bored.  What else needs to be done... """
    print("We came up for air.  May as well pick up the trash...")
    gc.collect()
    return True

app.run(callback=TimeoutCB)

Latest reply

The post by dc moderator is still so neat and beautiful. Thanks for sharing   Details Published on 2020-4-27 09:55
 
 

79

Posts

718

Resources
2
 

The post by dc moderator is still so neat and beautiful. Thanks for sharing

 
 
 

1w

Posts

25

Resources
3
 
MartinFowler posted on 2020-4-27 09:55 The post by the dc moderator is still so neat and beautiful. Thank you for sharing

 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list