Hi,
There's a JenkinsApi package for Python:
https://jenkinsapi.readthedocs.io/en/latest/
Not sure what is accessible during a pipeline or if this is just for completed build or old standard build for the Python API module (I haven't test this yet).
You probably could pass the current build result, current build number and the job name to your Python script so can reach the proper build info:
// Into Jenkins Pipeline
${env.JOB_BASE_NAME}
${env.BUILD_NUMBER}
${currentBuild.result} // take care not set until something went wrong
As for launching Python script from buidl step see above, just use console command and start the process, if you need some complexe return value, a file could be used. Make sure the command return 0 if you want to continue and doesn't return bad code, else you will need a try/catch into your pipeline script.
Hope this help and I understood you properly this time, if not let us know,
Jerome