Base files

This commit is contained in:
Gavin M. Roy 2017-04-26 17:49:58 -04:00
commit 2fc5bad5e8
4 changed files with 158 additions and 0 deletions

58
.gitignore vendored Normal file
View file

@ -0,0 +1,58 @@
# Editor
*.swp
*.swo
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
# C extensions
*.so
# Distribution / packaging
.Python
env/
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.coverage
.cache
nosetests.xml
coverage.xml
# Translations
*.mo
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
# Rope
.ropeproject
# Django stuff:
*.log
*.pot
# Sphinx documentation
docs/_build/
.idea

25
LICENSE Normal file
View file

@ -0,0 +1,25 @@
Copyright (c) 2017 AWeber Communications
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* 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.
* Neither the name of Sprockets 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER OR 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.

3
MANIFEST.in Normal file
View file

@ -0,0 +1,3 @@
include requires/installation.txt
include LICENSE
include README.rst

72
README.rst Normal file
View file

@ -0,0 +1,72 @@
sprockets.mixins.http
=====================
HTTP Client Mixin for Tornado RequestHandlers.
|Version| |Travis| |CodeCov| |Docs|
Installation
------------
``sprockets.mixins.http`` is available on the
`Python Package Index <https://pypi.python.org/pypi/sprockets.mixins.http>`_
and can be installed via ``pip`` or ``easy_install``:
.. code-block:: bash
pip install sprockets.mixins.http
Documentation
-------------
https://pythonhosted.org/sprockets.mixins.http
Requirements
------------
- pycurl
- tornado>=4.2.0,<5
Example
-------
This examples demonstrates the most basic usage of ``sprockets.mixins.http``
.. code:: bash
python my-example-app.py
.. code:: python
import json
from tornado import gen, web
from sprockets.mixins import amqp
def make_app(**settings):
return web.Application(
[
web.url(r'/', RequestHandler),
], **settings)
class RequestHandler(http.HTTPClientMixin,
correlation.HandlerMixin,
web.RequestHandler):
@gen.coroutine
def get(self, *args, **kwargs):
response = yield self.http_fetch('https://www.google.com')
License
-------
``sprockets.mixins.http`` is released under the `3-Clause BSD license <https://github.com/sprockets/sprockets.mixins.http/blob/master/LICENSE>`_.
.. |Version| image:: https://badge.fury.io/py/sprockets.mixins.http.svg?
:target: http://badge.fury.io/py/sprockets.mixins.http
.. |Travis| image:: https://travis-ci.org/sprockets/sprockets.mixins.http.svg?branch=master
:target: https://travis-ci.org/sprockets/sprockets.mixins.http
.. |CodeCov| image:: http://codecov.io/github/sprockets/sprockets.mixins.http/coverage.svg?branch=master
:target: https://codecov.io/github/sprockets/sprockets.mixins.http?branch=master
.. |Docs| image:: https://img.shields.io/badge/docs-pythonhosted-green.svg
:target: https://pythonhosted.com/sprockets.mixins.http