# Import system modules
import arcpy
# Check out extensions
arcpy.CheckOutExtension('nautical')
# Set local variables
in_source_gdb = r'C:\Data\a1234567.gdb'
ntm_date = r'15/21'
out_location = r'C:\Data'
# Call the ExportGeodatabaseToVPF tool to <export hydrographic data from maritime geodatabases to Vector Product Format (VPF)>
arcpy.maritime.ExportGeodatabaseToVPF(in_source_gdb, ntm_date, out_location)
# Get all messages, warnings, and errors and print the results
messages = arcpy.GetMessages(0)
warnings = arcpy.GetMessages(1)
errors = arcpy.GetMessages(2)
arcpy.AddMessage('Tool Messages: {}\nTool Warnings: {}\nTool Errors{}\n'\
.format(messages, warnings, errors))
# Check in extensions
arcpy.CheckInExtension('nautical')