Package: risclog.sqlalchemy
risclog.sqlalchemyrisclog.sqlalchemy encapsulatessqlalchemymodelling infrastructure. It
eases the setup of (multi-)database environments and the usage of sqlalchemy
models by providing often used functionality on special classes.This package is compatible with Python version 3.7 up to 3.11.Developing risclog.sqlalchemyAuthor:gocept<mail@gocept.com>Outdated Online documentation:https://pythonhosted.org/risclog.sqlalchemy/PyPI page:https://pypi.org/project/risclog.sqlalchemy/Issue tracker:https://github.com/gocept/risclog.sqlalchemy/issues/Source code:https://github.com/gocept/risclog.sqlalchemyCurrent change log:https://github.com/gocept/risclog.sqlalchemy/blob/master/CHANGES.rstRunning testsSimply run./pytestin the root of the repository.DocumentationIn order to build the Sphinx documentation, run the following command with a
python, wheresphinxis installed:$ python setup.py build_sphinxIn order to upload the Sphinx documentation, run the following command with a
python, wheresphinx-pypi-uploadis installed:$ python setup.py upload_sphinxChange log for risclog.sqlalchemy6.0 (2023-09-26)IntroduceModelCachethat reduces the number of DB requests when dealing
with huge amounts of sqlalchemy models.Allow specifyingkeep_sessionandexpire_on_commit.Drop support for Python 3.6.Drop support for SQLAlchemy 1.0 and 1.1.Add support for Python 3.10 and 3.11.Restrict supported SQLALchemy to < 2.5.1 (2021-04-28)FeaturesEnsure compatibility withSQLAlchemy >= 1.4.Other changesUse github actions as CI.5.0 (2020-11-03)Backward incompatible changesDrop support for Python 2.Drop thepython2extra insetup.py.FeaturesNo longer constraint tozope.component < 4.4.1(introduced in 3.0).4.0 (2020-02-17)Backward incompatible changesAdd support forzope.sqlalchemy >= 1.3by requiring at least this version.
(Older versions only supportedzope.sqlalchemy <= 1.2.)Drop support for PyPy, PyPy3, Python 3.4 and 3.5.Other changesAdd support for Python 3.7, 3.8, 3.9a3.Migrate to Github.3.0 (2018-01-16)Drop support for Python 3.3.ReintroduceRoutingSession.using_bindas it is needed for executing queries
in multi database environments. It was removed in version2.0.Pin tozope.component < 4.4.1for now as we are using a private variable
from this package which has been removed lately.2.3 (2017-04-06)Add the fixture.fixtures.database__selenium_testingto switch SQLAlchemy
session handling to into the same way the live server does it. Using this
fixture leads toDetachedInstanceErrorexceptions when using a database
object after the commit. It has to be fetched again from the database.Omit files from sdist which are related to buildout, testing or mercurial.2.2 (2017-01-12)Support Python 3.6 and PyPy3.Fixsetup.pyto no longer use absolute paths.2.1 (2016-01-25)Add compatibility topypy.Also removed explicit dependency topsycopg2as it’s a PostgreSQL specific
dependency and not compatible with pypy. You will needpsycopg2cffiin
order to runrisclog.sqlalchemywithpypy.2.0 (2015-12-18)RemovedRoutingSession.using_bind, require SQLAlchemy >= 1.0. (#13968)Updated API calls to alembic, require alembic >= 0.7. (#13968)Added documentation. (#13952)1.8 (2015-09-29)Officially supporting Python 3.3 up to 3.5.Set maximum supported version numbers ofalembicandSQLALchemyinsetup.py1.7.1 (2014-10-15)Fix bug in testing mode detection so it works with sqlite, too.1.7 (2014-07-29)Have.model.Object.createuse the**kwconstructor instead of
performing setattr itself.Made commit in db.empty optional.1.6 (2014-06-23)Make test setup/teardown a bit more independent from the IDatabase utility.Made pyramid dependent code optional, because it is an optional requirement.1.5.1 (2014-03-31)Moved the project to bitbucket.org and prepared for public release.1.5 (2014-03-06)Adjust test dependency for external projects, so pyramid is not required.
(#1458)1.4 (2014-01-27)Do not truncatespatial_ref_syswhen emptying entire database. (#13144)1.3 (2013-12-18)Do not truncatealembic_versionswhen emptying entire database (usingdb.empty(engine))Fix create_defaults, so it can be used with multiple engines. (#1172)1.2 (2013-12-13)Fixed setup.py1.1 (2013-12-13)Allow.db.Database.empty()to not restart sequences. (This can be
necassary if the user is not allowed to callALTER SEQUENCE.)Create factory for JSON renderer, so it can be customized via arguments.
(#1037)1.0 (2013-12-11)CAUTION: Backward incompatible changes to provide multiple database
support. You need to change:Use thepyramidextra to use the pyramid serializers and call.serializer.patch()by yourself.Changes in.model:Use.model.declarative_base(cls)to register a class as SQLALchemydeclarative_base.Use your own declarative_base as.model.Objecthas been dropped.Create your ownReflectedObjectas.model.ReflectedObjecthas been
dropped.Changes in.db.Database:To get an instance use.db.get_database(testing=<True|False>).To register a database with the utility useregister_engine.emptynow expects to get the engine as first argument and allows to
cadcade via (cascade=True)._verifywas removed, use_verify_enginenow.setup_utilitywas removed, it is now done in__init__.To access formerengine`attribute useget_engine.closewas renamed todrop_engine.To create all tables for a database usecreate_all.Changes in.testing:setUpDBlost its first argument as it was not used.setUpnow expects a dict orNone, see its docstring.Provide a way to insert default values for new created models. (#1137)Added support for schema migrations with alembic.Dropped support forPython 2.6.Added convenience functions to createpy.testdatabase fixtures.Declaredpyramidas test dependency so tests only need thetestextra.Declared testing dependency onplone.testing[test]since we useplone.testing.zcawhich imports thattestextra’s dependencies.0.6 (2013-06-27)Added convenience methods on.db.Databasefor teardown in tests.Updated to Buildout 2.Using py.test as testrunner.Added Python 3.3 compatibility.0.5 (2013-06-14)Add Database methods for setting up a database utility and emptying tables.Add testing layer that sets up a database utility (requires plone.testing).0.4 (2013-06-07)Add helper to provide transparent json encoding of sqlalchemy mapped objects,
dates, datetimes and decimals. (#39)Addcreate_defaultsclass method on base model which can be used to create
test data into the database.0.3 (2013-06-04)Repair db setup for reflected and unreflected objects.0.2 (2013-06-04)Add unreflected Object model next to the reflected Object model.0.1 (2013-06-03)initial release