HTTP POST to my AWS dynamodb setup


I’m trying HTTP POST to send the results to my AWS dynamoDB.
What is the format of those results? What is the primary key? How are they indexed?


If you’re pushing via WebHooks, the format is described here:

If you’re pushing directly from the agent, the format is quite similar, and is described here:

The data is pure JSON, so no indexes or primary keys. The way that you organize the indexing I think would depend on your application and how you plan on using it.


Can I have a python code that gives me the highest confidence of the same license plate detected while Pulling from the Queue with Beanstalkc. Instead of outputting multiple results of the same license plate with different confidences as the same car passes by.


Here is Python 2x code for parsing the beanstalk results and printing only the top confidence plate and vehicle

import beanstalkc
import json
from pprint import pprint

beanstalk = beanstalkc.Connection(host='localhost', port=11300)


# For diagnostics, print out a list of all the tubes available in Beanstalk.
print beanstalk.tubes()

# For diagnostics, print the number of items on the current alprd queue.
except beanstalkc.CommandFailed:
    print "Tube doesn't exist"

# Watch the "alprd" tube; this is where the plate data is.

# Loop forever
while True:

    # Wait for a second to get a job. If there is a job, process it and delete it from the queue.
    # If not, return to sleep.
    job = beanstalk.reserve(timeout=1.0)
    if job is None:
        print "No plates available right now, waiting..."
        plates_info = json.loads(job.body)

    # Do something with this data (e.g., match a list, open a gate, etc.).
    if 'data_type' not in plates_info:
        print "This shouldn't be here... all OpenALPR data should have a data_type"
    elif plates_info['data_type'] == 'alpr_results':
        print "Found an individual plate result!"
    elif plates_info['data_type'] == 'alpr_group':
        print "Found a group result!"
        print '\tBest plate: {} ({:.2f}% confidence)'.format(
        make_model = plates_info['vehicle']['make_model'][0]['name']
        print '\tVehicle information: {} {} {}'.format(
            ' '.join([word.capitalize() for word in make_model.split('_')]))
    elif plates_info['data_type'] == 'heartbeat':
        print "Received a heartbeat"

    # Delete the job from the queue when it is processed.