API Versions
Dealing with new versions
Over time, adding new capabilities to the plugins will require the interface to be enhanced. Most of the time, this would have no impact on your plugins, but it is not exclude that some interfaces will change to ensure a better overall coherence and consistency. In this case, it can break your plugin and make it unusable with new PrestoPlot versions.
To prevent this risk, the API is versionned, that means a python script will be connected to PrestoPlot through a specific API version. It is guaranted that a given API version will never been altered, and so your scripts will continue to work, even with new PrestoPlot version.
Determining the version to use
You have two options when creating a python script. You can decide to use a specific API version, or the latest one. Use the former to ensure the script stability, but without taking benefits of future possibilities (even if you can at any time change the API version you use). Use the latter to stay up-to-date with API features and updates.
Create your prestoplot instance with this line to choose stability over time :
from pyprestoplot import PrestoPlot
pp = PrestoPlot(apiLevel = 2)
Create your prestoplot instance with this line if you prefer being always up-to-date :
from pyprestoplot import PrestoPlot
pp = PrestoPlot()
Available API versions
This is the table of all API versions currently available in PrestoPlot :
| API Version | PrestoPlot | Main changes |
|---|---|---|
| 2 | 26.06 | Most of command line features can be done with the API. |
| 1 | 25.10 | First version. Limited scope. |
Broken changes
API Version 2
This version has renamed following functions of the DateManager class :
fromis renamed toscantois renamed toformat