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 __[PyBingSearch](https://github.com/tristantao/py-bing-search)__ which will no longer be updated as of Nov 14th 2016.

Intro
=====
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(s) for the corresponding service(s).

The modules require different microsoft keys for different services, so you'll need to get yours here (free for up to 1K/Mon for search): __[Subscribe for Free](https://www.microsoft.com/cognitive-services/en-us/sign-up)__

Installation
=====
#####for python 2.7.*

```sh
pip install py-ms-cognitive
```

#####for python 3.*

```sh
pip3 install py-ms-cognitive
```

*Requires the requests library.

Usage
=====

Remember to set the `API_KEY` as your own.

####For Web Results:

```py
>>> from py_ms_cognitive import PyMsCognitiveWebSearch
>>> search_term = "Python Software Foundation"
>>> search_service = PyMsCognitiveWebSearch('API_KEY', search_term)
>>> first_fifty_result= search_service.search(limit=50, format='json') #1-50
>>> second_fifty_result= search_service.search(limit=50, 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.

Source Distribution

py-ms-cognitive-0.2.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_ms_cognitive-0.2.2-py2.py3-none-any.whl (4.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file py-ms-cognitive-0.2.2.tar.gz.

File metadata

File hashes

Hashes for py-ms-cognitive-0.2.2.tar.gz
Algorithm Hash digest
SHA256 ce4b13e406275700dd5054915e4fb648236f1054a1f2741bbcfbe8291d93a2a5
MD5 ec54c13b11040e8303771ab9cbc38917
BLAKE2b-256 9a4b467990663939fb8e594c04360bbe1c4b6e1cb6d59404187ca24031dc8ae2

See more details on using hashes here.

File details

Details for the file py_ms_cognitive-0.2.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for py_ms_cognitive-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1de69dc18ba5a3b247490d903dec6e4aba3d3b4dfad68ba31b5b0f2510a4e600
MD5 bf6e1b7c85d4e6996d2435ef9c21244c
BLAKE2b-256 4e0a25c15b8ce89032a63f4eeed2058d2c8f99684b32b00d89177b9e6621e9dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page