Metered Licensing

Contents
[ ]
  1. Create an instance the Metered class.
  2. Pass your public and private keys to the set_metered_key method.
  3. Do some processing (perform tasks).
  4. Call the get_consumption_quantity method of the Metered class.

You should see the amount/quantity of API requests you have consumed so far.

This sample code shows you how to use metered licensing:

import aspose.slides as slides

# Creates an instance of the Metered class
metered = slides.Metered()

# Passes the public and private keys to the Metered object
metered.set_metered_key("<valid public key>", "<valid private key>")

# Gets the consumed quantity value before API calls
amount_before = slides.Metered.get_consumption_quantity()
print("Amount consumed before:", amount_before)

# Do something with Aspose.Slides API here
# ...

# Gets the consumed quantity value after API calls
amount_after = slides.Metered.get_consumption_quantity()
print("Amount consumed after:", amount_after)