How do place an image to the side of a cube using the Python API
Here is python code which might serve as a start: http://web.purplefrog.com/~thoth/blender/python-cookbook/texture-one-cube-face.html

import bpy


def apply_image_to_face(template, fname):
    imgs = [ img for img in bpy.data.images if img.type=='IMAGE' and img.filepath==fname]
    if len(imgs)&lt;1:
        img = bpy.data.images.load(fname)
        print(img.name)
    else:
        img = imgs[0]

    tex = bpy.data.textures.new(fname, 'IMAGE')
    tex.image = img

    obj = bpy.data.objects.new("capybara", template.data)

    mat = template.data.materials[1].copy()

    tslot = mat.texture_slots[0]
    if tslot is None:
        tslot = mat.texture_slots.add()
    tslot.texture = tex
    tslot.texture_coords = 'UV'

    obj.material_slots[1].link = 'OBJECT'
    print(obj.material_slots[1].link)
    obj.material_slots[1].material = mat
    print("argh "+obj.material_slots[1].link)

    return obj


# this needs to be the template object.
# It needs to already have a UV map.
# The first texture slot is for most of the cube.
# The second texture slot must exist and we will fill it with a newly-created material for the image
# one of the faces must already be assigned this second material.
template = bpy.data.objects["template"]
# template = bpy.context.active_object

obj = apply_image_to_face(template, "/home/thoth/art/drawing-practice/totoro.png")
obj.location= (0,1,0)
bpy.context.scene.objects.link(obj)


You have to have a template object named 'template'.  That object has to already have a UV map.  It has to have two materials.  The second material will be cloned to make the per-image materials.  At least one of the faces on the template object must use that second material (otherwise it never gets used to paint anything)

Blender 2.75a has a bug where when I set the material_slot[1].link = 'OBJECT' it does not stick.  It reverts to 'DATA' right after I assign material_slot1.material .  A fix for this is already in the tracker and will probably be in the next release of blender.

The code above would have to be adapted if you have your own RGB pixel data instead of a file in the filesystem.   Change out the part that does bpy.data.images.load(fname) with something like getGradientImage() from this bathymetry script:

def getGradientImage():
    """rainbow gradient image"""
    rval = bpy.data.images.get("gradient")
#    print(rval)
    if rval is None:
        rval = bpy.data.images.new("gradient", 1, 6)

        rval.pixels = [
            #R,G,B,A,
            1,0,1,1, # magenta
            0,0,1,1, # blue
            0,1,1,1, # cyan
            0,1,0,1, # green
            1,1,0,1, # yellow
            1,0,0,1, # red
        ]
        # if we don't pack the image into the .blend, it will be lost when you re-load the project
        rval.pack(True)
    return rval


Of course, you'll want to give each data set its own image name instead of "gradient".