cone.sql


Namecone.sql JSON
Version 0.8 PyPI version JSON
download
home_pagehttp://github.com/conestack/cone.sql
SummarySQLAlchemy integration for cone.app
upload_time2024-02-12 10:15:13
maintainer
docs_urlNone
authorCone Contributors
requires_python
licenseSimplified BSD
keywords node pyramid cone web
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            .. image:: https://img.shields.io/pypi/v/cone.sql.svg
    :target: https://pypi.python.org/pypi/cone.sql
    :alt: Latest PyPI version

.. image:: https://img.shields.io/pypi/dm/cone.sql.svg
    :target: https://pypi.python.org/pypi/cone.sql
    :alt: Number of PyPI downloads

.. image:: https://travis-ci.org/bluedynamics/cone.sql.svg?branch=master
    :target: https://travis-ci.org/bluedynamics/cone.sql

.. image:: https://coveralls.io/repos/github/bluedynamics/cone.sql/badge.svg?branch=master
    :target: https://coveralls.io/github/bluedynamics/cone.sql?branch=master

This package provides SQLAlchemy integration in ``cone.app`` and basic
application nodes for publishing SQLAlchemy models.


Installation
------------

Include ``cone.sql`` to install dependencies in your application's
``setup.py``.


Configure Database and WSGI
---------------------------

Adopt your application config ini file to define database location and hook
up the related elements to the WSGI pipeline.

.. code-block:: ini

    [app:my_app]
    use = egg:cone.app#main

    pyramid.includes =
        pyramid_retry
        pyramid_tm

    tm.commit_veto = pyramid_tm.default_commit_veto

    cone.plugins =
        cone.sql

    sql.db.url = sqlite:///%(here)s/var/sqlite/my_db.db

    [filter:remote_addr]
    # for use behind nginx
    use = egg:cone.app#remote_addr

    [filter:session]
    use = egg:cone.sql#session

    [pipeline:main]
    pipeline =
        remote_addr
        session
        my_app


Create Model and Nodes
----------------------

Define the SQLAlchemy model.

.. code-block:: python

    from cone.sql import SQLBase
    from cone.sql.model import GUID
    from sqlalchemy import Column
    from sqlalchemy import String

    class MyRecord(SQLBase):
        __tablename__ = 'my_table'
        uid_key = Column(GUID, primary_key=True)
        field = Column(String)

Define an application node which represents the SQL row and uses the SQLAlchemy
model. The class holds a reference to the related SQLAlchemy model.

.. code-block:: python

    from cone.sql.model import SQLRowNode

    class MyNode(SQLRowNode):
        record_class = MyRecord

Define an application node which represents the table and acts as container for
the SQL row nodes. The class holds a reference to the related SQLAlchemy model
and the related SQLRowNode.

.. code-block:: python

    from cone.sql.model import SQLTableNode

    class MyContainer(SQLTableNode):
        record_class = MyRecord
        child_factory = MyNode


Primary key handling
--------------------

The node name maps to the primary key of the SQLAlchemy model (currenly no
multiple primary keys are supported). Node names are converted to the
primary key data type automatically. The conversion factories are defined at
``SQLTableNode.data_type_converters`` which can be extended by more data types
if needed.

.. code-block:: python

    >>> SQLTableNode.data_type_converters
    {<class 'sqlalchemy.sql.sqltypes.String'>: <type 'unicode'>,
    <class 'cone.sql.model.GUID'>: <class 'uuid.UUID'>,
    <class 'sqlalchemy.sql.sqltypes.Integer'>: <type 'int'>}


Integrate to the Application Model
----------------------------------

In order to publish a SQL table node, the table node must be hooked up to the
application model. To hook up the at root level, register it as entry.

.. code-block:: python

    import cone.app

    cone.app.register_entry('container', MyContainer)


Session setup handlers
----------------------

There exists a ``sql_session_setup`` decorator which can be used to perform
session setup tasks like registering SQLAlchemy event listeners.

