Пример #1
0
    def dump(self):
        """ A http interface to the dump2json method.

        Returns a json dump of the database (nearly) in full.
        """
        return dump2json()
Пример #2
0
#!/usr/bin/env python

import warnings
warnings.catch_warnings()
warnings.simplefilter("ignore")

from os.path import abspath, sep
import simplejson

from paste.deploy import appconfig
from pylons import config
from fedoratagger.config.environment import load_environment

prefix = abspath(sep.join(__file__.split(sep)[:-1]))
conf = appconfig('config:%s/development.ini' % prefix)

load_environment(conf.global_conf, conf.local_conf)

import fedoratagger.model as m
m.metadata.create_all(bind=config['pylons.app_globals'].sa_engine)

from fedoratagger.lib.utils import dump2json
print simplejson.dumps(dump2json())
Пример #3
0
    def dump(self):
        """ A http interface to the dump2json method.

        Returns a json dump of the database (nearly) in full.
        """
        return dump2json()
Пример #4
0
# 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, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
#
# Refer to the README.rst and LICENSE files for full details of the license

import warnings
warnings.catch_warnings()
warnings.simplefilter("ignore")

from os.path import abspath, sep
import simplejson

from paste.deploy import appconfig
from pylons import config
from fedoratagger.config.environment import load_environment

prefix = abspath(sep.join(__file__.split(sep)[:-1]))
conf = appconfig('config:%s/development.ini' % prefix)

load_environment(conf.global_conf, conf.local_conf)

import fedoratagger.model as m
m.metadata.create_all(bind=config['pylons.app_globals'].sa_engine)

from fedoratagger.lib.utils import dump2json
print simplejson.dumps(dump2json())