The library I am using doesn't support a BytesIO object or binary data. Instead, it expects a file path in disk to be opened as binary.
I want to pass my raw data or even a BytesIO object as a file path argument, without saving it to disk (something like faking it's a file in disk to be opened by the library).
It it possible?
What I have so far (saving it to disk):
import os
main_dir = os.path.dirname(__file__)
output = os.path.join(main_dir, 'output') # this is my file in disk
# raw_data is by data source (binary / hexadecimal)
with open(output, 'wb') as f:
f.write(raw_data)