Browse Source

Added python examples to README

Joe Ceresini 7 years ago
parent
commit
a1e0695166
1 changed files with 26 additions and 0 deletions
  1. 26 0
      README.md

+ 26 - 0
README.md

@@ -21,3 +21,29 @@ Sample output
 {"error": "Invalid http method", "result": null}
 ```
 
+# Python version
+
+## Simplified call using sets
+```
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi.txt" http://test.ceresini.com:5000/contains_all_chars_a
+{"result": true, "error": null}
+
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi-no-z.txt" http://test.ceresini.com:5000/contains_all_chars_a
+{"result": false, "error": null}
+
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi-allcaps.txt" http://test.ceresini.com:5000/contains_all_chars_a
+{"result": false, "error": null}
+```
+
+
+## Slower call iterating over the input string
+```
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi.txt" http://test.ceresini.com:5000/contains_all_chars_b
+{"result": true, "error": null}
+
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi-no-z.txt" http://test.ceresini.com:5000/contains_all_chars_b
+{"result": false, "error": null}
+
+[jceresini@slartibartfast]$ curl -H "Content-type: text/plain" -d "@testfiles/doi-allcaps.txt" http://test.ceresini.com:5000/contains_all_chars_b
+{"result": false, "error": null}
+```