Amatino Python v0.0.18

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 ResourceNotFound error, 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_data is 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.
  • GlobalUnit no longer has a .session property
  • GlobalUnit now implements the equality operator via __eq__()
  • Added a new class: GlobalUnitConstants, which enumerates a subset of common GlobalUnits. For example:
# Previously, the only way to get USD was...
usd = GlobalUnit.retrieve(5, session)
# Now you can also...
usd = GlobalUnitConstants.USD

Install Amatino Python via Pip:

pip install --upgrade amatino