An open API service indexing awesome lists of open source software.

https://github.com/technige/httpstream

HTTPStream is an HTTP client library for Python with an easy-to-use API and support for incremental JSON document retrieval.
https://github.com/technige/httpstream

Last synced: about 1 year ago
JSON representation

HTTPStream is an HTTP client library for Python with an easy-to-use API and support for incremental JSON document retrieval.

Awesome Lists containing this project

README

          

.. image:: https://travis-ci.org/nigelsmall/httpstream.png?branch=master
:target: https://travis-ci.org/nigelsmall/httpstream

==========
HTTPStream
==========

*HTTPStream* is an HTTP client library for Python that wraps the standard library HTTP client
with a convenient resource-based interface and also provides support for incremental JSON document
retrieval and RFC 6570 URI Templates.

Installation
============

HTTPStream is hosted on PyPI and so to install, simply use ``pip``::

pip install httpstream

Quick Start
===========

::

>>> from httpstream import get
>>> get("https://api.duckduckgo.com/?q=neo4j&format=json").content
{'Abstract': 'Neo4j is an open-source graph database, implemented in Java.',
'AbstractSource': 'Wikipedia',
'AbstractText': 'Neo4j is an open-source graph database, implemented in Java.',
'AbstractURL': 'https://en.wikipedia.org/wiki/Neo4j',
'Answer': '',
'AnswerType': '',
'Definition': '',
'DefinitionSource': '',
'DefinitionURL': '',
'Heading': 'Neo4j',
'Image': 'https://i.duckduckgo.com/i/4d74091a.jpg',
'Redirect': '',
'RelatedTopics': [{'FirstURL': 'http://duckduckgo.com/noSQL',
'Icon': {'Height': '', 'URL': '', 'Width': ''},
'Result': 'Structured storage - A NoSQL database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases.',
'Text': 'Structured storage - A NoSQL database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases.'},
{'FirstURL': 'http://duckduckgo.com/CODASYL',
'Icon': {'Height': '', 'URL': '', 'Width': ''},
'Result': 'CODASYL - CODASYL (often spelled Codasyl) is an acronym for "Conference on Data Systems Languages".',
'Text': 'CODASYL - CODASYL (often spelled Codasyl) is an acronym for "Conference on Data Systems Languages".'},
{'FirstURL': 'http://duckduckgo.com/Cypher_Query_Language',
'Icon': {'Height': '', 'URL': '', 'Width': ''},
'Result': 'Cypher Query Language',
'Text': 'Cypher Query Language'},
{'FirstURL': 'http://duckduckgo.com/c/Software_companies_of_Sweden',
'Icon': {'Height': '', 'URL': '', 'Width': ''},
'Result': 'Software companies of Sweden',
'Text': 'Software companies of Sweden'},
{'FirstURL': 'http://duckduckgo.com/c/Structured_storage',
'Icon': {'Height': '', 'URL': '', 'Width': ''},
'Result': 'Structured storage',
'Text': 'Structured storage'},
{'FirstURL': 'http://duckduckgo.com/c/NoSQL',
'Icon': {'Height': '', 'URL': '', 'Width': ''},
'Result': 'NoSQL',
'Text': 'NoSQL'},
{'FirstURL': 'http://duckduckgo.com/c/Free_software_programmed_in_Java',
'Icon': {'Height': '', 'URL': '', 'Width': ''},
'Result': 'Free software programmed in Java',
'Text': 'Free software programmed in Java'}],
'Results': [{'FirstURL': 'http://neo4j.org',
'Icon': {'Height': 16,
'URL': 'https://i.duckduckgo.com/i/neo4j.org.ico',
'Width': 16},
'Result': 'Official site',
'Text': 'Official site'}],
'Type': 'A'}

Full Documentation
==================

For further information on how to use HTTPStream, go to http://nigelsmall.com/httpstream.