Metered class
Leave feedback
On this page
Provides methods which allow to activate the product with a Metered license and retrieve the amount of MBs processed.
Learn more:
- More about licensing: https://purchase.groupdocs.com/faqs/licensing
The Metered type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the Metered class. |
| Method | Description |
|---|---|
| get_consumption_credit | Gets the consumption credit. |
| get_consumption_quantity | Retrieves the amount of megabytes processed. |
| set_metered_key | Activates the product with Metered keys. |
from groupdocs.redaction import Metered
def set_metered_license():
public_key = "*****"
private_key = "*****"
if "*" in public_key or "*" in private_key:
print("Provide real metered keys to enable metered licensing.")
return
Metered().set_metered_key(public_key, private_key)
quantity = Metered().get_consumption_quantity()
credit = Metered().get_consumption_credit()
print(f"Consumption quantity: {quantity}, credit: {credit}")
- module
groupdocs.redaction
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.