I'm trying to create a script (Script #1) that writes a file that can only be read once globally, and then another script (Script #2) that reads this file only if it was never read before in the world.
Example Situation:
I create a CSV file with my Script #1 and email this CSV file to 10 people, who are on different computers.
All 10 try to run this file with my Script #2:
Expected behaviour:
The first person in the world to run Script #2 with this file gets a message saying they are the first person to read this file and can actually see the content.
2nd -10th person that try to read the file get a message saying someone has already read it before and can't access the file.
How can I accomplish this?
This is not something very serious, so I'm not really worried about security of the process, but want it to work.
Not Giving the whole process because it will be a large explanation but you can do the below mention points

Encrypt the file first.
Second the script which you want to read the content of your file must be linked with a server application from which it will receive decryption key and send data to server about whether the file is read before or not. It's like if the file readed earlier then the server don't send the decryption key.
Then after receiving the key the script should decrypt the file and read it.
How to ensure that globally a file can be read only once by my python script