v0.0.18 makes the following changes. Code currently running on v0.0.16 should generally be backwards compatible with v0.0.18.
- Requests for resources that Amatino API cannot find will now raise a
ResourceNotFounderror, rather than a generic urllib.HTTPError. ResourceNotFound is a subclass of AmatinoError, allowing you to catch non-existent resources along with other Amatino library exceptions. - Internally,
ApiRequest.response_datais now immutable - In previous versions, ApiRequest responded to an undocumented command line argument
--debug. This argument is common and may clash with application command line arguments, causing unexpected behaviour. The argument has been renamed--amatino-debug. GlobalUnitno longer has a .session propertyGlobalUnitnow implements the equality operator via__eq__()- Added a new class:
GlobalUnitConstants, which enumerates a subset of commonGlobalUnits. For example:
# Previously, the only way to get USD was...
usd = GlobalUnit.retrieve(5, session)
# Now you can also...
usd = GlobalUnitConstants.USDInstall Amatino Python via Pip:
pip install --upgrade amatino
Note: 0.0.18 patches an import bug included in 0.0.17. For simplicity's sake, the 0.0.17 changelog has been renamed to 0.0.18.