Skip to content

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

5-Safes RO-Crate Library

Python library for the creation and manipulation of 5-Safes RO-Crates. This library is built on the RO-Crate python library, and is intended to provide support specifically for the creation of 5-Safes RO-Crates.

Installation

Currently this package is installable only from source. To do this, prepare your python virtual environment:

python -m pip install rocrate

Then the library can installed using:

python -m pip install .

For development work, install this library in editable mode:

python -m pip install -e .

Usage

To load the library and create the framework RO-Crate:

from fivesafe_crate import FiveSafesCrate

crate = FiveSafesCrate(
    root_dataset_id="https://tre72.example.org/activities/A123/current",
    record_identifier="https://tre72.example.org/activities/A123",
    identifier="https://tre72.example.org/activities/A123/current"
)

To add a user:

user_provenance = {
    'full_name': 'Josiah Stinkney Carberry',
    'id': 'jcarberry',
    'orcid': 'https://orcid.org/0000-0002-1825-0097'
}

crate.add_person_from_prov(user_provenance)

To write out the RO-Crate:

crate.write("./")

About

Python library to create and consume Five-Safes RO-Crates. Built on the ro-crate-py library.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages