@api_endpoint(['POST'])
def create_project(request):
    project_details = json.loads(request.body.decode())
    try:
        if project_details['task_class'] == 'real':
            task_class = WorkerCertification.TaskClass.REAL
        else:
            task_class = WorkerCertification.TaskClass.TRAINING
        args = (
            project_details['workflow_slug'],
            project_details['workflow_version_slug'],
            project_details['description'],
            project_details['priority'],
            task_class,
            project_details['project_data'],
        )
    except __HOLE__:
        raise BadRequest('One of the parameters is missing')

    project = create_project_with_tasks(*args)
    return {'project_id': project.id}
dataset/ETHPy150Open unlimitedlabs/orchestra/orchestra/project_api/views.py/create_project