Metadata-Version: 1.1
Name: Conntext
Version: 0.1.4
Summary: Context managers for secure and atomic database connectivity
Home-page: https://github.com/microamp/conntext
Author: James Nah
Author-email: sangho.nah@gmail.com
License: Copyright (C) 2014  James Nah <sangho.nah@gmail.com>

This library is free software: you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.

This library 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
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this program. If not, see <http://www.gnu.org/licenses/>.

Description: Conntext
        ========
        Context managers for secure and atomic database connectivity
        
        Rationale
        ---------
        - Each context being a single atomic process ("either all occur, or nothing occurs")
        - No manual ``commit`` (success), ``rollback`` (fail) or ``close`` (either)
        - No ORM
        
        Usage
        -----
        Without Conntext,
        
        .. code-block:: python
        
            conn = sqlite3.connect(":memory:")
            try:
                cursor = conn.cursor()
                try:
                    cursor.execute("CREATE TABLE person (name)")
                    cursor.execute("INSERT INTO person (name) VALUES (?)",
                                    ["microamp"])
                except Exception:
                    raise
                finally:
                    cursor.close()
            except Exception:
                conn.rollback()
                raise
            else:
                conn.commit()
            finally:
                conn.close()
        
        With Conntext,
        
        .. code-block:: python
        
            from conntext import conntext
        
            with conntext.conn(sqlite3.connect(":memory:")) as conn:
               with conntext.cursor(conn.cursor()) as cursor:
                    cursor.execute("CREATE TABLE person (name)")
                    cursor.execute("INSERT INTO person (name) VALUES (?)",
                                   ["microamp"])
        
        License
        -------
        All the code is licensed under the GNU Lesser General Public License (v3+).
        
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Topic :: Software Development :: Libraries
