invenio-records


Nameinvenio-records JSON
Version 2.4.1 PyPI version JSON
download
home_pagehttps://github.com/inveniosoftware/invenio-records
SummaryInvenio-Records is a metadata storage module.
upload_time2024-11-05 21:39:19
maintainerNone
docs_urlhttps://pythonhosted.org/invenio-records/
authorCERN
requires_python>=3.7
licenseMIT
keywords invenio metadata
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ..
    This file is part of Invenio.
    Copyright (C) 2015-2018 CERN.

    Invenio is free software; you can redistribute it and/or modify it
    under the terms of the MIT License; see LICENSE file for more details.

================
 Invenio-Records
================

.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-records.svg
        :target: https://github.com/inveniosoftware/invenio-records/blob/master/LICENSE

.. image:: https://github.com/inveniosoftware/invenio-records/workflows/CI/badge.svg
        :target: https://github.com/inveniosoftware/invenio-records/actions

.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-records.svg
        :target: https://coveralls.io/r/inveniosoftware/invenio-records

.. image:: https://img.shields.io/pypi/v/invenio-records.svg
        :target: https://pypi.org/pypi/invenio-records



Invenio-Records is a metadata storage module. A *record* is a JSON document with
revision history identified by a unique `UUID`_ .

.. _UUID: https://en.wikipedia.org/wiki/Universally_unique_identifier

Features:

 * Generic JSON document storage with revision history.
 * JSONSchema validation of documents.
 * Records creation, update and deletion.
 * Administration interface for CRUD operations on records.

Further documentation available Documentation:
https://invenio-records.readthedocs.io/

..
    This file is part of Invenio.
    Copyright (C) 2015-2024 CERN.

    Invenio is free software; you can redistribute it and/or modify it
    under the terms of the MIT License; see LICENSE file for more details.

Changes
=======

Version v2.4.1 (released 2024-11-05)

- model: make forward compatible to sqlalchemy >= 2

Version v2.4.0 (released 2024-10-08)

- relation: modified lookup_data for nested fields
- Adds translations

Version 2.3.0 (released 2024-02-19)

- tests: add tests for filter_dict_keys
- dictutils: add filter_dict_keys

Version 2.2.2 (released 2023-09-12)

- search: prevent flush on search queries

Version 2.2.1 (released 2023-09-12)

- revert dumper: merge record to working data instead of replacing

Version 2.2.0 (released 2023-09-05)

- dumper: merge record to working data instead of replacing

Version 2.1.0 (released 2023-03-02)

- remove deprecated flask-babelex dependency and imports
- upgrade invenio-i18n
- upgrade invenio-admin

Version 2.0.1 (released 2022-11-18)

- Adds translations
- Upgrades pytest-invenio

Version 2.0.0 (released 2022-09-07)

- Renames SearchDumper classes to remove Elasticsearch naming.

Version 1.7.6 (released 2022-09-07)

- Moves the _fields attribute of RelationFields into a cached property.
  This allows delayed calculation of its values.

Version 1.7.5 (released 2022-09-06)

- Fixes a bug on MultiRelationsField where fields would be calculated multiple
  times. Now they are calculated only once, and cached.

Version 1.7.4 (released 2022-08-23)

- Adds support for nested RelationFields via MultiRelationsField
- Migrates to declarative module (setup.cfg)
- Migrates code to Black formatter
- Adds german translations
- Removes babel extensions for Jinja

Version 1.7.3 (released 2022-05-04)

- Adds utility to merge Python dicts

Version 1.7.2 (released 2022-05-03)

- Fixes regression in 1.7.1.

Version 1.7.1 (released 2022-04-26)

- Fixes dictionary lookup during dereferencing for optional/non-existing keys.

Version 1.7.0 (released 2022-04-13)

- Adds support for relations defined via database-level foreign keys.

- Backwards incompatible: Changes the relations definitions to support both
  dictionary keys and object attributes instead of only dictionary keys. Change
  existing code from::

    Relation(
        # ...
        attrs=['title'],
    ),

  to::

    Relation(
        # ...
        keys=['title'],
    ),

- Move from setup.py to setup.cfg for purely declarative package definitions.