.. code-block:: python

    from cone.sql import sql_session_setup
    from sqlalchemy import event

    def after_flush(session, flush_context):
        """Do something after flush.
        """

    @sql_session_setup
    def bind_session_listener(session):
        """SQL session setup callback.
        """
        event.listen(session, 'after_flush', after_flush)


Query the database
------------------

Querying the database is done via SQLAlchemy. If you are in a request/response
cycle, you should acquire the session from request via ``get_session`` and
perform arbitrary operations on it. By reading the session from request we ensure
the transaction manager to work properly if configured.

.. code-block:: python

    from cone.sql import get_session

    session = get_session(request)
    result = session.query(MyRecord).all()

If you need a session outside a request/response cycle you can create one by using
the ``session_factory``.

.. code-block:: python

    from cone.sql import session_factory

    session = session_factory()
    result = session.query(MyRecord).all()
    session.close()


Principal ACL's
---------------

SQL based Principal ACL's are implemented in ``cone.sql.acl``. The related
table gets created as soon as you import from this module.

Using ``SQLPrincipalACL`` requires the model to implement ``node.interfaces.IUUID``.

.. code-block:: python

    from cone.sql.acl import SQLPrincipalACL
    from node.base import BaseNode
    from node.interfaces import IUUID
    from plumber import plumbing
    from pyramid.security import Allow
    from zope.interface import implementer
    import uuid as uuid_module

    @implementer(IUUID)
    @plumbing(SQLPrincipalACL)
    class SQLPrincipalACLNode(BaseNode):
        uuid = uuid_module.UUID('1a82fa87-08d6-4e48-8bc2-97ee5a52726d')

        @property
        def __acl__(self):
            return [
                (Allow, 'role:editor', ['edit']),
                (Allow, 'role:manager', ['manage']),
            ]


User and Group Management
-------------------------

``cone.sql.ugm`` contains an implementation of the UGM contracts defined at
``node.ext.ugm.interfaces``, using sql as backend storage:

.. code-block::

                           +------------+
                           |  Principal |
                           |(data: JSON)|
                           +------------+
                                 ^
                                 |
            +-----------------------------------------+
            |                                         |
            |                                         |
         +------+                                 +-------+
         | User |                                 | Group |
         +------+                                 +-------+
             1                                        1
             |                                        |
             |                                        |
             +-------------+            +-------------+
                           |            |
                           n            m
                           |            |
                        +-----------------+
                        | GroupAssignment |
                        +-----------------+

Currently SQLite and PostgreSQL are supported and tested, other DBs must
be evaluated concerning their JSON capabilities since users and groups
store additional payload data in a JSON field which brings the flexibility
to store arbitrary data as a dict in the JSON field.

To activate SQL based UGM backend, it needs to be configured via the application
ini config file.:

.. code-block:: ini

    ugm.backend = sql

    sql.user_attrs = id, mail, fullname, portrait
    sql.group_attrs = description
    sql.binary_attrs = portrait
    sql.log_auth = True
    sql.user_expires_attr = expires

UGM users and groups are stored in the same database as defined at
``sql.db.url`` in the config file.

UGM dedicated config options:

- ``sql.user_attrs`` is a comma separated list of strings defining the
  available user attributes stored in the user JSON data field.

- ``sql.group_attrs`` is a comma separated list of strings defining the
  available group attributes stored in the group JSON data field.

- ``sql.binary_attrs`` is a comma separated list of strings defining the
  attributes which are considered binary and get stored base 64 encoded in the
  JSON data field of users and groups.

- ``sql.log_auth`` defaults to False. If set, the first login timestamp will
  be stored during the first authentication and latest login timestamp will be
  updated for each successful authentication.

- ``sql.user_expires_attr`` defaults to None. If set, user expiration is
  enabled and the value given is the attribute name of the JSON data field
  where the expiration timestamp gets stored.

