soso
For converting dataset metadata into Science On Schema.Org markup.
Quick Start
Installation
Install from PyPI:
$ pip install soso
Metadata Conversion
To perform a conversion, specify the file path of the metadata and the desired conversion strategy. Each metadata standard corresponds to a specific strategy.
>>> from soso.main import convert
>>> r = convert(file='metadata.xml', strategy='EML')
>>> r
'{"@context": ["https://schema.org/", {"prov": "http://www. ..."}]'
For a list of available strategies, please refer to the documentation of the convert function.
Adding Unmappable Properties
Some SOSO properties may not be derived from metadata records alone. In such cases, additional information can be provided via kwargs, where keys match the top level property name, and values are the property value.
For example, the url property representing the landing page URL does not exist in an EML metadata record. But this information is known to the repository hosting the dataset.
>>> kwargs = {'url': 'https://sample-data-repository.org/dataset/472032'}
>>> r = convert(file='metadata.xml', strategy='EML', **kwargs)
>>> r
'{"@context": ["https://schema.org/", {"prov": "http://www. ..."}]'
It's worth noting that this kwargs approach is not limited to supplying unmappable properties; it can be utilized to override any top-level SOSO property.
Unmappable properties are listed in the strategy documentation.
Other Modifications
Any additional modifications can be made to the resulting JSON-LD string before it is used. Simply parse the string into a Python dictionary, make the necessary changes, and then convert it back to a JSON-LD string.
Shared Conversion Scripts
When data repositories use a common metadata standard and adopt shared infrastructure, such as databases containing ancillary information, a shared conversion script can be used. These scripts reliably reference the shared infrastructure to create a richer SOSO record by incorporating this additional information. Below is a list of available scripts and their usage examples:
API Reference and User Guide
The API reference and user guide are available on Read the Docs.
Code of Conduct
In the spirit of collaboration, we emphasize the importance of maintaining a respectful and inclusive environment.
See the Code of Conduct for details.
Metadata
Release files for soso 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| soso-1.2.1.tar.gz | 101.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| soso-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 208.0 kB
Release files / soso-1.2.1.tar.gz
| Download URL | soso-1.2.1.tar.gz |
|---|---|
| Size | 101.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07b208b22a2238353d5ff74e831fbdb218bf152d5c6f51ed5ce6b5e842826498
|
|
BLAKE2b-256 checksum How to use checksums |
d7d09869440e42b017b2d8f7afca40ea18272d3f9f6925c27b21e106325117a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / soso-1.2.1-py3-none-any.whl
| Download URL | soso-1.2.1-py3-none-any.whl |
|---|---|
| Size | 106.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d9a287c38558828e2b212684a43453f73719bb22477231bb0e00047c3330acd
|
|
BLAKE2b-256 checksum How to use checksums |
afc6b02c0c3781ba02d8f3a1b10912979329ea9281c64a72061037726f86a10b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|