-
Notifications
You must be signed in to change notification settings - Fork 34
Python development
libfvde comes with Python-bindings named pyfvde.
Below are examples how use pyfvde. They assume you have a working version of pyfvde on your system. To build pyfvde see Building.
To be able to use pyfvde in your Python scripts add the following import:
import pyfvde
The get_version() module function can be used to retrieve the version of the pyfvde.
pyfvde.get_version()
This will return a textual string (Unicode) that contains the libfvde version. Since pyfvde is a wrapper around libfvde it does not have a separate version.
fvde_volume = pyfvde.volume()
fvde_volume.open("image.raw")
...
fvde_volume.close()
The explicit call to fvde_volume.close() is not required. Close only must be called once all operations on the volume have been completed.
file_object = open("image.raw", "rb")
fvde_volume = pyfvde.volume()
fvde_volume.open_file_object(file_object)
...
fvde_volume.close()
The explicit call to fvde_volume.close() is not required. Close only must be called once all operations on the volume have been completed and will not close the file-like object itself.
import pyfvde
help(pyfvde)
help(pyfvde.volume)