Users and groups can be managed with ``cone.ugm``. If activated,
``sql.user_attrs`` and ``sql.group_attrs`` can be omitted, relevant information
gets extracted from the ``ugm.xml`` config file.

.. code-block:: ini

    ugm.backend = sql
    ugm.config = %(here)s/ugm.xml

    sql.log_auth = True

    cone.plugins =
        cone.ugm
        cone.sql


TODO
----

- Support multiple primary keys.


Contributors
============

- Robert Niederreiter (Author)
- Phil Auersperg


Changes
=======

0.8 (2024-02-12)
----------------

- Initialize SQL before calling ``setUp`` of super class in ``SQLLayer.setUp``,
  which itself calls ``make_app``. This ensures ``sql.session_factory`` is
  properly set if used in a cone ``main_hook``.
  [rnix]


0.7 (2022-12-05)
----------------

- Implement ``expires`` and ``expired`` on ``cone.sql.ugm.UserBehavior``.
  Extend ``cone.sql.ugm.UgmBehavior`` by ``user_expires_attr`` which
  enables used expiration support.
  [rnix]

- Add ``TestSQLSessionFactory`` and set to ``cone.sql.session_factory`` in
  ``SQLLayer.init_sql`` if not present.
  [rnix, toalba]


0.6 (2022-10-06)
----------------

- Remove usage of ``Nodespaces`` behavior.
  [rnix]

- Replace deprecated use of ``IStorage`` by ``IMappingStorage``.
  [rnix]

- Replace deprecated use of ``Nodify`` by ``MappingNode``.
  [rnix]

- Replace deprecated use of ``Adopt`` by ``MappingAdopt``.
  [rnix]

- Replace deprecated use of ``NodeChildValidate`` by ``MappingConstraints``.
  [rnix]

- Replace deprecated use of ``allow_non_node_children`` by ``child_constraints``.
  [rnix]


0.5 (2021-11-08)
----------------

- Rename deprecated ``SQLPrincipalRoles.allow_non_node_childs`` to
  ``allow_non_node_children``
  [rnix]

- Add ``cache_ok`` to ``GUID`` type decorator to prevent warning with
  SQLAlchemy 1.4
  [rnix]


0.4 (2020-11-12)
----------------

- Fix typo in ``SqlUGMFactory.__init__``.
  [rnix]


0.3 (2020-07-09)
----------------

- SQL database URL setting key in ini file changed from ``cone.sql.db.url``
  to ``sql.db.url``.
  [rnix]

- Add SQL based UGM implementation.
  [zworkb, rnix]

- Patch ``maker`` on ``cone.sql.session_factory`` if present in
  ``cone.sql.testing.SQLLayer`` to ensure working session factory when running
  tests.
  [rnix]


0.2 (2020-05-30)
----------------

- Introduce ``cone.sql.SQLSessionFactory``. Gets instanciated at application
  startup as singleton at ``cone.sql.session_factory``.
  [rnix]

- SQL database URL setting key in ini file changed from ``cone.sql.dbinit.url``
  to ``cone.sql.db.url``.
  [rnix]

- SQL database URL definition is only required once in the ``app`` section of
  the ini file. ``sqlalchemy.url`` can be removed from session filter.
  [rnix]

- Add SQL based principal ACL support.
  [rnix]

- Python 3 compatibility.
  [rnix]

- Fix hex formatting in ``cone.sql.model.GUID.process_bind_param``.
  [rnix]

- Register SQL session to transaction manager with ``zope.sqlalchemy.register``.
  [rnix]

- Use ``pyramid_tm`` instead of ``repoze.tm2``. Disabled by default, must be
  enabled explicitely via ``pyramid.includes``.
  [rnix]

- Use ``pyramid_retry`` instead of ``repoze.retry``. Disabled by default, must be
  enabled explicitely via ``pyramid.includes``.
  [rnix]

- Upgrade to ``cone.app`` 1.0b1.
  [rnix]


0.1 (2017-03-28)
----------------

- Initial work.
  [rnix]


License
=======

