Ingestion Service Data Endpoint using Attachments

I am looking to use the Ingestion Service data endpoint (not the files endpoint) with the Python

Is there example code in Python using the api/training/data endpoint?

How would one modify the following to use attachments[]?

res ='',
								'x-api-key':   'ei_...',                            
								'x-file-name': 'mark.jpg',
								'x-label':     'mark', })

An alternate solution might be if someone could help convert the cURL syntax:

-F attachments[]="@metadata.json;type=application/json" \
-F attachments[]="@mark.jpg;type=image/jpeg"

into an argument compatible with the Python

Do not use the data endpoint since it is obsolete. Use the files endpoint instead. See this for example code of how to use the files endpoint and recursively upload files going thru sub-folders. The sub-folders are the class names so we can automagically label each file.