Version 1.6.2 (released 2022-04-06)

- Removes python 3.6 from test suite.
- Initializes parent class of ModelField.
- Bumps several dependencies (invenio-db, invenio-base, etc.) to
  support Flask 2.1.

Version 1.6.1 (released 2021-12-04)

- Adds support for the post commit life-cycle hook.

Version 1.6.0 (released 2021-10-20)

- Adds a new relations system field for managing relations between records.
  Part of RFC #40.

- Adds a new related model system field to serialize/dump a related object into
  the record JSON.

- Adds new configuration variables to allow injecting a custom JSONSchema
  RefResolver together with a custom JSONSchema store. Part of RFC #42 to
  simplify JSON Schema resolution and registry management and more easily build
  composable JSONSchemas.

- Deprecated the Record.patch() method.

Version 1.5.0

- Not released to avoid polluting Invenio v3.4.

Version 1.4.0 (released 2020-12-09)

- Backwards incompatible: By default the versioning table is now disabled in
  the ``RecordMetadataBase`` (the ``RecordMetadata`` is still versioned). If
  you subclasses ``RecordMetadataBase`` and needs versioning, you need to add
  the following line in your class:

  .. code-block:: python

        class MyRecordMetadata(db.Model, RecordMetadataBase):
            __versioned__ = {}

- Backwards incompatible: The ``Record.validate()`` method is now split in
  two methods ``validate()`` and ``_validate()``. If you overwrote the
  ``validate()`` method in a subclass, you may need to overwrite instead
  ``_validate()``.

- Backwards incompatible: Due to the JSON encoding/decoding support, the
  Python dictionary representing the record and the SQLAlchemy models are
  separate objects and updating one, won't automatically update the other.
  Normally, you should not have accessed ``record.model.json`` in your code,
  however if you did, you need to rewrite it and rely on the ``create()`` and
  ``commit()`` methods to update the model's ``json`` column.

- Adds a new is_deleted property to the Records API.

- Removes the @ prefix that was used to separate metadata fields from other
  fields.

- Adds a SystemFieldContext which allows knowing the record class when
  accessing the attribute through the class instead of object instance.

- Adds helpers for caching related objects on the record.

- Adds support for JSON encoding/decoding to/from the database. This allows
  e.g. have records with complex data types such as datetime objects.
  JSONSchema validation happens on the JSON encoded version of the record.

- Adds dumpers to support dumping and loading records from secondary copies
  (e.g. records stored in an Elasticsearch index).

- Adds support record extensions as a more strict replacement of signals.
  Allows writing extensions (like the system fields), that integrate into the
  Records API.

- Adds support for system fields that are Python data descriptors on the Record
  which allows for managed access to the Record's dictionary.

- Adds support for disabling signals.

- Adds support for disabling JSONRef replacement.

- Adds support for specifying JSONSchema format checkers and validator class at
  a class-level instead of per validate call.

- Adds support for specifying class-wide JSONSchema format checkers

- Adds a cleaner definition of a what a soft-deleted record using the
  is_deleted hybrid property on the database model.

- Adds support for undeleting a soft-deleted record.

Version 1.3.2 (released 2020-05-27)

- Fixes a bug causing incorrect revisions to be fetched. If ``record.commit()``
  was called multiple times prior to a ``db.session.commit()``, there would be
  gaps in the version ids persisted in the database. This meant that if you
  used ``record.revisions[revision_id]`` to access a revision, it was not
  guaranteed to return that specific revision id. See #221

Version 1.3.1 (released 2020-05-07)

- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0.
- Removed dependency on Invenio-PIDStore and releated documentation.
  Functionality was removed in v1.3.0.

Version 1.3.0 (released 2019-08-01)

- Removed deprecated CLI.

Version 1.2.2 (released 2019-07-11)

- Fix XSS vulnerability in admin interface.

Version 1.2.1 (released 2019-05-14)

- Relax Flask dependency to v0.11.1.

Version 1.2.0 (released 2019-05-08)

- Allow to store RecordMetadata in a custom db table.

Version 1.1.1 (released 2019-07-11)

- Fix XSS vulnerability in admin interface.

