fromgroupdocs.redactionimportMeteredpublic_key="*****"private_key="*****"# Skip the call until real keys are supplied (placeholder keys are rejected)if"*"inpublic_keyor"*"inprivate_key:print("Provide real metered keys to enable metered licensing.")else:Metered().set_metered_key(public_key,private_key)# Query the current metered consumptionquantity=Metered().get_consumption_quantity()credit=Metered().get_consumption_credit()print(f"Consumption quantity: {quantity}, credit: {credit}")
Aliases
These names call set_metered_key too, limited to the overloads listed.