Commits

Jan Brohl committed a34c12d

fixes for new name and path

Comments (0)

Files changed (5)

 ABOUT
 =====
 
-PyDal is a database abstraction layer for Python.  It provides a DBAPI 2.0 wrapper for DBAPI 2.0 drivers.  Sounds strange, but even drivers that fully conform to the DBAPI can differ enough to make building database independent applications difficult.  Two major abstractions handled by PyDal are paramstyles and datetime objects.  PyDal makes it possible to use the same paramstyle and datetime types with any module that conforms to DBAPI 2.0. In addition, paramstyles and datetime types are configurable.
+pyDal is a database abstraction layer for Python.  It provides a DBAPI 2.0 wrapper for DBAPI 2.0 drivers.  Sounds strange, but even drivers that fully conform to the DBAPI can differ enough to make building database independent applications difficult.  Two major abstractions handled by PyDal are paramstyles and datetime objects.  PyDal makes it possible to use the same paramstyle and datetime types with any module that conforms to DBAPI 2.0. In addition, paramstyles and datetime types are configurable.
 
-It should work with any driver that is DBAPI 2.0 compliant.  For those that are not, adaptations are handled in configuration files.  Check out config_Example.py for examples.
+It should work with any driver that is DBAPI 2.0 compliant.  For those that are not, adaptations are handled in configuration files. 
 
 INSTALL
 =======
 
-You can simply copy dal somewhere in your path or use easy_install to install
+You can simply copy pydal somewhere in your path or use easy_install to install
 as an egg.
 
 
 
 Look at the documentation for the dbapi.py module for a usage example.  A very simple example works like this.
 
-import dal
+import pydal.dbapi as dal
 drv = dal.wrapdriver('psycopg')
 cn = drv.connect(database='mydb')
 cs = cn.cursor()
 function init2 is executed at the end of the wrapper initialization and
 allows custom modifications to the wrapper or native driver at runtime.
 
-There is an example config file nameed config_Example.py
 
 LICENSE
 =======
 DOWNLOAD
 ========
 
-The project is hosted on Sourceforge.
+The original project is hosted on Sourceforge.
 
 Currently available from SVN:
 
 svn co http://pydal.svn.sourceforge.net/svnroot/pydal pydal
+
+The pyDAL-fork is currently available at https://bitbucket.org/janbrohl/pydal

pydal/__init__.py

-__version__ = "0.3"
+__version__ = "0.3.1"
 
 
 Usage Example:
-import dal
+import pydal.dbapi as dal
+import pydal.dbexceptions as ex
 dbmod = dal.wrapdriver('psycopg')
 # (Optional) Set the datetime type you want to use.
 # Defaults to Python's datetime module.  Can be 'mx', 'py', or 'native'.
     result = cs.fetchall()
 # all DBAPI2 exceptions from the driver are mapped to the corresponding dal 
 # exceptions so it is possible to catch them in a generic way.
-except dal.Error:
+except ex.Error:
     pass
 
 
 are in fact SQL server and driver specific and unfortunately hasn't been 
 addressed in Python DBAPI spec. Below is the example for MySQLdb.
 
-import dal
+import pydal.dbapi as dal
 dbmod = dal.wrapdriver('MySQLdb')
 
 # Set local timezone. This gives side effect that all datetime.datetime 
 # sent as a query parameters has been converted internally to this 
 # timezone before sending to driver.
 
-dal.dbapi.dbtime.server_tzinfo = pytz.timezone('UTC') 
+dal.dbtime.server_tzinfo = pytz.timezone('UTC') 
 
 dbmod.dtmod = 'py' # Python datetime module.
 dbmod.paramstyle = 'qmark'
 
 __revision__ = 0.1
 
-import dbtime
-import dbexceptions
-import paramstyles
+import pydal.dbtime as dbtime
+import pydal.dbexceptions as dbexceptions
+import pydal.paramstyles as paramstyles
 
 class MWrapper(object):
     """Wraps DBAPI2 driver."""
         return self._native_cs.description
 
     description = property(__getDescription)
-    
+
     def __getRowCount(self):
         return self._native_cs.rowcount
 
         return self._native_cs.arraysize
 
     def __setArraySize(self, new_array_size):
-        self._native_cs.arraysize = new_array_size 
+        self._native_cs.arraysize = new_array_size
 
     arraysize = property(__getArraySize, __setArraySize)
 
         elif results != []:
             new_results = results
         else:
-            new_results = [] 
+            new_results = []
         return new_results
 
     def close(self):
     if driver_alias == None:
         driver_alias = driver_name
     try:
-        driver = __import__(driver_name, fromlist = [ '' ])
+        driver = __import__(driver_name, fromlist=[ '' ])
     except ImportError:
         raise
     # create the MWrapper instance

pydal/test/__init__.py

Empty file added.
 from distutils.core import setup
 execfile("pydal/__init__.py")
 
-name = "SimpleREST"
+name = "pyDAL"
 url = "https://bitbucket.org/janbrohl/" + name.lower()
 
 
 setup(
-    name = "pydal",
+    name=name,
     version=__version__,
-    author = "Randall Smith",
-    author_email = "randall@tnr.cc",
-    maintainer = "Jan Brohl",
+    author="Randall Smith",
+    author_email="randall@tnr.cc",
+    maintainer="Jan Brohl",
     maintainer_email="janbrohl@t-online.de",
-    description = "a python database abstraction layer.",
-    license = "BSD",
-    url = url,
+    description="a python database abstraction layer.",
+    license="BSD",
+    url=url,
     download_url="%s/downloads/%s-%s.zip" % (url, name, __version__),
     provides=[name.lower()],
-    packages=["pydal","pydal.dbi","pydal.dbapi"]
+    packages=["pydal", "pydal.test"]
 )