Version 1.1.0 (released 2019-02-22)

- Removed deprecated Celery task.
- Deprecated CLI

Version 1.0.2 (released 2019-07-11)

- Fix XSS vulnerability in admin interface.

Version 1.0.1 (released 2018-12-14)

- Fix CliRunner exceptions.
- Fix JSON Schema URL.

Version 1.0.0 (released 2018-03-23)

- Initial public release.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/inveniosoftware/invenio-records",
    "name": "invenio-records",
    "maintainer": null,
    "docs_url": "https://pythonhosted.org/invenio-records/",
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "invenio metadata",
    "author": "CERN",
    "author_email": "info@inveniosoftware.org",
    "download_url": "https://files.pythonhosted.org/packages/fd/1b/8f6d44c65d997d3e553c2cc21fb2c3b16dafc98e49ca32fcfed58115046b/invenio-records-2.4.1.tar.gz",
    "platform": "any",
    "description": "..\n    This file is part of Invenio.\n    Copyright (C) 2015-2018 CERN.\n\n    Invenio is free software; you can redistribute it and/or modify it\n    under the terms of the MIT License; see LICENSE file for more details.\n\n================\n Invenio-Records\n================\n\n.. image:: https://img.shields.io/github/license/inveniosoftware/invenio-records.svg\n        :target: https://github.com/inveniosoftware/invenio-records/blob/master/LICENSE\n\n.. image:: https://github.com/inveniosoftware/invenio-records/workflows/CI/badge.svg\n        :target: https://github.com/inveniosoftware/invenio-records/actions\n\n.. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-records.svg\n        :target: https://coveralls.io/r/inveniosoftware/invenio-records\n\n.. image:: https://img.shields.io/pypi/v/invenio-records.svg\n        :target: https://pypi.org/pypi/invenio-records\n\n\n\nInvenio-Records is a metadata storage module. A *record* is a JSON document with\nrevision history identified by a unique `UUID`_ .\n\n.. _UUID: https://en.wikipedia.org/wiki/Universally_unique_identifier\n\nFeatures:\n\n * Generic JSON document storage with revision history.\n * JSONSchema validation of documents.\n * Records creation, update and deletion.\n * Administration interface for CRUD operations on records.\n\nFurther documentation available Documentation:\nhttps://invenio-records.readthedocs.io/\n\n..\n    This file is part of Invenio.\n    Copyright (C) 2015-2024 CERN.\n\n    Invenio is free software; you can redistribute it and/or modify it\n    under the terms of the MIT License; see LICENSE file for more details.\n\nChanges\n=======\n\nVersion v2.4.1 (released 2024-11-05)\n\n- model: make forward compatible to sqlalchemy >= 2\n\nVersion v2.4.0 (released 2024-10-08)\n\n- relation: modified lookup_data for nested fields\n- Adds translations\n\nVersion 2.3.0 (released 2024-02-19)\n\n- tests: add tests for filter_dict_keys\n- dictutils: add filter_dict_keys\n\nVersion 2.2.2 (released 2023-09-12)\n\n- search: prevent flush on search queries\n\nVersion 2.2.1 (released 2023-09-12)\n\n- revert dumper: merge record to working data instead of replacing\n\nVersion 2.2.0 (released 2023-09-05)\n\n- dumper: merge record to working data instead of replacing\n\nVersion 2.1.0 (released 2023-03-02)\n\n- remove deprecated flask-babelex dependency and imports\n- upgrade invenio-i18n\n- upgrade invenio-admin\n\nVersion 2.0.1 (released 2022-11-18)\n\n- Adds translations\n- Upgrades pytest-invenio\n\nVersion 2.0.0 (released 2022-09-07)\n\n- Renames SearchDumper classes to remove Elasticsearch naming.\n\nVersion 1.7.6 (released 2022-09-07)\n\n- Moves the _fields attribute of RelationFields into a cached property.\n  This allows delayed calculation of its values.\n\nVersion 1.7.5 (released 2022-09-06)\n\n- Fixes a bug on MultiRelationsField where fields would be calculated multiple\n  times. Now they are calculated only once, and cached.\n\nVersion 1.7.4 (released 2022-08-23)\n\n- Adds support for nested RelationFields via MultiRelationsField\n- Migrates to declarative module (setup.cfg)\n- Migrates code to Black formatter\n- Adds german translations\n- Removes babel extensions for Jinja\n\nVersion 1.7.3 (released 2022-05-04)\n\n- Adds utility to merge Python dicts\n\nVersion 1.7.2 (released 2022-05-03)\n\n- Fixes regression in 1.7.1.\n\nVersion 1.7.1 (released 2022-04-26)\n\n- Fixes dictionary lookup during dereferencing for optional/non-existing keys.\n\nVersion 1.7.0 (released 2022-04-13)\n\n- Adds support for relations defined via database-level foreign keys.\n\n- Backwards incompatible: Changes the relations definitions to support both\n  dictionary keys and object attributes instead of only dictionary keys. Change\n  existing code from::\n\n    Relation(\n        # ...\n        attrs=['title'],\n    ),\n\n  to::\n\n    Relation(\n        # ...\n        keys=['title'],\n    ),\n\n- Move from setup.py to setup.cfg for purely declarative package definitions.\n\nVersion 1.6.2 (released 2022-04-06)\n\n- Removes python 3.6 from test suite.\n- Initializes parent class of ModelField.\n- Bumps several dependencies (invenio-db, invenio-base, etc.) to\n  support Flask 2.1.\n\nVersion 1.6.1 (released 2021-12-04)\n\n- Adds support for the post commit life-cycle hook.\n\nVersion 1.6.0 (released 2021-10-20)\n\n- Adds a new relations system field for managing relations between records.\n  Part of RFC #40.\n\n- Adds a new related model system field to serialize/dump a related object into\n  the record JSON.\n\n- Adds new configuration variables to allow injecting a custom JSONSchema\n  RefResolver together with a custom JSONSchema store. Part of RFC #42 to\n  simplify JSON Schema resolution and registry management and more easily build\n  composable JSONSchemas.\n\n- Deprecated the Record.patch() method.\n\nVersion 1.5.0\n\n- Not released to avoid polluting Invenio v3.4.\n\nVersion 1.4.0 (released 2020-12-09)\n\n- Backwards incompatible: By default the versioning table is now disabled in\n  the ``RecordMetadataBase`` (the ``RecordMetadata`` is still versioned). If\n  you subclasses ``RecordMetadataBase`` and needs versioning, you need to add\n  the following line in your class:\n\n  .. code-block:: python\n\n        class MyRecordMetadata(db.Model, RecordMetadataBase):\n            __versioned__ = {}\n\n- Backwards incompatible: The ``Record.validate()`` method is now split in\n  two methods ``validate()`` and ``_validate()``. If you overwrote the\n  ``validate()`` method in a subclass, you may need to overwrite instead\n  ``_validate()``.\n\n- Backwards incompatible: Due to the JSON encoding/decoding support, the\n  Python dictionary representing the record and the SQLAlchemy models are\n  separate objects and updating one, won't automatically update the other.\n  Normally, you should not have accessed ``record.model.json`` in your code,\n  however if you did, you need to rewrite it and rely on the ``create()`` and\n  ``commit()`` methods to update the model's ``json`` column.\n\n- Adds a new is_deleted property to the Records API.\n\n- Removes the @ prefix that was used to separate metadata fields from other\n  fields.\n\n- Adds a SystemFieldContext which allows knowing the record class when\n  accessing the attribute through the class instead of object instance.\n\n- Adds helpers for caching related objects on the record.\n\n- Adds support for JSON encoding/decoding to/from the database. This allows\n  e.g. have records with complex data types such as datetime objects.\n  JSONSchema validation happens on the JSON encoded version of the record.\n\n- Adds dumpers to support dumping and loading records from secondary copies\n  (e.g. records stored in an Elasticsearch index).\n\n- Adds support record extensions as a more strict replacement of signals.\n  Allows writing extensions (like the system fields), that integrate into the\n  Records API.\n\n- Adds support for system fields that are Python data descriptors on the Record\n  which allows for managed access to the Record's dictionary.\n\n- Adds support for disabling signals.\n\n- Adds support for disabling JSONRef replacement.\n\n- Adds support for specifying JSONSchema format checkers and validator class at\n  a class-level instead of per validate call.\n\n- Adds support for specifying class-wide JSONSchema format checkers\n\n- Adds a cleaner definition of a what a soft-deleted record using the\n  is_deleted hybrid property on the database model.\n\n- Adds support for undeleting a soft-deleted record.\n\nVersion 1.3.2 (released 2020-05-27)\n\n- Fixes a bug causing incorrect revisions to be fetched. If ``record.commit()``\n  was called multiple times prior to a ``db.session.commit()``, there would be\n  gaps in the version ids persisted in the database. This meant that if you\n  used ``record.revisions[revision_id]`` to access a revision, it was not\n  guaranteed to return that specific revision id. See #221\n\nVersion 1.3.1 (released 2020-05-07)\n\n- Deprecated Python versions lower than 3.6.0. Now supporting 3.6.0 and 3.7.0.\n- Removed dependency on Invenio-PIDStore and releated documentation.\n  Functionality was removed in v1.3.0.\n\nVersion 1.3.0 (released 2019-08-01)\n\n- Removed deprecated CLI.\n\nVersion 1.2.2 (released 2019-07-11)\n\n- Fix XSS vulnerability in admin interface.\n\nVersion 1.2.1 (released 2019-05-14)\n\n- Relax Flask dependency to v0.11.1.\n\nVersion 1.2.0 (released 2019-05-08)\n\n- Allow to store RecordMetadata in a custom db table.\n\nVersion 1.1.1 (released 2019-07-11)\n\n- Fix XSS vulnerability in admin interface.\n\nVersion 1.1.0 (released 2019-02-22)\n\n- Removed deprecated Celery task.\n- Deprecated CLI\n\nVersion 1.0.2 (released 2019-07-11)\n\n- Fix XSS vulnerability in admin interface.\n\nVersion 1.0.1 (released 2018-12-14)\n\n- Fix CliRunner exceptions.\n- Fix JSON Schema URL.\n\nVersion 1.0.0 (released 2018-03-23)\n\n- Initial public release.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Invenio-Records is a metadata storage module.",
    "version": "2.4.1",
    "project_urls": {
        "Homepage": "https://github.com/inveniosoftware/invenio-records"
    },
    "split_keywords": [
        "invenio",
        "metadata"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6a4c2adb1196a0f4aa26b6549a73ce233716633fe1f925279695d2e0861f9f10",
                "md5": "b191df7af540fa0765219ed48d3a206e",
                "sha256": "253649c67174690a7ac4b1c7bdefdea5647bd73e5b067dfea24dc9f254251047"
            },
            "downloads": -1,
            "filename": "invenio_records-2.4.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b191df7af540fa0765219ed48d3a206e",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 185325,
            "upload_time": "2024-11-05T21:39:16",
            "upload_time_iso_8601": "2024-11-05T21:39:16.967408Z",
            "url": "https://files.pythonhosted.org/packages/6a/4c/2adb1196a0f4aa26b6549a73ce233716633fe1f925279695d2e0861f9f10/invenio_records-2.4.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fd1b8f6d44c65d997d3e553c2cc21fb2c3b16dafc98e49ca32fcfed58115046b",
                "md5": "732df47a392ed8b436964c53fb92f76c",
                "sha256": "26b6d4c45da343e146c05a13d90db57c6d99d499e8a4c8596fc95fe7e4dbbbf3"
            },
            "downloads": -1,
            "filename": "invenio-records-2.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "732df47a392ed8b436964c53fb92f76c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 146213,
            "upload_time": "2024-11-05T21:39:19",
            "upload_time_iso_8601": "2024-11-05T21:39:19.134688Z",
            "url": "https://files.pythonhosted.org/packages/fd/1b/8f6d44c65d997d3e553c2cc21fb2c3b16dafc98e49ca32fcfed58115046b/invenio-records-2.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-05 21:39:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "inveniosoftware",
    "github_project": "invenio-records",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "invenio-records"
}
        
Elapsed time: 0.96482s