Amatino Swift 0.0.11 Released

Amatino Swift 0.0.11 has been released! This is a huge release with wide ranging changes and substantial new features. It is not backwards compatible with 0.0.10, but any code written for 0.0.10 will compile for 0.0.11 with minor adjustments.

  • Almost all asynchronous Amatino methods now accept a (Result<T, Error>) -> Void callback parameter, using the new Swift 5 Result type. The previous (Error?, T?) -> Void parameter remains available. You now have a choice to use either depending on your preferred style.
  • Add Denomination protocol, which codifies the characteristics of CustomUnit and GlobalUnit and allows method signatures accepting either of those classes to be streamlined.
  • Add Denominated protocol, which gives default behaviours to classes denominated in a Denomination, such as Transactions and Ledgers.
  • Renamed many method signatures parameters for more expressive syntax. For example, someMethod(then: (Error?, Object?) rather than someMethod(callback: (Error?, Object?)
  • Remove all use of Int64, replace with Int. Amatino Swift will not function on 32-bit platforms, so the occasional use of Int64 added needless confusion.
  • The AmatinoError case .inconsistentInternalState has been renamed .inconsistentState
  • Publicly exposed Account.create() taking Account.CreateArguments struct. Gives extra flexibility when designing GUI for account creation
  • GlobalUnitList now conforms to the Sequence protocol. I.e. you can loop over the list without needing to access the raw .units property.
  • TheGlobalUnitList units property is now sorted first by GlobalUnit.priority and then alphabetically by GlobalUnit.name
  • AccountType has a new static method, .typeWith(:name), which returns an AccountType with the given name
  • Tree now conforms to the Sequence protocol, iterating over Node conforming objects
  • Multiline strings throughout the library are no longer peppered with \n newlines. For example, AmatinoError messages.
  • Account.CreateArguments now enforces a minimum .name character length of 1.
  • Tree now features a .flatAccounts property, which returns recursive flattened list of all Accounts in the Tree as Node objects. This is effectively a list of all Accounts in an Entity.
  • Add new AccountRepresentative protocol, to which Account, TreeNode and PlaceholderNode conform. Provides base Account metadata – accountId, name, type, and is accepted in many places where Account was formerly required.
  • Fixed an internal typo in Account.DeletionArguments (no effect on public API)
  • Transaction, Balance, Account, Ledger, GlobalUnitList, Performance, Position and Entity methods may no longer throw. Errors are now exclusively handled by the error parameter in respective callbacks.
  • Ledger may now be retrieved with an object conforming to the AccountRepresentative protocol. This saves an intermediary Account retrieval when, for example, retrieving a Ledger based on a Tree node
  • Add User class including create(), retrieve(), delete() methods
  • Add User class lifecycle testing
  • Ledger.nextPage() renamed .retrieveNextPage()
  • RecursiveLedger.nextPage() renamed .retrieveNextPage()
  • Add Session.delete() method

Amatino Swift source code is available on GitHub, and you can add Amatino accounting functionality to your macOS or iOS project via Carthage or CocoaPods.

Amatino API v0.0.13 released

Requests at api.amatino.io are now being served by some freshly minted code – API v0.0.13. This is a baby little release that makes changes to the EntityList object.

  • EntityList page_number key has been renamed page for consistency with the UserList object.
  • EntityList has a new property, state, which is one of either "active", "deleted", or "all".

The Amatino API documentation has been updated to reflect these changes.

Amatino Python 0.0.13 Released

Rejoice, Pythonistas! A new version of the Amatino Python library is now available. 0.0.13 adds new capabilities. Amatino Python is now nearing initial feature completion, with almost all existing API classes covered. Watch out, 0.0.13 is catastrophically breaking, many method signatures have changed and code written for 0.0.12 will not work.

Why all the breaks? Many methods in 0.0.12 required the provision of a Session independent of an Entity, despite that Entity having ready access to the Session used when it was itself initialised. This redundancy was needlessly verbose.

  • Add new UserList class
  • Add User.delete(), .create(), and .create_many() method
  • Add TransactionVersionList class
  • Conform Ledger to collections.Sequence
  • Simplify Ledger, Balance, Account, and Transaction method signatures: No more Session requirement
  • Publicise User.decode_many() method
  • Conform Transaction to collections.Sequence
  • Add Transaction.magnitude property
  • Conform Balance and RecursiveBalance to Denominated protocol
  • Conform Ledger and RecursiveLedger to Denominated protocol

Ledger and Transaction may be now be directly iterated over, revealing constituent LedgerRows and Entries respectively. They may also be subscripted.

An example using Ledger:

ledger = Ledger.retrieve(
   entity=mega_corp,
   account=revenue
)

for row in ledger:
   print("[{date}] {balance}".format(
      date=row.transaction.time.strftime("%Y-%m-%d"),
      balance='{:,.2f}'.format(row.balance)
   ))

print("Last row balance: {balance}".format(
   balance='{:,.2f}'.format(ledger[-1].balance)
))

And Transaction:

sale = Transaction.retrieve(
   entity=mega_corp,
   id_=42,
   denomination=USD
)

print("Largest single entry: {amount}".format(
   amount='{:,2f}'.format(
      max([entry.amount for entry in sale])
   )
))

The new UserList allows you to retrieve all white-labels managed by your billing account. Draw on the State enum to refine the retrieval to all, deleted, or active users.

active_users = UserList(
   session=session,
   state=State.active
)

print("Currently paying for {num} users".format(
   num=str(len(active_users))
))

Review the history of modifications to a Transaction using the TransactionVersionList.

versions = TransactionVersionList.retrieve(
   entity=mega_corp,
   transaction=big_sale
)

for version in versions:
   print("{time}: {magnitude}".format(
      time=version.version_time.strftime("%Y-%m-%d"),
      magnitude='{:,2f}'.format(version.magnitude)
   )

For detailed documentation of the properties and methods of all Amatino classes, check out the Amatino Python Documentation.

You can install Amatino via PyPi:

$ pip install amatino

Or, if you already have Amatino Python installed, upgrade:

$ pip install --upgrade amatino

Your feedback is most welcome on the Amatino discussion forums, or on Twitter.

Amatino API v0.0.12 Now Live

Amatino API 0.0.12 is now live and serving requests at api.amatino.io. 0.0.12 resolves several issues with Transaction Version Lists (TVLs). Previously, TVLs were not operating according to the specifications in Amatino’s documentation, for either request parameters or return data. They were also at risk, under some conditions, of returning stale cached data. TVLs are now properly available.

Amatino API v0.0.10 Now Live

A new version of the Amatino API is now serving requests at api.amatino.io. 0.0.10 is probably backwards compatible with 0.0.9, because it only adds new features. However, you should not depend on backwards compatibility during the 0.0.X series of releases.

  • Add User List object at /users/list
  • Add Entity List object at /entities/list
  • Add tests for new features

Details of the User List and Entity List and how to retrieve them are available in the Amatino HTTP API documentation. Some extracts:

A User List is a collection of Users for whom the retrieving User has billing responsibility, and who were created using the Amatino API.

An Entity List enumerates the Entities that may be accessed by the retreiving User.

The use of these new objects is not immediately obvious, and they are ancillary to the core double-entry accounting functionality in Amatino. An example of Entity List usage might be displaying available Entities to a user in a client application.

Amatino Web 0.0.2 Released

A new version of the Amatino Web application is now live at https://amatino.io. Amatino Web is the software the serves the Amatino website, presenting web interfaces for billing, documentation, and other ancillary systems. Changes in 0.0.2 are:

  • Remove white label Users from billing user management screen
  • Remove a bunch of debug console logging that was spamming consoles
  • Add ability to login by hitting return/enter rather than clicking ‘login’

 

Amatino Python 0.12 Released

Hot on the heels of 0.0.11, Amatino Python 0.0.12 has been released. 0.0.12 enhances the capabilities of the Position and Performance classes added in 0.0.11, and introduces the new Tree class.

  • Add Tree class
  • Add total account balance properties to Performance
  • Add total account balance properties to Position
  • Add tests for all new features

The new properties in Position and Performance give you quick access to key financial data describing an entity.

print("{name} total assets: ${assets}".format(
   name=mega_corp.name,
   assets='{:,}'.format(position.total_assets)
)
# Example output:
# Mega Corp total assets: $1,543

Check out the Amatino Python documentation to see all the new properties.

The new Tree class is a beast, combining all accounts in an entity into a single recursive object, at a particular balance date. Like Position and Performance, Tree accounts are of type TreeNode, which means you have access to recursive and individual balances and other useful data.

from amatino import Tree
from datetime import datetime

tree = Tree.retrieve(
   entity=mega_corp,
   balance_time=datetime.utcnow()
)

print("{name} equity: ${equity}".format(
   name=mega_corp.name,
   equity='{:,}'.format(tree.total_equity)
)

For detailed documentation of the properties and methods of the Tree class, check out the Amatino Python Documentation.

You can install Amatino via PyPi:

$ pip install amatino

Or, if you already have Amatino Python installed, upgrade:

$ pip install --upgrade amatino

Be sure to leave your feedback on the Amatino discussion forums, or on Twitter, we’d love to hear what you think about Amatino Python.

Amatino Python 0.0.11 Released

A new version of the Amatino Python library is now available! 0.0.11 introduces Python versions of the powerful Position and Performance objects.

  • Add Position class
  • Add Performance class
  • Add TreeNode class
  • Add Denominated protocol
  • Add Decodable protocol
  • Add tests for Position & Performance retrieval

The new Position & Performance classes map to the Amatino HTTP API Position & Performance objects. TreeNodes support the Position & Performance classes by representing Accounts in their hierarchies.

A Position is analogous to a balance sheet or statement of financial position. A Performance is analogous to an income statement or statement of financial performance.

You may retrieve the new objects like so:

from amatino import Performance

income_statement = Performance.retrieve(
  entity=mega_corp,
  start_time=(datetime.utcnow() - timedelta(days=365))
  end_time=datetime.utcnow()
  denomination=USD
)
from amatino import Position

balance_sheet = Position.retrieve(
  entity=mega_corp,
  balance_time=datetime.utcnow()
  denomination=USD
)

For detailed documentation of the properties and methods of these new classes, check out the Amatino Python Documentation.

You can install Amatino via PyPi:

$ pip install amatino

Or, if you already have Amatino Python installed, upgrade:

$ pip install --upgrade amatino

Enjoy!

Amatino API v0.0.9 now live

A new version of the Amatino API is now live around the world. 0.0.9 is substantially backwards compatible with 0.0.8, but you should not rely on backwards compatibility during the 0.0.X series of releases.