Copyright (c) 2017-2021, BlueDynamics Alliance, Austria
Copyright (c) 2021-2022, Cone Contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this
  list of conditions and the following disclaimer in the documentation and/or
  other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/conestack/cone.sql",
    "name": "cone.sql",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "node pyramid cone web",
    "author": "Cone Contributors",
    "author_email": "dev@conestack.org",
    "download_url": "https://files.pythonhosted.org/packages/6f/3f/fbc5b623104badc193b4b6e16f3d2e2c66b79b0cc331983c1297f67cb190/cone.sql-0.8.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/cone.sql.svg\n    :target: https://pypi.python.org/pypi/cone.sql\n    :alt: Latest PyPI version\n\n.. image:: https://img.shields.io/pypi/dm/cone.sql.svg\n    :target: https://pypi.python.org/pypi/cone.sql\n    :alt: Number of PyPI downloads\n\n.. image:: https://travis-ci.org/bluedynamics/cone.sql.svg?branch=master\n    :target: https://travis-ci.org/bluedynamics/cone.sql\n\n.. image:: https://coveralls.io/repos/github/bluedynamics/cone.sql/badge.svg?branch=master\n    :target: https://coveralls.io/github/bluedynamics/cone.sql?branch=master\n\nThis package provides SQLAlchemy integration in ``cone.app`` and basic\napplication nodes for publishing SQLAlchemy models.\n\n\nInstallation\n------------\n\nInclude ``cone.sql`` to install dependencies in your application's\n``setup.py``.\n\n\nConfigure Database and WSGI\n---------------------------\n\nAdopt your application config ini file to define database location and hook\nup the related elements to the WSGI pipeline.\n\n.. code-block:: ini\n\n    [app:my_app]\n    use = egg:cone.app#main\n\n    pyramid.includes =\n        pyramid_retry\n        pyramid_tm\n\n    tm.commit_veto = pyramid_tm.default_commit_veto\n\n    cone.plugins =\n        cone.sql\n\n    sql.db.url = sqlite:///%(here)s/var/sqlite/my_db.db\n\n    [filter:remote_addr]\n    # for use behind nginx\n    use = egg:cone.app#remote_addr\n\n    [filter:session]\n    use = egg:cone.sql#session\n\n    [pipeline:main]\n    pipeline =\n        remote_addr\n        session\n        my_app\n\n\nCreate Model and Nodes\n----------------------\n\nDefine the SQLAlchemy model.\n\n.. code-block:: python\n\n    from cone.sql import SQLBase\n    from cone.sql.model import GUID\n    from sqlalchemy import Column\n    from sqlalchemy import String\n\n    class MyRecord(SQLBase):\n        __tablename__ = 'my_table'\n        uid_key = Column(GUID, primary_key=True)\n        field = Column(String)\n\nDefine an application node which represents the SQL row and uses the SQLAlchemy\nmodel. The class holds a reference to the related SQLAlchemy model.\n\n.. code-block:: python\n\n    from cone.sql.model import SQLRowNode\n\n    class MyNode(SQLRowNode):\n        record_class = MyRecord\n\nDefine an application node which represents the table and acts as container for\nthe SQL row nodes. The class holds a reference to the related SQLAlchemy model\nand the related SQLRowNode.\n\n.. code-block:: python\n\n    from cone.sql.model import SQLTableNode\n\n    class MyContainer(SQLTableNode):\n        record_class = MyRecord\n        child_factory = MyNode\n\n\nPrimary key handling\n--------------------\n\nThe node name maps to the primary key of the SQLAlchemy model (currenly no\nmultiple primary keys are supported). Node names are converted to the\nprimary key data type automatically. The conversion factories are defined at\n``SQLTableNode.data_type_converters`` which can be extended by more data types\nif needed.\n\n.. code-block:: python\n\n    >>> SQLTableNode.data_type_converters\n    {<class 'sqlalchemy.sql.sqltypes.String'>: <type 'unicode'>,\n    <class 'cone.sql.model.GUID'>: <class 'uuid.UUID'>,\n    <class 'sqlalchemy.sql.sqltypes.Integer'>: <type 'int'>}\n\n\nIntegrate to the Application Model\n----------------------------------\n\nIn order to publish a SQL table node, the table node must be hooked up to the\napplication model. To hook up the at root level, register it as entry.\n\n.. code-block:: python\n\n    import cone.app\n\n    cone.app.register_entry('container', MyContainer)\n\n\nSession setup handlers\n----------------------\n\nThere exists a ``sql_session_setup`` decorator which can be used to perform\nsession setup tasks like registering SQLAlchemy event listeners.\n\n.. code-block:: python\n\n    from cone.sql import sql_session_setup\n    from sqlalchemy import event\n\n    def after_flush(session, flush_context):\n        \"\"\"Do something after flush.\n        \"\"\"\n\n    @sql_session_setup\n    def bind_session_listener(session):\n        \"\"\"SQL session setup callback.\n        \"\"\"\n        event.listen(session, 'after_flush', after_flush)\n\n\nQuery the database\n------------------\n\nQuerying the database is done via SQLAlchemy. If you are in a request/response\ncycle, you should acquire the session from request via ``get_session`` and\nperform arbitrary operations on it. By reading the session from request we ensure\nthe transaction manager to work properly if configured.\n\n.. code-block:: python\n\n    from cone.sql import get_session\n\n    session = get_session(request)\n    result = session.query(MyRecord).all()\n\nIf you need a session outside a request/response cycle you can create one by using\nthe ``session_factory``.\n\n.. code-block:: python\n\n    from cone.sql import session_factory\n\n    session = session_factory()\n    result = session.query(MyRecord).all()\n    session.close()\n\n\nPrincipal ACL's\n---------------\n\nSQL based Principal ACL's are implemented in ``cone.sql.acl``. The related\ntable gets created as soon as you import from this module.\n\nUsing ``SQLPrincipalACL`` requires the model to implement ``node.interfaces.IUUID``.\n\n.. code-block:: python\n\n    from cone.sql.acl import SQLPrincipalACL\n    from node.base import BaseNode\n    from node.interfaces import IUUID\n    from plumber import plumbing\n    from pyramid.security import Allow\n    from zope.interface import implementer\n    import uuid as uuid_module\n\n    @implementer(IUUID)\n    @plumbing(SQLPrincipalACL)\n    class SQLPrincipalACLNode(BaseNode):\n        uuid = uuid_module.UUID('1a82fa87-08d6-4e48-8bc2-97ee5a52726d')\n\n        @property\n        def __acl__(self):\n            return [\n                (Allow, 'role:editor', ['edit']),\n                (Allow, 'role:manager', ['manage']),\n            ]\n\n\nUser and Group Management\n-------------------------\n\n``cone.sql.ugm`` contains an implementation of the UGM contracts defined at\n``node.ext.ugm.interfaces``, using sql as backend storage:\n\n.. code-block::\n\n                           +------------+\n                           |  Principal |\n                           |(data: JSON)|\n                           +------------+\n                                 ^\n                                 |\n            +-----------------------------------------+\n            |                                         |\n            |                                         |\n         +------+                                 +-------+\n         | User |                                 | Group |\n         +------+                                 +-------+\n             1                                        1\n             |                                        |\n             |                                        |\n             +-------------+            +-------------+\n                           |            |\n                           n            m\n                           |            |\n                        +-----------------+\n                        | GroupAssignment |\n                        +-----------------+\n\nCurrently SQLite and PostgreSQL are supported and tested, other DBs must\nbe evaluated concerning their JSON capabilities since users and groups\nstore additional payload data in a JSON field which brings the flexibility\nto store arbitrary data as a dict in the JSON field.\n\nTo activate SQL based UGM backend, it needs to be configured via the application\nini config file.:\n\n.. code-block:: ini\n\n    ugm.backend = sql\n\n    sql.user_attrs = id, mail, fullname, portrait\n    sql.group_attrs = description\n    sql.binary_attrs = portrait\n    sql.log_auth = True\n    sql.user_expires_attr = expires\n\nUGM users and groups are stored in the same database as defined at\n``sql.db.url`` in the config file.\n\nUGM dedicated config options:\n\n- ``sql.user_attrs`` is a comma separated list of strings defining the\n  available user attributes stored in the user JSON data field.\n\n- ``sql.group_attrs`` is a comma separated list of strings defining the\n  available group attributes stored in the group JSON data field.\n\n- ``sql.binary_attrs`` is a comma separated list of strings defining the\n  attributes which are considered binary and get stored base 64 encoded in the\n  JSON data field of users and groups.\n\n- ``sql.log_auth`` defaults to False. If set, the first login timestamp will\n  be stored during the first authentication and latest login timestamp will be\n  updated for each successful authentication.\n\n- ``sql.user_expires_attr`` defaults to None. If set, user expiration is\n  enabled and the value given is the attribute name of the JSON data field\n  where the expiration timestamp gets stored.\n\nUsers and groups can be managed with ``cone.ugm``. If activated,\n``sql.user_attrs`` and ``sql.group_attrs`` can be omitted, relevant information\ngets extracted from the ``ugm.xml`` config file.\n\n.. code-block:: ini\n\n    ugm.backend = sql\n    ugm.config = %(here)s/ugm.xml\n\n    sql.log_auth = True\n\n    cone.plugins =\n        cone.ugm\n        cone.sql\n\n\nTODO\n----\n\n- Support multiple primary keys.\n\n\nContributors\n============\n\n- Robert Niederreiter (Author)\n- Phil Auersperg\n\n\nChanges\n=======\n\n0.8 (2024-02-12)\n----------------\n\n- Initialize SQL before calling ``setUp`` of super class in ``SQLLayer.setUp``,\n  which itself calls ``make_app``. This ensures ``sql.session_factory`` is\n  properly set if used in a cone ``main_hook``.\n  [rnix]\n\n\n0.7 (2022-12-05)\n----------------\n\n- Implement ``expires`` and ``expired`` on ``cone.sql.ugm.UserBehavior``.\n  Extend ``cone.sql.ugm.UgmBehavior`` by ``user_expires_attr`` which\n  enables used expiration support.\n  [rnix]\n\n- Add ``TestSQLSessionFactory`` and set to ``cone.sql.session_factory`` in\n  ``SQLLayer.init_sql`` if not present.\n  [rnix, toalba]\n\n\n0.6 (2022-10-06)\n----------------\n\n- Remove usage of ``Nodespaces`` behavior.\n  [rnix]\n\n- Replace deprecated use of ``IStorage`` by ``IMappingStorage``.\n  [rnix]\n\n- Replace deprecated use of ``Nodify`` by ``MappingNode``.\n  [rnix]\n\n- Replace deprecated use of ``Adopt`` by ``MappingAdopt``.\n  [rnix]\n\n- Replace deprecated use of ``NodeChildValidate`` by ``MappingConstraints``.\n  [rnix]\n\n- Replace deprecated use of ``allow_non_node_children`` by ``child_constraints``.\n  [rnix]\n\n\n0.5 (2021-11-08)\n----------------\n\n- Rename deprecated ``SQLPrincipalRoles.allow_non_node_childs`` to\n  ``allow_non_node_children``\n  [rnix]\n\n- Add ``cache_ok`` to ``GUID`` type decorator to prevent warning with\n  SQLAlchemy 1.4\n  [rnix]\n\n\n0.4 (2020-11-12)\n----------------\n\n- Fix typo in ``SqlUGMFactory.__init__``.\n  [rnix]\n\n\n0.3 (2020-07-09)\n----------------\n\n- SQL database URL setting key in ini file changed from ``cone.sql.db.url``\n  to ``sql.db.url``.\n  [rnix]\n\n- Add SQL based UGM implementation.\n  [zworkb, rnix]\n\n- Patch ``maker`` on ``cone.sql.session_factory`` if present in\n  ``cone.sql.testing.SQLLayer`` to ensure working session factory when running\n  tests.\n  [rnix]\n\n\n0.2 (2020-05-30)\n----------------\n\n- Introduce ``cone.sql.SQLSessionFactory``. Gets instanciated at application\n  startup as singleton at ``cone.sql.session_factory``.\n  [rnix]\n\n- SQL database URL setting key in ini file changed from ``cone.sql.dbinit.url``\n  to ``cone.sql.db.url``.\n  [rnix]\n\n- SQL database URL definition is only required once in the ``app`` section of\n  the ini file. ``sqlalchemy.url`` can be removed from session filter.\n  [rnix]\n\n- Add SQL based principal ACL support.\n  [rnix]\n\n- Python 3 compatibility.\n  [rnix]\n\n- Fix hex formatting in ``cone.sql.model.GUID.process_bind_param``.\n  [rnix]\n\n- Register SQL session to transaction manager with ``zope.sqlalchemy.register``.\n  [rnix]\n\n- Use ``pyramid_tm`` instead of ``repoze.tm2``. Disabled by default, must be\n  enabled explicitely via ``pyramid.includes``.\n  [rnix]\n\n- Use ``pyramid_retry`` instead of ``repoze.retry``. Disabled by default, must be\n  enabled explicitely via ``pyramid.includes``.\n  [rnix]\n\n- Upgrade to ``cone.app`` 1.0b1.\n  [rnix]\n\n\n0.1 (2017-03-28)\n----------------\n\n- Initial work.\n  [rnix]\n\n\nLicense\n=======\n\nCopyright (c) 2017-2021, BlueDynamics Alliance, Austria\nCopyright (c) 2021-2022, Cone Contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice, this\n  list of conditions and the following disclaimer in the documentation and/or\n  other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n",
    "bugtrack_url": null,
    "license": "Simplified BSD",
    "summary": "SQLAlchemy integration for cone.app",
    "version": "0.8",
    "project_urls": {
        "Homepage": "http://github.com/conestack/cone.sql"
    },
    "split_keywords": [
        "node",
        "pyramid",
        "cone",
        "web"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b4fbab135679305c7acea96d31dfbce3cdc91700337555cbc97a5076e312c6f3",
                "md5": "181d143c802f3ab45dafc229b97eeb0e",
                "sha256": "a0f199467c84dd023a9819fa4bdebb1c846b914c90cd3a9b5fa1cb1c9ca0c9a3"
            },
            "downloads": -1,
            "filename": "cone.sql-0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "181d143c802f3ab45dafc229b97eeb0e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 29967,
            "upload_time": "2024-02-12T10:15:11",
            "upload_time_iso_8601": "2024-02-12T10:15:11.598845Z",
            "url": "https://files.pythonhosted.org/packages/b4/fb/ab135679305c7acea96d31dfbce3cdc91700337555cbc97a5076e312c6f3/cone.sql-0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6f3ffbc5b623104badc193b4b6e16f3d2e2c66b79b0cc331983c1297f67cb190",
                "md5": "40c6505488720efaf2612d70086458e9",
                "sha256": "399b1ea50ea2c31e4cda8b9ddff9f90cd5e48f3ef804b9e824feed54853dde0c"
            },
            "downloads": -1,
            "filename": "cone.sql-0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "40c6505488720efaf2612d70086458e9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 29884,
            "upload_time": "2024-02-12T10:15:13",
            "upload_time_iso_8601": "2024-02-12T10:15:13.523544Z",
            "url": "https://files.pythonhosted.org/packages/6f/3f/fbc5b623104badc193b4b6e16f3d2e2c66b79b0cc331983c1297f67cb190/cone.sql-0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-12 10:15:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "conestack",
    "github_project": "cone.sql",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "cone.sql"
}
        
Elapsed time: 0.18599s