Skip to main content

SOFT7

Installation

Install the core soft7 package, which supports SOFT7 entities and entity instances, with:

pip install soft7

Some functionality depends on optional dependencies, which are grouped into extras:

  • oteapi: SOFT7 data sources (s7.factories.create_datasource()) and the SOFT7 OTEAPI plugin. These rely on OTEAPI Core and OTELib.
  • graph: Utilities for working with SOFT7 entities as knowledge graphs (s7.graph).

To install soft7 with an extra, e.g., oteapi, run:

pip install 'soft7[oteapi]'

If you use oteapi functionality without the extra installed, an ImportError (s7.exceptions.MissingExtra) is raised that says how to install it.

OTEAPI plugin

The soft7 packages comes with an OTEAPI plugin that allows one to convert any core parser data to a SOFT7 Entity instance. The plugin requires the oteapi extra (see Installation).

To use the plugin, call the 'soft7' functionType function strategy.

Test the plugin

At the root of the repository is a Docker Compose file, which, when run, will start an OTEAPI Service that includes the soft7 OTEAPI plugin.

To start the service, run:

docker compose pull
docker compose up -d

To follow along with the installation of the soft7 package and startup of the OTEAPI Service, run:

docker logs -f soft7-oteapi-1

Press Ctrl+C to stop following the logs.

To eventually stop the services, run:

docker compose down

But first, let's test the plugin.

Open a Python shell, an IPython shell, or a Jupyter Notebook, and run:

from s7.factories import create_datasource

# Let us use an OPTIMADE structure from the Materials Project as our "raw" data source.
# The chosen structure is mp-1228448 (Al2O3):
# https://materialsproject.org/materials/mp-1228448/
# For more information about OPTIMADE, see https://www.optimade.org/
# For more information about the Materials Project, see https://materialsproject.org/
dataresource_config = {
    "downloadUrl": (
        "https://optimade.materialsproject.org/v1/structures/mp-1228448?"
        "response_format=json"
    ),
    "mediaType": "application/json",
}

# We need to setup a mapping configuration to tell the plugin how to map the OPTIMADE
# structure to a SOFT7 Entity instance.
# This requires knowledge of the OPTIMADE structure and the SOFT7 Entity.
# In our case the OPTIMADE structure specification is available at
# https://github.com/Materials-Consortia/OPTIMADE/blob/v1.1.0/optimade.rst#structures-entries
# and the SOFT7 Entity of choice is the `OPTIMADEStructure` Entity, which can be found
# at http://onto-ns.com/meta/1.0/OPTIMADEStructure
mapping_config = {
    "mappingType": "triples",
    "prefixes": {
        "optimade": "https://optimade.materialsproject.org/v1/structures/mp-1228448#",
        "soft7": "http://onto-ns.com/meta/1.0/OPTIMADEStructure#",
    },
    "triples": {
        ("optimade:data.id", "", "soft7:properties.id"),
        ("optimade:data.type", "", "soft7:properties.type"),
        ("optimade:data.attributes", "", "soft7:properties."),
    },
}

Metadata

Release files for soft7 0.6.0

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

Source distribution (sdist)

Source distribution for soft7 0.6.0
File Size Uploaded Provenance
soft7-0.6.0.tar.gz 33.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for soft7 0.6.0
File Interpreter ABI Platform
soft7-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 73.2 kB

Release files / soft7-0.6.0.tar.gz

Download URL soft7-0.6.0.tar.gz
Size 33.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6d5ffb90a52420dc3ec7516c5d3ba336d80a07963977175182f3e0883782b79d
BLAKE2b-256 checksum
How to use checksums
03c84c39adca8fe7e4d7cf572b0c5f397e85e6bc912057a9457d7bad239110a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / soft7-0.6.0-py3-none-any.whl

Download URL soft7-0.6.0-py3-none-any.whl
Size 39.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33ba023ea587c0f5d348a44808600e185e42698d85c7c584d013983451c5a1b0
BLAKE2b-256 checksum
How to use checksums
e1a5041e9e4e6d513c9c3aa7e461d6b8f490dcb06cf38860896a1418c8569cbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for soft7 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for soft7-0.6.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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