Page 3 of 3

Re: picoweb - Web micro (well, pico) framework (with webserver, etc.)

Posted: Wed Nov 28, 2018 7:14 pm
by pfalcon
Recently, more full-fledged version of "logging" module was contributed to micropython-lib. The original small version was captured as "ulogging". As picoweb is intended to run on the smallest systems, it by default use ulogging now. Please update your dependencies.

Re: picoweb - Web micro (well, pico) framework (with webserver, etc.)

Posted: Fri Dec 07, 2018 6:50 pm
by pfalcon
There were some questions how to implement authentication for picoweb apps, and examples for HTTP Basic auth were posted:

Re: picoweb - Web micro (well, pico) framework (with webserver, etc.)

Posted: Sun Feb 03, 2019 6:51 am
by pfalcon
pfalcon wrote:
Wed Nov 28, 2018 7:14 pm
Recently, more full-fledged version of "logging" module was contributed to micropython-lib. The original small version was captured as "ulogging". As picoweb is intended to run on the smallest systems, it by default use ulogging now. Please update your dependencies.
Turned out, this release of picoweb wasn't pushed to PyPI all this time :-(. 1.5.2 with this change is released now.

Re: picoweb - Web micro (well, pico) framework (with webserver, etc.)

Posted: Thu May 09, 2019 9:54 am
by pfalcon
picoweb 1.5.4 was released: https://pypi.org/project/picoweb/1.5.4/

Re: picoweb - Web micro (well, pico) framework (with webserver, etc.)

Posted: Mon Jun 17, 2019 3:25 pm
by pfalcon
picoweb 1.6 was released: https://pypi.org/project/picoweb/1.6/ . Fixes for Unicode usage in templates.

Question : Static files

Posted: Wed Jul 24, 2019 7:11 am
by jm54
I'm New with python and picoweb
Can y server several statics files with picoweb
for example i would like to server scripts *.js to /scripts
actualy i use for server jquery.js in /server.js

app.route("/jquery.js")
def index(req, resp):
yield from picoweb.start_response(resp, content_type = "application/javascript")
htmlFile = open('/www/jquery.js', 'r')
Cpt_line=0
while True:
lig=htmlFile.read(5000)
if lig=='':
break
print("Reading:",type(lig),"Count:",Cpt_line,'(long,mem_id):',len(lig),id(lig))
Cpt_line+=1
yield from resp.awrite(lig)

htmlFile.close()

how to use streamreader to read the static html file ?

THanks a lot