Coroutine based H2 Web backend framework built for the future.
Project description
=========
Hyper2Web
=========
Super Fast HTTP2 Framework for Progressive Web Application
Installation
############
To install Hyper2Web, run this command in your terminal:
.. code-block:: console
$ # due to a known issue, please install Curio manually
$ pip install git+https://github.com/dabeaz/curio.git
$ pip install hyper2web
This is the preferred method to install Hyper2Web, as it will always install the most recent stable release.
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.
.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
Dependency
##########
Python3.6
h2
curio
Quick Start
###########
Assuming you have a directory structure like::
your project/
--public/
--index.html
--index.js
...
--app.py
Your ``app.py`` looks like
.. code-block:: python
from hyper2web import app
if __name__ == '__main__':
# A basic callback style API is provided
# Function name is up to you
async def post_echo(request, response):
# Send the data received back to the client
await response.send(request.stream.data)
app = app.App(port=5000)
app.post('name', post_echo)
app.up()
Then run this script
.. code-block:: console
$ python app.py
That's it!
If you just want to serve static files, it's just 2 lines!
.. code-block:: python
from hyper2web import app
app.App(port=5000).up()
Docs
####
Documentation is hosted on hyper2web.readthedocs.io_.
.. _hyper2web.readthedocs.io: http://hyper2web.readthedocs.io
Example
#######
See the example folders for examples.
Test
####
.. code-block:: console
$ python -m unittest discover test
Run all tests under ``test/`` dir.
Misc
####
Why did I create this framework?
********************************
April 23rd, 2017, Sunday, I woke up and felt bored and decided to create my own HTTP2 web framework.
Since I had little or some prior web knowledge, this would be a super learning and fun project for me.
=======
History
=======
0.0.0 (2017-06-08)
------------------
* First release on PyPI.
Hyper2Web
=========
Super Fast HTTP2 Framework for Progressive Web Application
Installation
############
To install Hyper2Web, run this command in your terminal:
.. code-block:: console
$ # due to a known issue, please install Curio manually
$ pip install git+https://github.com/dabeaz/curio.git
$ pip install hyper2web
This is the preferred method to install Hyper2Web, as it will always install the most recent stable release.
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.
.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/
Dependency
##########
Python3.6
h2
curio
Quick Start
###########
Assuming you have a directory structure like::
your project/
--public/
--index.html
--index.js
...
--app.py
Your ``app.py`` looks like
.. code-block:: python
from hyper2web import app
if __name__ == '__main__':
# A basic callback style API is provided
# Function name is up to you
async def post_echo(request, response):
# Send the data received back to the client
await response.send(request.stream.data)
app = app.App(port=5000)
app.post('name', post_echo)
app.up()
Then run this script
.. code-block:: console
$ python app.py
That's it!
If you just want to serve static files, it's just 2 lines!
.. code-block:: python
from hyper2web import app
app.App(port=5000).up()
Docs
####
Documentation is hosted on hyper2web.readthedocs.io_.
.. _hyper2web.readthedocs.io: http://hyper2web.readthedocs.io
Example
#######
See the example folders for examples.
Test
####
.. code-block:: console
$ python -m unittest discover test
Run all tests under ``test/`` dir.
Misc
####
Why did I create this framework?
********************************
April 23rd, 2017, Sunday, I woke up and felt bored and decided to create my own HTTP2 web framework.
Since I had little or some prior web knowledge, this would be a super learning and fun project for me.
=======
History
=======
0.0.0 (2017-06-08)
------------------
* First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hyper2web-0.0.6.tar.gz
(22.2 kB
view details)
File details
Details for the file hyper2web-0.0.6.tar.gz
.
File metadata
- Download URL: hyper2web-0.0.6.tar.gz
- Upload date:
- Size: 22.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56b1f375a875b286f68e9c08397308c1ae1b31769ea95b09f68100745328d4d3 |
|
MD5 | 46a0ce94bc24ee0ee4ed4761cd4856c7 |
|
BLAKE2b-256 | 326d503f7023bd08ce7f3797226211129f9d4de57ee566e3d30fe5b36fac6417 |