python - Pyorient query To Json -
i'm using orientdb python 3.5 , create api records. problem got records need serialize these records. here code. from flask import flask, request flask_restful import reqparse, abort, api, resource import pyorient app = flask(__name__) api = api(app) client = pyorient.orientdb("localhost", 2424) client.set_session_token( true ) # set true enable token based client.db_open( "intera", "admin", "admin" ) ### store token somewhere sessiontoken = client.get_session_token() ### destroy old client, equals user/socket/ip ecc. del client ### create new client client = pyorient.orientdb("localhost", 2424) ### set previous obtained token re-attach old session client.set_session_token( sessiontoken ) ### dbopen not needed perform database operations ### set flag again true if want renew token client.set_session_token( true ) # set true client.db_open( "intera", "admin", "admin" ) new_sessiontoken ...