Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nprapps/comida
Food options near NPR HQ - Using Slack Custom Commands & AWS API Gateway & AWS Lambda
https://github.com/nprapps/comida
lambda slack
Last synced: about 1 month ago
JSON representation
Food options near NPR HQ - Using Slack Custom Commands & AWS API Gateway & AWS Lambda
- Host: GitHub
- URL: https://github.com/nprapps/comida
- Owner: nprapps
- Created: 2017-02-22T17:21:41.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-22T22:42:13.000Z (almost 8 years ago)
- Last Synced: 2024-11-07T04:43:17.712Z (3 months ago)
- Topics: lambda, slack
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 7
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
comida
==============* [What is this?](#what-is-this)
* [Assumptions](#assumptions)
* [What's in here?](#whats-in-here)
* [Bootstrap the project](#bootstrap-the-project)
* [Run the project](#run-the-project)What is this?
-------------Hungry? `comida` uses a combination of slack custom command & aws API gateway & aws lambda functions to scrape the real time data at [http://foodtruckfiesta.com/](http://foodtruckfiesta.com/) and send it back to you.
Assumptions
-----------The following things are assumed to be true in this documentation.
* You are running OSX.
* You are using Python 2.7. (Probably the version that came OSX.)
* You have [virtualenv](https://pypi.python.org/pypi/virtualenv) and [virtualenvwrapper](https://pypi.python.org/pypi/virtualenvwrapper) installed and working.
* You have NPR's AWS credentials stored as environment variables locally.For more details on the technology stack used with the app-template, see our [development environment blog post](http://blog.apps.npr.org/2013/06/06/how-to-setup-a-developers-environment.html).
What's in here?
---------------The project contains the following folders and important files:
* ``dispatcher`` -- Where are dispatcher lambda function code lives
* ``worker``-- Where the worker lambda function code lives
* ``test``-- local tests to check that our scraper works locally
* ``data`` -- Data files, such as those used to generate HTML.
* ``fabfile.py`` -- [Fabric](http://docs.fabfile.org/en/latest/) commands for automating setup and deployment
* ``requirements.txt`` -- Python requirements.Bootstrap the project
---------------------To bootstrap the project:
```
cd comida
mkvirtualenv comida
pip install -r requirements.txt
```Run the project
---------------Review the code for your lambda function, include all the required libraries in `code/requirements.txt`
Create a function in your AWS lambda environment.
Then run:
```
fab deploy:FUNCTION_NAME
```Where `FUNCTION_NAME` is the name of the created lambda function