Skip to main content

A simple lightweight python wrapper for the Microsoft Cognitive Services.

Project description

# py-ms-cognitive
Thin wrapper for the Microsoft Cognitive Services

A continuation of:

Extremely thin python wrapper for Microsoft Cognitive Services API. Please note that this module does not use the older Microsoft Azure DataMarket WebSearch API (deprecated Dec 15 2016). This module requires that you sign up for Microsoft Cognitive Services and acquire application key for the corresponding services.

The modules uses OAuth, so you'll need to get your key here (free for up to 1K/Mon):
* [Subscribe for Free](

#####for python 2.7.*

pip install py-ms-cognitive

#####for python 3.*

pip3 install py-ms-cognitive

*Requires the requests library.


Remember to set the `API_KEY` as your own.

####For Web Results:

>>> from py_ms_cognitive import PyMsCognitiveWebSearch
>>> search_term = "Python Software Foundation"
>>> search_service = PyMsCognitiveWebSearch(('Your-Api-Key-Here', search_term)
>>> first_fifty_result=, format='json') #1-50
>>> second_fifty_result=, format='json') #51-100

>>> print (second_fifty_result[0].snippet)
u'Python Software Foundation Home Page. The mission of the Python Software Foundation is to promote, protect, and advance the Python programming language, and to ...'

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for py-ms-cognitive, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size py_ms_cognitive-0.1.1-py2.py3-none-any.whl (6.4 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size py-ms-cognitive-0.1.1.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page