Licensing – Aspose.HTML for Python via .NET

Evaluate Aspose.HTML for Python via .NET

You can easily download Aspose.HTML for Python via .NET for evaluation purposes. Note that the evaluation version is identical to the purchased version and becomes fully licensed when you add a few lines of code to apply the license.

The evaluation version provides full product functionality but has some limitations:

If you want to test Aspose.HTML for Python via .NET without the evaluation version limitations, you can also request a 30-day Temporary License. Please refer to How to get a Temporary License?

Applying a License

After purchase, you need to apply a license file or include the license file as an embedded resource. Aspose.HTML for Python via .NET provides several ways to apply a license. The license can be applied from a file, a stream, or as a metered license – a new licensing mechanism.

Applying a License from a File or Stream

The easiest way to apply a license is to put the license file in the same folder as the Aspose.HTML.dll file and specify just the file name without a path.

You can create a license folder and place the license file there. The set_license() method then gets the path to the license file. The following code example shows how to initialize a license from a file using the set_license method:

1# Initialize license object
2lic = License()
3
4# Set license from file
5lic.set_license("./license/Aspose.HTML.Python.via.NET.lic")

Note: If employing multiple Aspose products within your application, for example, Aspose.HTML and Aspose.PDF, specify the complete namespace for a License like aspose.html.License or aspose.html.Metered. Each Aspose product has a License class in its own namespace. For example, Aspose.HTML has aspose.html.License and Aspose.PDF has aspose.pdf.License class. Using the fully qualified class name allows you to avoid confusion as to which license applies to which product.

Applying a Metered License

Metered license – is a new licensing mechanism, which is used along with existing licensing method. Those customers who want to be billed based on the usage of the API features can use the metered licensing. Aspose.HTML allows developers to apply a metered key. For more information, see the Metered Licensing FAQ section.

After completing all the necessary steps to obtain this type of license, you will receive the keys, not the license file. This metered key can be applied using the Metered class specially introduced for this purpose. The following code snippet demonstrates how to apply the metered license using the private and public keys:

1# Create an instance of the Metered class
2metered = Metered()
3
4# Set the public and private keys for metered licensing
5public_key = "your-public-key"
6private_key = "your-private-key"
7
8# Apply the metered license
9metered.set_metered_key(public_key, private_key)

Normally, applying the metered license once at the start of the application is sufficient. However, if the metered licensing mechanism fails to communicate with Aspose servers for 24 hours, Aspose.HTML will revert to evaluation mode. To prevent this, you should regularly check the license status. If Aspose.HTML switches to evaluation mode, please apply the metered license again.

Please note that a stable internet connection is required to use the Meter license correctly, as the Meter mechanism requires constant interaction with our services for correct calculations. For more information, see the Metered Licensing FAQ section.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.