Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Load a crate from a (json) Object #178

Closed
ptsefton opened this issue Mar 18, 2024 · 5 comments · Fixed by #183
Closed

FEATURE: Load a crate from a (json) Object #178

ptsefton opened this issue Mar 18, 2024 · 5 comments · Fixed by #183

Comments

@ptsefton
Copy link

Unless I misunderstand this library can only read crates from disk. It would be very useful to be able to instantiate the library with an object (that would serialise in JSON to an RO-Crate Metadata Document). Eg if I have fetched RO-Crate metadata from an API.

@simleo
Copy link
Collaborator

simleo commented Mar 18, 2024

You mean a Python dictionary, I guess. It would be able to point only to web-based data entities

@ptsefton
Copy link
Author

ptsefton commented May 3, 2024

It can point to anything as an abstract structure including file paths -- but these not exist for some purposes eg writing a validator that might run in a context other than the place where the files are.

But yes, with an API at the moment if you fetch an RO-Crate metadata document it has to be saved before the library can use it, which is not optimal -- loading raw JSON or a python dictionary structure would be preferable.

@simleo
Copy link
Collaborator

simleo commented May 10, 2024

Implemented in #183. The metadata can point to nonexistent files or directories, the behavior when writing the crate is described in #136.

@ptsefton ptsefton reopened this Sep 9, 2024
@ptsefton
Copy link
Author

ptsefton commented Sep 9, 2024

Thanks @simleo - this does not appear to be released yet -- would love to use it

@simleo
Copy link
Collaborator

simleo commented Sep 13, 2024

I have just released version 0.11.0

@simleo simleo closed this as completed Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants