A truncated example of the corresponding model is shown above. The find_molecule function is quite complex, supporting multiple fields, pagination, etc. These are necessary to support larger result sets where returning all results would take too much space, and would not be desirable. It enables clients to display pages, and request offsets into the results returned by a search query. The find_inchikey is one of the simplest functions where a query is created, and the query is executed with the result returned directly. There is a lot of freedom within the model to add chemistry specific logic, or perform very simple database queries depending upon the need. This also introduces a separation of concerns where the model code interacts with the database, whereas the endpoint code deals with issuing the correct response, documenting endpoints, and dispatching to the appropriate parts of the data model. 
Having an open source data server not only offers useful capabilities now, but through the use of Python, and by documenting the code using modern approaches, it offers a starting point for future projects that want to extend an already capable data server. The use of microservices works toward making this even easier by providing containers that perform specific tasks that could be reused within other platforms, or where their capabilities can be extended and improved within this platform without the need to work within the data server itself. Both microservices were migrated from the server component to simplify the data server, and offer greater modularity. The Open Babel and Avogadro microservices were able to separate out longer running tasks from the data server thread ensuring that the data server is less likely to stall and the microservices can be scaled more easily.