From 3ec2ad16b7ff8f2a1dfbe038289bae883759c86a Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 21 May 2020 17:21:36 +0200 Subject: [PATCH] Add shell.nix and test program --- .gitignore | 1 + app/dummy_request.py | 16 ++++++++++++++++ shell.nix | 21 +++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 .gitignore create mode 100644 app/dummy_request.py create mode 100644 shell.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7bb7d67 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +app/__pycache__ diff --git a/app/dummy_request.py b/app/dummy_request.py new file mode 100644 index 0000000..9e5e3cd --- /dev/null +++ b/app/dummy_request.py @@ -0,0 +1,16 @@ +from requests import get + + +def dummy_request(url): + request = get(url) + print(request.text) + + +def main(): + dummy_request( + "https://opendata.paris.fr/api/records/1.0/search/?dataset=velib-disponibilite-en-temps-reel&q=&facet=name&facet=is_installed&facet=is_renting&facet=is_returning&facet=nom_arrondissement_communes" + ) + + +if __name__ == "__main__": + main() diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..c32bc53 --- /dev/null +++ b/shell.nix @@ -0,0 +1,21 @@ +{ pkgs ? import { } }: + +with pkgs.python37Packages; + +pkgs.mkShell { + buildInputs = [ + # Dependencies + pandas + requests + flask + altair + pytest + # Development tools + black + isort + pyflakes + python-language-server + pyls-black + pyls-isort + ]; +}