I assume by "define" you mean something like "discover", since there's not usually a good reason to change the existing values.
A good way to start is by looping through and printing some attributes:
prs = Presentation("my-deck.pptx")
for slide in prs.slides:
for shape in slide.shapes:
print("id: %s, type: %s" % (shape.shape_id, shape.shape_type))
You can get as elaborate as you want with this, using any of the slide and/or shape attributes listed in the API documentation here:
https://python-pptx.readthedocs.io/en/latest/api/shapes.html#shape-objects-in-general
To look up a shape by id (or name) you need code like this:
def find_shape_by_id(shapes, shape_id):
"""Return shape by shape_id."""
for shape in shapes:
if shape.shape_id == shape_id:
return shape
return None
or if you doing a lot of it you can use a dict for that job:
shapes_by_id = dict((s.shape_id, s) for s in shapes)
Which then gives you all the handy methods like:
>>> 7 in shapes_by_id
True
>>> shapes_by_id[7]
<pptx.shapes.Shape object at 0x...>