https://github.com/edsu/summoner
work with the Serial Solutions Summon API from Python
https://github.com/edsu/summoner
Last synced: about 1 year ago
JSON representation
work with the Serial Solutions Summon API from Python
- Host: GitHub
- URL: https://github.com/edsu/summoner
- Owner: edsu
- License: mit
- Created: 2014-02-17T13:50:28.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2016-11-23T19:05:25.000Z (over 9 years ago)
- Last Synced: 2025-05-12T13:11:44.485Z (about 1 year ago)
- Language: Python
- Size: 211 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
summoner
========
[](http://travis-ci.org/edsu/summoner)
Work with the [Serial Solutions Summon API](http://api.summon.serialssolutions.com/) from Python.
```python
from summoner import Summon
summon = Summon(summon_id, summon_secret_key)
results = summon.search("Web")
for doc in results['documents']:
print doc['Title']
```
You can pass in any of the optional [parameters](http://api.summon.serialssolutions.com/help/api/search/parameters) supported by the Summon API to the search method by using the parameter name without the `s.` prefix. So, for example to
turn [highlighting](http://api.summon.serialssolutions.com/help/api/search/parameters/highlight) off:
```python
results = summon.search("Web", hl=False)
```
Or to [facet](http://api.summon.serialssolutions.com/help/api/search/parameters/facet-field) by subject:
```python
results = s.search('World Wide Web', ff='SubjectTerms,or')
```
Develop
-------
To run the tests you'll need to set the `SUMMON_APP_ID` and `SUMMON_SECRET_KEY`
in your environment.
1. pip install -r requirements.txt
1. py.test test.py