Files
LedD/ledd/__init__.py
Giovanni Harting d5f403d557 Moved to SQLAlchemy
Finished switch to JSONRPC

commit 9cf6dd9a0e03c71135c01d4ad4f7d3be0f1e3066
Author: Giovanni Harting <giovanni.harting@touchdata.net>
Date:   Sat Oct 10 21:09:20 2015 +0200

    fixed some bugs
    added some missing things from transition

commit 8ed44b8fcde739b541b1834049025b055a50e6fe
Author: Marius Schiffer <marius@mschiffer.de>
Date:   Sat Oct 10 05:53:41 2015 +0200

    Creating fresh database works now. Fixed pwm_freq property.

commit dc88ef0df427f90746a499912eff70dfce967c55
Author: Marius Schiffer <marius@mschiffer.de>
Date:   Sat Oct 10 04:40:41 2015 +0200

    Completed SQLAlchemy integration. Completed JSON-RPC integration.
    All daemon class functionality is now on module-level (required for
    JSON-RPC decorators).
    Migrations will have to be reimplemented with alembic.

commit a4cabdcd00a3e2a3cbbd92a3c9d59a4235e4d277
Author: Marius Schiffer <marius@mschiffer.de>
Date:   Sat Oct 10 03:00:19 2015 +0200

    First steps towards SQLAlchemy integration.
2015-10-10 21:13:29 +02:00

27 lines
986 B
Python

# LEDD Project
# Copyright (C) 2015 LEDD Team
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# 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 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()