You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ro-crate-py is a Python library to create and consume [Research Object Crates](https://w3id.org/ro/crate). It currently supports the [RO-Crate 1.1](https://w3id.org/ro/crate/1.1)specification.
3
+
ro-crate-py is a Python library to create and consume [Research Object Crates](https://w3id.org/ro/crate). It supports the current [RO-Crate 1.2](https://w3id.org/ro/crate/1.2) specification as well as the older [RO-Crate 1.1](https://w3id.org/ro/crate/1.1)and [RO-Crate 1.0](https://w3id.org/ro/crate/1.0).
4
4
5
5
## Installation
6
6
@@ -225,6 +225,25 @@ Note that entities can have multiple types, e.g.:
225
225
"@type"= ["File", "SoftwareSourceCode"]
226
226
```
227
227
228
+
#### Selecting the RO-Crate specification version
229
+
230
+
By default, a newly created RO-Crate conforms to the [RO-Crate 1.2](https://w3id.org/ro/crate/1.2) specification, but 1.0 and 1.1 are still supported:
231
+
232
+
```pycon
233
+
>>> from rocrate.rocrate import ROCrate
234
+
>>> crate = ROCrate()
235
+
>>> crate.version
236
+
'1.2'
237
+
>>> crate = ROCrate(version="1.0")
238
+
>>> crate.version
239
+
'1.0'
240
+
>>> crate.metadata.id
241
+
'ro-crate-metadata.jsonld'
242
+
```
243
+
244
+
When consuming an RO-Crate (see below), the `version` parameter is ignored, and the RO-Crate version is read from the metadata descriptor instead.
245
+
246
+
228
247
### Consuming an RO-Crate
229
248
230
249
An existing RO-Crate package can be loaded from a directory or zip file:
0 commit comments