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.
- Host: GitHub
- URL: https://github.com/technige/httpstream
- Owner: technige
- License: apache-2.0
- Created: 2013-06-11T09:51:38.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2024-12-13T16:44:51.000Z (over 1 year ago)
- Last Synced: 2024-12-13T17:47:08.810Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 518 KB
- Stars: 12
- Watchers: 6
- Forks: 4
- Open Issues: 7
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
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.