From 80a44db6004082f89b06fa9468baa0c22c83bf4c Mon Sep 17 00:00:00 2001 From: Jan Allersma Date: Jan 17 2019 18:14:02 +0000 Subject: Initial commit. --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f229360 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +requests diff --git a/README.md b/README.md new file mode 100644 index 0000000..2dc38e9 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# Login frontend that shows login attempts. + +> Since this repository is part of an example, cloning this project is not +> that useful without the rest of the example packages. See the +> [example folder](https://pagure.io/Ambassade/blob/master/f/example) for +> the complete example. + +This is an example [Ambassade](https://pagure.io/Ambassade) package used as +demonstration for Ambassade's capabilities. + +## Running + +run `ambassade run` from the project root. diff --git a/ambassade.json b/ambassade.json new file mode 100644 index 0000000..74c65d9 --- /dev/null +++ b/ambassade.json @@ -0,0 +1,23 @@ +{ + "build": { + "linux": "echo no build command", + "os-x": "echo no build command", + "windows": "echo no build command" + }, + "deps": { + "linux": { + "requests": "git clone git://github.com/requests/requests.git --depth=1" + }, + "os-x": { + "requests": "git clone git://github.com/requests/requests.git --depth=1" + }, + "windows": { + "requests": "git clone git://github.com/requests/requests.git --depth=1" + } + }, + "run": { + "linux": "python3 ./main.py", + "os-x": "python3 ./main.py", + "windows": "python3 ./main.py" + } +} \ No newline at end of file diff --git a/dep_config/requests.json b/dep_config/requests.json new file mode 100644 index 0000000..6feb895 --- /dev/null +++ b/dep_config/requests.json @@ -0,0 +1,12 @@ +{ + "build": { + "linux": "pip install ./dep/requests --user", + "os-x": "pip install ./dep/requests --user", + "windows": "pip install ./dep/requests --user" + }, + "run": { + "linux": "", + "os-x": "", + "windows": "" + } +} diff --git a/main.py b/main.py new file mode 100644 index 0000000..b9f2688 --- /dev/null +++ b/main.py @@ -0,0 +1,10 @@ +import requests +#import json + +query = "q=username:" + "foo" + " AND success:" + "false" +pretty = "pretty=true" +params = "?" + query + "&" + pretty + +request = requests.get('http://localhost:9200/login_test/_search' + params) + +print(request.text)