{ "info": { "author": "John Passaro", "author_email": "john.a.passaro@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Utilities" ], "description": "========\nOverview\n========\n\n\n\nAn Alembic plugin to keep records of upgrades and downgrades.\n\n* Free software: MIT license\n\nInstallation\n============\n\n::\n\n pip install Audit-Alembic\n\nGetting started\n===============\n\nQuickstart\n----------\n\n`Create an Alembic environment\n`_ if you don't\nalready have one. Edit its ``env.py`` to include the following::\n\n # ... imports ...\n import audit_alembic\n from myapp import version\n\n if not audit_alembic.alembic_supports_callback():\n raise audit_alembic.exc.AuditSetupError(\n 'This Alembic version does not have on_version_apply')\n auditor = audit_alembic.Auditor.create(version)\n\n def run_migrations_offline():\n ...\n context.configure(\n ...\n on_version_apply=auditor.listen,\n )\n ...\n\n def run_migrations_offline():\n ...\n context.configure(\n ...\n on_version_apply=auditor.listen\n )\n ...\n\nMore involved\n-------------\n\n:meth:`.Auditor.create` is a factory method: it creates an Alembic history\ntable for you and merely asks you to specify your application version (though\nit allows much else to be customized as well). If you are already maintaining a\ntable you wish to add records to whenever an Alembic operation takes place, and\nyou have a callable that creates a row for that table, you can instantiate\n:class:`.Auditor` directly::\n\n auditor = Auditor(HistoryTable, HistoryTable.alembic_version_applied)\n\nIn this case ``alembic_version_applied`` must return a dictionary that can\nserve as binds for an INSERT statement on ``HistoryTable``. It has the same\nsignature as documented for Alembic's ``on_version_apply`` hook.\n\n.. note\n Customizing not just what data to populate a row with but whether the row\n should appear at all is not currently supported but is\n `planned `_ for a\n release in the near future. Pull requests are welcomed.\n\nFull Documentation\n==================\n\nOnce the 0.2.0 release is complete, the docs will be accessible here:\nhttps://Audit-Alembic.readthedocs.io/\n\nDevelopment\n===========\n\nStatus\n------\n\nThe bulk of the test suite is complete and passing for Postgres, mysql, and\nSQLite. Travis does not appear to support MSSQL or Oracle so test status for\nthose DB backends is not known. If you find that it does not work for your\nbackend, pull requests to make it so will be happily accepted.\n\nPlease feel free to expand from there. See the issues for a list of known\nissues to work on.\n\nTesting\n-------\n\nTo run basic tests::\n\n $ virtualenv venv && source venv/bin/activate\n (venv) $ python setup.py install\n (venv) $ pip install pytest psycopg2\n (venv) $ pytest\n\nTo run all tests (i.e. py2 + py3, across all database drivers), run::\n\n $ tox\n\nSee CONTRIBUTING.rst for more detail.\nAlso see our `Travis setup `_.\n\n\nChangelog\n=========\n\n0.2.0\n-----\n\nPre-Alpha release.\n\n* Creates a listener for Alembic's ``on_version_apply`` callback hook which\n records information from that callback to a SQL table of the user's choosing.\n* Test setup making use of SQLAlchemy testing plugins and utilities and Alembic\n testing utilities.\n* Support for running with --sql as well as online mode.\n* Tests covering stamps, branches, and a couple of other complex use cases.\n* Test setup to cover multiple DB backends. Known to work: SQLite, Postgresql,\n mysql.\n\n0.1.0 (2017-06-21)\n------------------\n\n* First release on PyPI. (powered by cookiecutter-pylibrary_)\n\n.. _cookiecutter-pylibrary: https://github.com/ionelmc/cookiecutter-pylibrary\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/jpassaro/Audit-Alembic/archive/0.2.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jpassaro/Audit-Alembic", "keywords": "database,migration,db", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "Audit-Alembic", "package_url": "https://pypi.org/project/Audit-Alembic/", "platform": "", "project_url": "https://pypi.org/project/Audit-Alembic/", "project_urls": { "Download": "https://github.com/jpassaro/Audit-Alembic/archive/0.2.0.tar.gz", "Homepage": "https://github.com/jpassaro/Audit-Alembic" }, "release_url": "https://pypi.org/project/Audit-Alembic/0.2.0/", "requires_dist": [ "alembic (>=0.9.4)" ], "requires_python": "", "summary": "An Alembic plugin to keep records of upgrades and downgrades.", "version": "0.2.0" }, "last_serial": 3071548, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "39d0778c66b8726ecb48f1146aaf71b9", "sha256": "c1aaf97abb2ad8d71051959a6d1327ce355e90eb12586b13682f888f6eca7089" }, "downloads": -1, "filename": "Audit-Alembic-0.1.0.tar.gz", "has_sig": false, "md5_digest": "39d0778c66b8726ecb48f1146aaf71b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26024, "upload_time": "2017-07-06T19:38:02", "url": "https://files.pythonhosted.org/packages/79/ab/47991bc0e292438c54a94aeec9f0a5c9b7ec1fae84db1e216e97111a655a/Audit-Alembic-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "e6414cf03df2f06ebc38764a0ebc2630", "sha256": "f77ed88b61c49efa786f4ff61af01423661b264efdbd842dfbcd1e9fa1c194a3" }, "downloads": -1, "filename": "Audit_Alembic-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e6414cf03df2f06ebc38764a0ebc2630", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15619, "upload_time": "2017-08-04T03:00:54", "url": "https://files.pythonhosted.org/packages/4e/b5/286630a582e828998ff7e220fad56e5778fa55cd5d6e44a8fb7de2013651/Audit_Alembic-0.2.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e6414cf03df2f06ebc38764a0ebc2630", "sha256": "f77ed88b61c49efa786f4ff61af01423661b264efdbd842dfbcd1e9fa1c194a3" }, "downloads": -1, "filename": "Audit_Alembic-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e6414cf03df2f06ebc38764a0ebc2630", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15619, "upload_time": "2017-08-04T03:00:54", "url": "https://files.pythonhosted.org/packages/4e/b5/286630a582e828998ff7e220fad56e5778fa55cd5d6e44a8fb7de2013651/Audit_Alembic-0.2.0-py2.py3-none-any.whl" } ] }