first implementation of protobuf

restructure in client server model
loads of work still missing
This commit is contained in:
2017-01-31 15:00:44 +01:00
parent 7d6d289178
commit d79dde527f
29 changed files with 1611 additions and 400 deletions

View File

@@ -13,23 +13,5 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from json import JSONEncoder
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base
VERSION = "0.1"
engine = None
session = scoped_session(sessionmaker())
""" :type : sqlalchemy.orm.scoping.scoped_session """
Base = declarative_base()
Base.query = session.query_property()
def _default(self, obj):
return getattr(obj.__class__, "to_json", _default.default)(obj)
_default.default = JSONEncoder().default
JSONEncoder.default = _default
VERSION = "0.2"