mirror of
https://github.com/netbox-community/devicetype-library.git
synced 2024-12-01 04:44:24 +01:00
15 lines
336 B
Python
15 lines
336 B
Python
import pickle
|
|
|
|
def write_pickle_data(data, file_path):
|
|
with open(file_path, 'wb') as pickle_file:
|
|
pickle.dump(data, pickle_file)
|
|
pickle_file.close()
|
|
|
|
|
|
def read_pickle_data(file_path):
|
|
with open(file_path, 'rb') as pickle_file:
|
|
data = pickle.load(pickle_file)
|
|
pickle_file.close()
|
|
|
|
return data
|