Skip to main content

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.

Metadata

Release files for oarepo-model-builder-files 4.0.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oarepo-model-builder-files 4.0.22
File Size Uploaded
oarepo_model_builder_files-4.0.22.tar.gz 14.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oarepo-model-builder-files 4.0.22
File Interpreter ABI Platform
oarepo_model_builder_files-4.0.22-py3-none-any.whl Python 3 none any Details

Total release size: 43.5 kB

Release files / oarepo_model_builder_files-4.0.22.tar.gz

Download URL oarepo_model_builder_files-4.0.22.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
755f57ecfa4bb9b0025dff632332af268a9c4217f1314f3f1fb0296ce9e2a30f
BLAKE2b-256 checksum
How to use checksums
eb47acfb87b7ccae469485b1af461562defb3429764bde4df094a38e43f93354
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / oarepo_model_builder_files-4.0.22-py3-none-any.whl

Download URL oarepo_model_builder_files-4.0.22-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab99a81805f8e62bb1933f1aafab1c911ab85bb9717c7e62d5f875f335e0400d
BLAKE2b-256 checksum
How to use checksums
26ff6fa35f07109b0ea1625a94a2bf91c5c8c4741002cf16eddefaa2dee67b12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

4.0.22 This release

2 release files

4.0.20

2 release files

4.0.16

2 release files

4.0.15

2 release files

4.0.14

2 release files

4.0.13

2 release files

4.0.12

2 release files

4.0.11

2 release files

4.0.9

2 release files

4.0.8

2 release files

4.0.7

2 release files

4.0.6

2 release files

4.0.5

2 release files

4.0.4

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.1.5

2 release files

3.1.4

2 release files

3.1.3

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

2.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page