Skip to main content

Lightweight data-centric framework for working with scientific data

Project description

DLite

A lightweight data-centric framework for semantic interoperability

PyPi CI tests Documentation DOI

DLite is a C implementation of the SINTEF Open Framework and Tools (SOFT), which is a set of concepts and tools for using data models (aka Metadata) to efficiently describe and work with scientific data.

DLite overview

The core of DLite is a framework for formalised representation of data described by data models (called Metadata or Entity in DLite). On top of this, DLite has a plugin system for various representations of the data in different formats and storages, as well as bindings to popular languages like Python, mappings to ontological concepts for enhanced semantics and a set of tools.

Documentation

The official documentation for DLite can be found on https://sintef.github.io/dlite/.

Installation

DLite is available on PyPI and can be installed with pip

pip install dlite-python

For alternative installation methods, see the installation instructions.

Usage

All data in DLite is represented by a instance, which is described by a simple data model (aka Metadata). An Instance is identified by a unique UUID and have a set of named dimensions and properties. The dimensions are used to describe the shape of multi-dimensional properties.

DLite Metadata are identified by an URI and have an (optional) human readable description. Each dimension is given a name and description (optional) and each property is given a name, type, shape (optional), unit (optional) and description (optional). The shape of a property refers to the named dimensions. Foe example, a Metadata for a person serialised in YAML may look like:

uri: http://onto-ns.com/meta/0.1/Person
description: A person.
dimensions:
  nskills: Number of skills.
properties:
  name:
    type: string
    description: Full name.
  age:
    type: float32
    unit: year
    description: Age of person.
  skills:
    type: string
    shape: [nskills]
    description: List of skills.

Assume that you have file Person.yaml with this content. In Python, you can load this Metadata with

import dlite
Person = dlite.Instance.from_location("yaml", "Person.yaml", options="mode=r")

where the first argument is the "driver", i.e. the name of storage plugin to use for loading the Metadata. The options argument is optional. By providing "mode=r" you specify that the storage is opened in read-only mode.

You can verify that Person is a Metadata

>>> isinstance(Person, dlite.Metadata)
True

We can create an instance of Person with

homes = Person(
    dimensions={"nskills": 4},
    properties={
      "name": "Sherlock Homes",
      "skills": ["observing", "chemistry", "violin", "boxing"],
    }
)

The dimensions argument must be supplied when a Metadata is instantiated. It ensures that the shape of all properties are initialised consistently. The properties argument is optional. By specifying it, we initialise the properties to the provided values (otherwise, they will be initialised to zero).

In this case we didn't initialised the age

>>> homes.age
0.0
>>> homes.age = 34  # Assign the age

We can view (a JSON representation of) the instance with

>>> print(homes)
{
  "uuid": "314ac1ad-4a7e-477b-a56c-939121355112",
  "meta": "http://onto-ns.com/meta/0.1/Person",
  "dimensions": {
    "nskills": 4
  },
  "properties": {
    "Sherlock Holmes" {
      "age": 34.0,
      "skills": [
        "observing",
        "chemistry",
        "violin",
        "boxing"
      ]
    }
  }
}

The instance can also be stored using the save() method

homes.save("yaml", "homes.yaml", "mode=w")

which will produce the a YAML file with the following content

8cbd4c09-734d-4532-b35a-1e0dd5c3e8b5:
  meta: http://onto-ns.com/meta/0.1/Person
  dimensions:
    nskills: 4
  properties:
    Sherlock Holmes:
      age: 34.0
      skills:
      - observing
      - chemistry
      - violin
      - boxind

This was just a brief example. There is much more to DLite as will be revealed in the documentation.

License

DLite is licensed under the MIT license. However, it include a few third party source files with other permissive licenses. All of these should allow dynamic and static linking against open and propritary codes. A full list of included licenses can be found in LICENSES.txt.

Acknowledgment

In addition from internal funding from SINTEF and NTNU this work has been supported by several projects, including:

  • AMPERE (2015-2020) funded by Forskningsrådet and Norwegian industry partners.
  • FICAL (2015-2020) funded by Forskningsrådet and Norwegian industry partners.
  • Rational alloy design (ALLDESIGN) (2018-2022) NTNU internally funded project.
  • SFI Manufacturing (2015-2023) funded by Forskningsrådet and Norwegian industry partners.
  • SFI PhysMet (2020-2028) funded by Forskningsrådet and Norwegian industry partners.
  • OntoTrans (2020-2024) that receives funding from the European Union’s Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 862136.
  • OpenModel (2021-2025) that receives funding from the European Union’s Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 953167.
  • DOME 4.0 (2021-2025) that receives funding from the European Union’s Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 953163.
  • VIPCOAT (2021-2025) that receives funding from the European Union’s Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 952903.

