In python use the standard introspection import mechanism to get at libsecret:
from gi.repository import Secret
# ... and a here's sample line of code which uses the import
schema = Secret.Schema.new("org.mock.Schema",
Secret.SchemaFlags.NONE, { "name", Secret.SchemaAttributeType.STRING })