Skip to main content

No project description provided

Project description

OARepo model builder files

Plugin adding support for working with files based on the invenio model.
Files are represented as another ("file") record connected with the original parent one. The plugin generates the file record and modifies the parent record to create connection with new file one. The file record is specified under "files" attribute in the model yaml file, see example in tests.

The plugin runs the original model builder on the files model in "files" profile, reusing a lot of the model builder code with different configuration, notably with different base classes for record, service, resource and config classes. To get an idea which code is reused, see entrypoints. For configuration changes, see model preprocessors.

Api

The files plugin provides an api for working with files. The api is by default accessible at {original model url}/{base record id}/files. The api is taken from InvenioRDM, the docs are here

Example

A simple record with associated files can be defined as this:

record:
  properties:
    metadata:
      properties:
        title:
          type: fulltext
        status:
          type: keyword
  module:
    name: thesis
  use:
    - invenio

files:
  properties:
    metadata:
      properties:
        title:
          type: fulltext
  module:
    name: thesis
  use:
    - invenio_files
settings:
  schema-server: 'local://'

Using the api, first an instance of the model has to be created. Then an instance of the associated file record. The file content is then uploaded in separate step and finally the upload must be commited.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oarepo_model_builder_files-4.0.19.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oarepo_model_builder_files-4.0.19-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file oarepo_model_builder_files-4.0.19.tar.gz.

File metadata

File hashes

Hashes for oarepo_model_builder_files-4.0.19.tar.gz
Algorithm Hash digest
SHA256 0bcd8cb11475f042ff09ef1b945c7f2148d0a97e1725f74e50154d6924b0eea0
MD5 d1a88838acfe9899315f5a4b33fcd373
BLAKE2b-256 11ba3176dce255f11422aa878f56071a2be8ae4f18292c55f58de5b47877ea5d

See more details on using hashes here.

File details

Details for the file oarepo_model_builder_files-4.0.19-py3-none-any.whl.

File metadata

File hashes

Hashes for oarepo_model_builder_files-4.0.19-py3-none-any.whl
Algorithm Hash digest
SHA256 f619fd285b3dcfc0f4b1d03d9c2d3cbfaa8cbaa0fa4b5d5d86a40387fb6c8e73
MD5 cfcbb7271953d9917086a80727e63001
BLAKE2b-256 2deaf0579ee1ed2e981d6700e09e2b64ba96ac41118ce5d07579c35617a85aaa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page