DLite is developed with the hope that it will be a delight to work with.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

DLite-Python-0.3.22.tar.gz (14.8 kB view details)

Uploaded Source

Built Distributions

DLite_Python-0.3.22-cp311-cp311-win_amd64.whl (363.0 kB view details)

Uploaded CPython 3.11 Windows x86-64

DLite_Python-0.3.22-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

DLite_Python-0.3.22-cp310-cp310-win_amd64.whl (362.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

DLite_Python-0.3.22-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

DLite_Python-0.3.22-cp39-cp39-win_amd64.whl (362.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

DLite_Python-0.3.22-cp39-cp39-musllinux_1_1_i686.whl (383.2 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

DLite_Python-0.3.22-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

DLite_Python-0.3.22-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (15.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

DLite_Python-0.3.22-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

DLite_Python-0.3.22-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (7.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

DLite_Python-0.3.22-cp38-cp38-win_amd64.whl (362.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

DLite_Python-0.3.22-cp38-cp38-musllinux_1_1_i686.whl (383.2 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

DLite_Python-0.3.22-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

DLite_Python-0.3.22-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (15.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686

DLite_Python-0.3.22-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

DLite_Python-0.3.22-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl (7.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

DLite_Python-0.3.22-cp37-cp37m-win_amd64.whl (361.9 kB view details)

Uploaded CPython 3.7m Windows x86-64

DLite_Python-0.3.22-cp37-cp37m-musllinux_1_1_i686.whl (383.9 kB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ i686

DLite_Python-0.3.22-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

DLite_Python-0.3.22-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl (15.7 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ i686

DLite_Python-0.3.22-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (6.9 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

DLite_Python-0.3.22-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl (7.0 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

File details

Details for the file DLite-Python-0.3.22.tar.gz.

File metadata

  • Download URL: DLite-Python-0.3.22.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for DLite-Python-0.3.22.tar.gz
Algorithm Hash digest
SHA256 287d2659e8e48ba2cd987b48446376c5328777fc4a7b0db4514b383a007e41df
MD5 2a376123049b418058ddaa5da904d44b
BLAKE2b-256 5b19fbac2d6d9d19f4cc763cc88a9494b66e4016830d0456587616e9c8621a73

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ea7bccaf191ed8bc2fec4556f76c09a5075663b4b76f946f5d22a6e0807ac29f
MD5 bb627e163cc94a95eb1aea2aab287b4c
BLAKE2b-256 cfde7b468d563d4d253d397841eadf3b99e3ca1af93394538e23eae3098402c8

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 21d4a757fbe2f334854a45ec4d353a94ff2c24a756d7fc24ab2ec174ace0f5c2
MD5 2f3702be100d47df7ed6a3f000b4f9c9
BLAKE2b-256 f9d9520b304c2ccad386a9cb745517b4dcb272496b8d848fbf500de886a956c5

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6f637fc98f38c4c4a822c64b1c2d9b5fbfb55409ded871a4f63df5550a7a00bd
MD5 563c1abccd3dcd37adde0a3521c120ab
BLAKE2b-256 fc666669d4a09df3652f2a21ac13ba9aae5002760dfef043e96fc4d7d0a6b1d5

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01cae9f499e90d1be88387682cfe8cbb9f6d9dc5630b6aae14c9b7be30a0e4ed
MD5 cad741efe43191b0f368f1415b59db70
BLAKE2b-256 46b207fe182fb4d0be2f5217023656ecb3099a9326cf7939d37b110c912cbe42

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b7b0ad9fe5a53e487272da3cf3d0ed496cdbc0efac1797f33a75f1ffba2c3466
MD5 9857763f8a09e5c9d6128aedca5c0b16
BLAKE2b-256 b97ed9a9af60447cc876cbccbb3b5180be860899d262e62012c38ba959835d72

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp39-cp39-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 2bc5eea3826048712ef5eeac3d6c565f8488579f83d9466b98e361f68d9e92a3
MD5 469441ff5345dc9e7535517b77a8ad0c
BLAKE2b-256 e200a7e5dc9f3fb474afafd189a250529b28c44c419626234b7f4c31a1dc10ef

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7f5ed46348a09f5464f4949b5066bda1d81a54fe1e7bcbce68ae1e5d9c1f81b
MD5 7566e101f62242bf14f00f5e2767b1fa
BLAKE2b-256 1eb8d0c56cd7ff21bf5dd0a83aa5e67e7f35b1db31d5c03a9e3275cdf286a1d7

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 2aa11611cde0342cd549c4d44f454041db596016a3d522f8b342f21a0f20bd71
MD5 db83cae0e1c4d0819967dfce27f0e409
BLAKE2b-256 93304a25a8a9e862a6a3e0103ab03bd70550b072b5fc72f719ca98d413ca9928

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e0679c68789573190ee5d9e07856d5bea33f4f85d69fd680e253990cb9aecded
MD5 2b986b0bbeaa869ea7fac6b3255d951f
BLAKE2b-256 bae6b8407727e9c59a17ecc942b0ad6d04fd64e9063f7bb4b28da970cdaee00e

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 5cb4054831eeb54642f44b8ba8829b38f8e9eeca54d6e731a29713bd406626d8
MD5 fd76b06fc7c0e1a7fbafbe8211a9c98a
BLAKE2b-256 e064c8712c41babdffb312fcb5547433449687c430a5ffe66ab56461d3261420

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3ccbe30ff69b948f4b5bfefdc41fe299a429754073f97b7827d31b0150bec69a
MD5 44f18712f3b8d55a7429bbc433255b9c
BLAKE2b-256 c454b15c91b980038ea68fc587864ce3bf58315ec3a37c8d2168423bb7c56b94

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp38-cp38-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp38-cp38-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 900bcf1df364e1bdab92b749d12a6e2bc409eaf58d465b4692d11e34f0868e8b
MD5 06aff1a780cbe8eeb3e6ec73227bb1ab
BLAKE2b-256 cd0b69126e0f0384f79d34bd29e8a05ebae38df7451fd2e2425792465047f086

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b4a58ec7f27f2422e80c4396e074bdad04d1cf96a53a4fe90781518b7a425b81
MD5 e5d8b07724fca04b9c0b1a3461dc266c
BLAKE2b-256 19b393e90ad8b5109e2d33858b0dabdbadbdd1e7abfda034c6faeefb8425b9bd

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b5144b20650bdcfab71e6ad6608878ac36eab11499202a70b876d77cfb580cc1
MD5 4b16cab55c04b11215afa12824f637ed
BLAKE2b-256 bcbb0cb082e0862e9fec14a37bf0bfa02f78707aefe2da303c65c0948efe931f

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3c6ca2c62774b837731546a7e11558698a5f20f785a1ef01ab826db3a7b3b8c4
MD5 3a24935ed625a695bf64207853c4c98f
BLAKE2b-256 a20f260c209eb95b7c767dc1ff0b44d7741cfe90aef93fe4e1684c301be7b8e6

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 a2552b69565d758bfe39fd92003705f45c74a5b2dbc275bf29825e0ecd5e858f
MD5 f72983c9a7bfb7183ef77b576a404c21
BLAKE2b-256 84b26c54de3b6ee75f170e4fdb2b1735f0351f71fece716380e5698167284574

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 15249f4b8a28c8014bbca68122060630af360597dc09a249fc10e37d67fb1285
MD5 f1084613fceeee5675a534cfb777307e
BLAKE2b-256 ded62b5845c9f1b5d15d702e8a79d671ccb9c936780c126e63a3e1ea2d09daa5

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp37-cp37m-musllinux_1_1_i686.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 c0a998bd8fbd56900e1a2fac7dd33c35438f83e9956e3647c019d15c9a6fea59
MD5 9ba60ccb16d48d4001649798cd065c7c
BLAKE2b-256 01ce880b9f2f163dd5fd9f94c4b751a5d22fb5ab72f60a8f24b8127d008a561e

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 63af19c9e5b821a344592096d62fc7bbf97b3cc7d670cc5f260c0f122d45c70f
MD5 f5a1651d998a49470b40eda1cc1be8d6
BLAKE2b-256 8ce4459b151997c43651d43873eadfdb999cbf3d9a3489ce2197a63bdd85dfd1

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3bb1cab30c5425b516fa153b2b4ea36ab7687305b3f637fb36a2a2ebe2737e8b
MD5 3fad5bc0c7d541c395d99a870444b07e
BLAKE2b-256 7e9ada8ef62ea166f44eb2d4d35f867efb6b10aee619438e99e71da466eb61b3

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5bd92ae06e2f14f5562590741bf9d736b45f5f07420394be9e8949848e93e417
MD5 7fbee5335642fd109db1f5d3ffceffd5
BLAKE2b-256 c5e7716d142ecaf5d0b934657ac5f57e6d4d755072ea34110d49101002d7e0b7

See more details on using hashes here.

File details

Details for the file DLite_Python-0.3.22-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for DLite_Python-0.3.22-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 1a2e610c765c3ed8daffc30e392b55c18e8f2caaeb6b6583d783619a7b7801ae
MD5 609151311b7e0215f7439c4ba32948dc
BLAKE2b-256 f638aae3cad261270349017a7b0f2e4a443081075a306b600b3d77818bfec92e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page