Skip to content
Snippets Groups Projects
MLRepositoryInterface.py 818 B
Newer Older
##
# This program has been developed by students from the bachelor Computer Science at Utrecht University within the Software Project course.
# © Copyright Utrecht University (Department of Information and Computing Sciences)
##
#!/usr/bin/env python
##
# Define the interface that each algorithm should implement
##
class MLServerInterface:
    def __init__(self): 
        parameters = {}
        this = self.MLClass(parameters, "placeholder")

    class Attribute:
        def __init__(self, optional, type):
            self.optional = optional
            self.type = type
        def toJSON(self):
            return json.dumps(self, default=lambda o: o.__dict__, 
                sort_keys=True, indent=4)
                
    def handleJSON(self, body) -> str:
        pass