Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mvexel/locationservice
A minimalist location posting service using Flask
https://github.com/mvexel/locationservice
Last synced: about 1 month ago
JSON representation
A minimalist location posting service using Flask
- Host: GitHub
- URL: https://github.com/mvexel/locationservice
- Owner: mvexel
- License: unlicense
- Created: 2013-08-19T22:26:26.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-26T04:10:09.000Z (over 11 years ago)
- Last Synced: 2024-10-21T23:08:47.590Z (3 months ago)
- Language: Python
- Size: 141 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
locationservice
===============A minimalist location posting service using Flask
Set it up
---------Install some prerequisites:
sudo apt-get install python-dev libapache2-mod-wsgi sqlite3 libsqlite3-dev
Clone this repo:
git clone https://github.com/mvexel/locationservice.git
Create a virtualenv to run this in:mkvirtualenv locationservice
Create a configuration file (or copy the example and adapt to your environment)cd locationservice
cp locationservice/settings_example.py locationservice/settings.pyInstall the app and dependencies:
python setup.py install
Edit the file `apache/locationservice.conf` and `wsgi/locationservice.wsgi` so that the path corresponds to where the locationservice app and virtualenv live.
Then add symlink it into the Apache `sites-enabled` directory:sudo ln -s /path/to/locationservice/wsgilocationservice.conf /etc/apache2/sites-enabled/
Restart Apache:sudo service apache2 restart
Finally, generate the SQLite database file:
curl -u admin:secret http://localhost/loc/generate_tables
Use it
------post a location:
curl -X POST http://localhost/loc/-111.9208/40.7764/
retrieve a list of locations:
curl -u admin:secret http://localhost/loc/list
Don't forget to change the credentials if you're actually going to use this.
Have fun.