Metadata-Version: 2.1
Name: hypothesis-api
Version: 1.0.1
Summary: Python wrapper for the Hypothesis annotation system
Home-page: https://github.com/judell/hypothesis
Author: Jon Udell
Author-email: judell@hypothes.is
License: UNKNOWN
Description: # Hypothesis
        
        A python wrapper for the Hypothesis API
        ## Create an annotation using a TextQuoteSelector
        
        ```
        h = hypothesis.Hypothesis(username=USER, token=TOKEN)  # your h username and api token (from https://hypothes.is/account/developer)
        
        url = 'url of web page to annotate'
        exact = 'selected text (i.e. the quote)'
        prefix = '30 chars preceding the quote'
        suffix = '30 chars following the quote'
        title = 'title of the web page'
        tags = ["tag1", "tag2"]
        text = "body of annotation, can include [markup](http://example.com)"
           
        payload = {
            "uri": url,
            "target": 
                [{
                    "source": [url],
                    "selector": 
                        [{
                            "type": "TextQuoteSelector", 
                            "prefix": prefix,
                            "exact": exact,
                            "suffix": suffix
                            }
                         ]
                }], 
            "tags": tags,
            "text": text,
             "document": {
                 "title": [title]
             },
             "permissions": h.permissions,
             "group": h.group
          }
        
        r = h.post_annotation(payload)
        print r.status_code
        ```
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
