https://github.com/strapdata/openfoodfacts
Demo Elassandra + Python
https://github.com/strapdata/openfoodfacts
Last synced: 9 months ago
JSON representation
Demo Elassandra + Python
- Host: GitHub
- URL: https://github.com/strapdata/openfoodfacts
- Owner: strapdata
- License: apache-2.0
- Created: 2018-05-16T17:34:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T02:08:07.000Z (about 3 years ago)
- Last Synced: 2025-05-08T00:18:47.283Z (9 months ago)
- Language: Python
- Size: 60.5 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Python Meetup
**Require python3**
## Standelone
Install the dependencies:
pip install -r requirements.txt
export PYTHONPATH="$(pwd)"
Import the data from Open Food Fact CSV:
wget https://fr.openfoodfacts.org/data/fr.openfoodfacts.org.products.csv -O fr.openfoodfacts.org.products.csv
python3 -m meetup.import
Start the web server:
python3 -m meetup.web
## Dockerized
Build the docker image:
make build
Run a docker container including the application, the importer and kibana:
make up
Stop the docker container:
make down
Check application logs:
make logs
Open a shell in the web container:
make shell
## Usage
* webapp [http://localhost:5000](http://localhost:5000)
* kibana [http://localhost:5601](http://localhost:5601)
## References
* [Open Food Facts](https://world-fr.openfoodfacts.org/)
* [Docker for python applications](http://tiborsimko.org/docker-for-python-applications.html)
* [Python cassandra driver](https://datastax.github.io/python-driver/index.html)
* [Python elasticsearch driver](https://elasticsearch-py.readthedocs.io/en/master/index.html)
* [Elassandra documentation](http://doc.elassandra.io/en/latest/enterprise.html#multi-user-kibana-configuration)
* [Cassandra COPY CSV](https://docs.datastax.com/en/cql/3.3/cql/cql_reference/cqlshCopy.html)
* [Configuring Kibana on Docker](https://www.elastic.co/guide/en/kibana/current/_configuring_kibana_on_docker.html)