curl --http1.1 --data-urlencode update@basic_insert.txt -H 'X-API-Key: <API KEY>' https://d176x3sh52.execute-api.us-west-2.amazonaws.com/development/rialto-sparql-loader
Where basic_insert.txt
is a text file with a sparql query like:
PREFIX dc: <http://purl.org/dc/elements/1.1/> INSERT DATA { <http://example/book3> dc:title 'A new book' ; dc:creator 'A.N.Other' . }
- Create a python virtual environment
- Activate your virtual environment
source env/bin/activate
- Install dependencies
pip install -r requirements.txt
pytest -vv -k unit
- Start localstack and blazegraph via docker.
docker-compose up
- Run the test
AWS_ACCESS_KEY_ID=999999 AWS_SECRET_ACCESS_KEY=1231 pytest -vv
Per the AWS Documentation, a deployment package is made from the virtualenv
installed dependencies.
- Create a python virtual environment
- Activate your virtual environment
source env/bin/activate
- Install dependencies
pip install -r requirements.txt
- Create zip file
zip sparql-loader.zip handler.py sns_client.py neptune_client.py
- Copy dependencies into zip file
cd env/lib/python3.6/site-packages/
zip -r ../../../../sparql-loader.zip honeybadger isodate psutil rdflib rdflib_sparql requests
Note: We are packaging the minimum level of dependencies to try to keep our deployment package small.