How to use the flask-api.app.MovieModel function in Flask-API

To help you get started, we’ve selected a few Flask-API examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github neo4j-examples / neo4j-movies-template / flask-api / app.py View on Github external
                    'items': MovieModel,
                }
            }
        }
    })
    @login_required
    def get(self):
        db = get_db()
        result = db.run(
            '''
            MATCH (:User {id: {user_id}})-[rated:RATED]->(movie:Movie)
            RETURN DISTINCT movie, rated.rating as my_rating
            ''', {'user_id': g.user['id']}
        )
        return [serialize_movie(record['movie'], record['my_rating']) for record in result]