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

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 more details, 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": {
    "name": "Sherlock Homes",
    "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:
    name: Sherlock Homes
    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.19.tar.gz (14.5 kB view details)

Uploaded Source

Built Distributions

DLite_Python-0.3.19-cp310-cp310-win_amd64.whl (353.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

DLite_Python-0.3.19-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.19-cp39-cp39-win_amd64.whl (354.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

DLite_Python-0.3.19-cp39-cp39-musllinux_1_1_i686.whl (374.2 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

DLite_Python-0.3.19-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.19-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (15.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686

DLite_Python-0.3.19-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.19-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.19-cp38-cp38-win_amd64.whl (354.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

DLite_Python-0.3.19-cp38-cp38-musllinux_1_1_i686.whl (374.0 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

DLite_Python-0.3.19-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.19-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (15.6 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686

DLite_Python-0.3.19-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.19-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.19-cp37-cp37m-win_amd64.whl (353.4 kB view details)

Uploaded CPython 3.7m Windows x86-64

DLite_Python-0.3.19-cp37-cp37m-musllinux_1_1_i686.whl (374.8 kB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ i686

DLite_Python-0.3.19-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.19-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl (15.6 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ i686

DLite_Python-0.3.19-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.19-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.19.tar.gz.

File metadata

  • Download URL: DLite-Python-0.3.19.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for DLite-Python-0.3.19.tar.gz
Algorithm Hash digest
SHA256 3ee2d41706dac5412ed2f17bcfd564157438b845483d128f03d9a6757b9289a0
MD5 5f05c6348f61dfe097ce99a5cec7bacb
BLAKE2b-256 4224010a153c7dd69c65730e133c5a546bf1a0ff6a3461a893c0cf88b1f5164c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0b38a78baaffc3ea48da6248940490c312bfff22ae45f4e8b4c13cecd0ce239e
MD5 3569ae8ac7fb41c8c01847d6ce5c9903
BLAKE2b-256 71ef2722c7b27cc6864ce404df68375685686c6dbc08c8dd8dcc944e84c0e76c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 45c53a6c92ecdac2c45656904fcee69fb64e5fccebc414968df503f304e6561a
MD5 4dc35fc484908dc24d7e5cef0aeda3ce
BLAKE2b-256 52c3f8e92cc6bcd00e5f8d98875a99b355bc63d97864ffe87a62445bed50c6e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3422fb02dc4972a89d91364933960178793d56315108f0cb461660b7d9bc8197
MD5 9287c9f51924a10a92668608503fb78f
BLAKE2b-256 e6125e9bb3c984c1b000f565fd1acdba622a3d79bb9ca34b2487d3e8a969f8f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 692e5b4f4cf78de1013900bc01ee2989267715d3a26c1364791ef30f8216bd50
MD5 7ac4f0538a391fa68ce16ba74a6c482a
BLAKE2b-256 cd3ef167941970a71e6ac45c7b79eea0802a87bd99f63519e96c2b53be161841

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b9bfb972f24fc745a21e07ba707549d62e58424f4611df215e375ed2d5701366
MD5 2038bbeccc423c203caf2244f7f88d58
BLAKE2b-256 ecb977c9e3537d70b74579211bd905e2a86c1301afb51041a48b20e46a2721ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 bdfc0e4c7b9d4773484b4096a3844cec9ad3ed98058442c7a43652bbb8a906e5
MD5 952d645aaac581a794452ece68fed367
BLAKE2b-256 632b92b51a559440b0c438aa2cb63b9d91baf00f539f9002bd48367450e5aff8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 007f3374946029e59f54ae473ff3e7718526c1b93bb3673eefc492baa56b7e2a
MD5 c7d61ed07907aa7635e404196d9c5c6e
BLAKE2b-256 8c12fca672a572f0edb166221a4e6258bfaf0cf78c5440eabf256300d372a1dd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 da05272a1769f3948ded11bee7982ff419e1f154214f8828ed65655e281f0417
MD5 b53d03c4b1d102ebf9926a7e5e6b14c0
BLAKE2b-256 7be1ceac1b4e7a8aaa917853491ebd5800b6a7538914734e2278e0f83a4cacbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 2aa709d641cf9a3ea1f90744759f12289bc946bf02b4fdf57fa161cedefacbd6
MD5 c8e6be8389a091e036cc5b5ca6131dd3
BLAKE2b-256 c7cfa69a9b93ab39e07e466bf05bc7dd4c14e914a70023d0a0b7f3a06a9aa158

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp38-cp38-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 07843dbe45e657d753a9fa4b5fc1d9022cbc8d527e2d1d39c30330d981476b05
MD5 007071582a25c9abdd912fe38efcbb7b
BLAKE2b-256 bbfcea2f5fa8f3ab9ba84b410097e77b628950bdc6aa8da932e304408540cb90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9d6bfb6a49213f5b681c6a902aa096d00c3d1ffaf876c74b119fa83031ad5953
MD5 d51f665071cca2786a4a706683f20812
BLAKE2b-256 9dde4d434ba2fab77df2c8f6957a1dfc0b469bb5688ccadb4eea1a30e1063549

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 1ba5efb1e9b371e7dfdbd4073873876895023eed844da750cb2180f2be52e019
MD5 89ff56517874599b54409a12b9612660
BLAKE2b-256 63dc12cf368b54396f37ff55b81de9a074adca3a8fb5a9adf38957e243736c30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c771c7611c294fbd2c50a0ea5681c68e7cb3fd456bee90345ff89fabcb300829
MD5 de1dfea8cf12c078f90f5a285a9a8d01
BLAKE2b-256 70aab1aa66b11139a747d60323bf2ae8fb3bad40273c7066c2495d9103bb6224

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 2a0c1d4dc6b34c678975c7c13b2676b40f19228449bca6963bf2f749d94e4265
MD5 abbd85c2d07bb67d7927dd9f77c11f1a
BLAKE2b-256 07fb97ddd5d72cc7eac3075c86cc2428e091c2a899791663944669312b2e7474

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 b66cd247cbed2df61a9dcba9d33bceabb0431e5e1555c578b22bd1e987c5ccd0
MD5 08ff99e952ad00b5a44764ad101280ec
BLAKE2b-256 923988df1a85b5fcb2593706ce190da7b925a61d2bca855b7bdae52fbdda4f90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 e399d783355c68946ec10d60d16bc46bc35c6bb772b4510e0aeea1193850b9f8
MD5 c30d9436e8fd56a57aa6db153d8cd38d
BLAKE2b-256 11a83399455c527809649cef577afb608a5cd8447f791a0ff247638e07132fad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b710bd85d8ab206b0210ea83b9102f864000aaea063710b9ab3ce4e6e4dd6115
MD5 c574d4a07a486a5ed9c77b0241511f40
BLAKE2b-256 665379be01d24d96a4ed8d00d5aa8d0f68572eb85d1e89176a3043bcd152aeb1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 5b41e518f364879484aa68a8154e96b3db77370b55ef2edb63cd73e3560c02ca
MD5 404fabe7f5f85b10d990cd1c0545fa3a
BLAKE2b-256 9d2dfebdd32ba1c1e7896a0a9b3d9a3fd4e62c8b9546067ea79c3522e7d4e315

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 76e66bb7e0b934f1cbede09b1af2fc919c01b8cbde6cbb6176f4af8bf4d5fabe
MD5 c971c43beadd595065b30adb2ff3367e
BLAKE2b-256 83fac497a701e6c53dc4da7d4c08bdd63165652b3864a291be0c1e3316ae5ff7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.3.19-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 4824c7e801ab089cb72a4d1250ed0ca4415743afb3741b3d7dd6f57a2774b817
MD5 d38689979b96c373644e654072f2628e
BLAKE2b-256 6f7c49720134d8e0261a0daec379204dbd0164fd304322b91859e972031b6b77

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