Metered class
Leave feedback
On this page
Provides methods to work with metered licensing.
A metered license is applied with the public and private keys of your subscription. Use set_metered_key before using the API, then read consumption via get_consumption_quantity and get_consumption_credit.
The Metered type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new Metered instance. |
| Method | Description |
|---|---|
| get_consumption_credit | Returns the currently consumed number of credits. |
| get_consumption_quantity | Returns the currently consumed number of megabytes. |
| set_metered_key | Enables metered licensing for the component by specifying appropriate public and private metered keys. |
from groupdocs.assembly import Metered
# Apply metered license
Metered().set_metered_key("PublicKey", "PrivateKey")
# Read consumption data
print("Quantity:", Metered.get_consumption_quantity())
print("Credit:", Metered.get_consumption_credit())
- module
groupdocs.assembly
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.