Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbrzt committed Feb 6, 2015
0 parents commit 11b0055
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 0 deletions.
26 changes: 26 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Copyright © 2015 Jakub Roztocil <jakub@roztocil.co>

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Neither the name of The author nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 changes: 28 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
httpie-http2
============

Experimental HTTP/2 plugin for `HTTPie <http://httpie.org>`_.


Installation
------------

.. code-block:: bash
$ pip install httpie-http2
Usage
-----

.. code-block:: bash
$ http https://host
Requirements
------------

* hyper_

.. _hyper: https://github.com/Lukasa/hyper
20 changes: 20 additions & 0 deletions httpie_http2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
HTTP/2 transport plugin for HTTPie.
"""
from httpie.plugins import TransportPlugin
from hyper.contrib import HTTP20Adapter


__version__ = '0.0.1'
__author__ = 'Jakub Roztocil'
__licence__ = 'BSD'


class HTTP2TransportPlugin(TransportPlugin):

name = 'HTTP/2 transport'
prefix = 'https://'

def get_adapter(self):
return HTTP20Adapter()
39 changes: 39 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from setuptools import setup


setup(
name='httpie-http2',
description='HTTP/2 plugin for HTTPie.',
long_description=open('README.rst').read().strip(),
version='0.0.1',
author='Jakub Roztocil',
author_email='jakub@roztocil.co',
license='BSD',
url='https://github.com/jakubroztocil/httpie-http2',
download_url='https://github.com/jakubroztocil/httpie-http2',
py_modules=['httpie_http2'],
zip_safe=False,
entry_points={
'httpie.plugins.transport.v1': [
'httpie_http2 = httpie_http2:HTTP2TransportPlugin'
]
},
install_requires=[
'httpie>0.9.0',
'hyper'
],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Environment :: Plugins',
'License :: OSI Approved :: BSD License',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Utilities'
],
)

0 comments on commit 11b0055

Please sign in to comment.