abraham-ai / eden

Eden converts your python function into a hosted endpoint with minimal changes to your existing code :mage_man:
GNU General Public License v3.0
47 stars 5 forks source link

updatable config + better schemas #12

Closed Mayukhdeb closed 3 years ago

Mayukhdeb commented 3 years ago

Changes made:

  1. Updated the schemas to be more uniform/intuitive:

/run starts the task and returns something like:

{
    'token': str
}

/fetch has 3 possibilities based on the status of the tasks

/update returns either something like:

{
    'status': {
        'status': 'successfully updated config'
    },
}

or if the task is already complete:

{
    'status': {
        'status': 'task is aleady complete'
    },
}

or if the token is invalid:

{
    'status': {
        'status': 'invalid token'
    },
}
  1. Added tests in eden which checks the data types, schemas and /update. The tests can be run with the following steps:
python3 eden/tests/server.py
pytest eden/tests
  1. other misc changes: