picoweb - Web micro (well, pico) framework (with webserver, etc.)
Re: picoweb - Web micro (well, pico) framework (with webserver, etc.)
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.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: picoweb - Web micro (well, pico) framework (with webserver, etc.)
There were some questions how to implement authentication for picoweb apps, and examples for HTTP Basic auth were posted:
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: picoweb - Web micro (well, pico) framework (with webserver, etc.)
Turned out, this release of picoweb wasn't pushed to PyPI all this time . 1.5.2 with this change is released now.pfalcon wrote: ↑Wed Nov 28, 2018 7:14 pmRecently, 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.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: picoweb - Web micro (well, pico) framework (with webserver, etc.)
picoweb 1.5.4 was released: https://pypi.org/project/picoweb/1.5.4/
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: picoweb - Web micro (well, pico) framework (with webserver, etc.)
picoweb 1.6 was released: https://pypi.org/project/picoweb/1.6/ . Fixes for Unicode usage in templates.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Question : Static files
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
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