diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4a5430f --- /dev/null +++ b/.gitignore @@ -0,0 +1,134 @@ +# Created by .ignore support plugin (hsz.mobi) +### Python template +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre ptype checker +.pyre/ +/.idea/ +.idea/.gitignore +.idea/Chess.iml +.idea/inspectionProfiles/ +.idea/misc.xml +.idea/modules.xml +.idea/sonarlint/ +.idea/vcs.xml \ No newline at end of file diff --git a/README.md b/README.md index d095193..cb6fd6d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # no-compass-required Beginner python project exploring the use of the Google Maps API to collect business contact information +You will need an API Key: +https://developers.google.com/maps/documentation/maps-static/get-api-key + Current Project Phase Phase 1: * Setup the API pulls for GMaps diff --git a/key.py b/key.py new file mode 100644 index 0000000..8cb0e31 --- /dev/null +++ b/key.py @@ -0,0 +1 @@ +key = {YOUR_API_KEY} diff --git a/no-compass.py b/no-compass.py new file mode 100644 index 0000000..adc6cb5 --- /dev/null +++ b/no-compass.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python3 + +from flask import Flask, render_template, jsonify +import requests +from key import key + +app = Flask(__name__) + +search_url = "https://maps.googleapis.com/maps/api/place/textsearch/json" +details_url = "https://maps.googleapis.com/maps/api/place/details/json" + + +@app.route("/", methods=["GET"]) +def retrieve(): + return render_template('layout.html') + + +@app.route("/sendRequest/") +def results(query): + url = "https://www.google.com" + return jsonify({'result': url}) + + +if __name__ == '__main__': + app.run(debug=True)