File: __init__.py

package info (click to toggle)
griffith 0.9.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 5,912 kB
  • ctags: 5,224
  • sloc: python: 27,496; xml: 543; ansic: 325; makefile: 252
file content (33 lines) | stat: -rw-r--r-- 1,071 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# __init__.py
# Copyright (C) 2005, 2006, 2007 Michael Bayer mike_mp@zzzcomputing.com
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php

from sqlalchemy.types import *
from sqlalchemy.sql import *
from sqlalchemy.schema import *
from sqlalchemy.orm import *

from sqlalchemy.engine import create_engine
from sqlalchemy.schema import default_metadata

def __figure_version():
    return '0.3.11'
#    try:
#        from pkg_resources import require
#        import os
#        # NOTE: this only works when the package is either installed,
#        # or has an .egg-info directory present (i.e. wont work with raw SVN checkout)
#        info = require('sqlalchemy')[0]
#        if os.path.dirname(os.path.dirname(__file__)) == info.location:
#            return info.version
#        else:
#            return '(not installed)'
#    except:
#        return '(not installed)'

__version__ = __figure_version()

def global_connect(*args, **kwargs):
    default_metadata.connect(*args, **kwargs)