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[full]

The bracket [full] is optional, but ensures that you install all optional dependencies together with DLite. Without [full] you get a minimal DLite installation that only depends on NumPy. This would disable most storage plugins, except for the built-in "json", "bson" and "rdf" (when compiled against Redland librdf). 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.
  • MEDIATE (2022-2025) that receives funding from the RCN, Norway; FNR, Luxenburg; SMWK Germany via the M-era.net programme, project9557,
  • MatCHMaker (2022-2026) that receives funding from the European Union’s Horizon 2020 Research and Innovation Programme, under Grant Agreement n. 101091687.

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.4.2.tar.gz (17.0 kB view details)

Uploaded Source

Built Distributions

DLite_Python-0.4.2-cp311-cp311-win_amd64.whl (372.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

DLite_Python-0.4.2-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.4.2-cp310-cp310-win_amd64.whl (372.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

DLite_Python-0.4.2-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.4.2-cp39-cp39-win_amd64.whl (372.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

DLite_Python-0.4.2-cp39-cp39-musllinux_1_1_i686.whl (394.8 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

DLite_Python-0.4.2-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.4.2-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.4.2-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.4.2-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.4.2-cp38-cp38-win_amd64.whl (372.2 kB view details)

Uploaded CPython 3.8 Windows x86-64

DLite_Python-0.4.2-cp38-cp38-musllinux_1_1_i686.whl (394.9 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

DLite_Python-0.4.2-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.4.2-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.4.2-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.4.2-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.4.2-cp37-cp37m-win_amd64.whl (371.2 kB view details)

Uploaded CPython 3.7m Windows x86-64

DLite_Python-0.4.2-cp37-cp37m-musllinux_1_1_i686.whl (395.5 kB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ i686

DLite_Python-0.4.2-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.4.2-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.4.2-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.4.2-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.4.2.tar.gz.

File metadata

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

File hashes

Hashes for DLite-Python-0.4.2.tar.gz
Algorithm Hash digest
SHA256 b4d3dd2dcc1721140db2b55073b0650e4b769a8bbad26a4778a45b81027d85b2
MD5 1698d16eadf9a97a7fb7836023b3bc6e
BLAKE2b-256 352cb7344a96bcd6820213ad085b82cc0b50e582d28f5d4b0ac9ec21981d8935

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 299c9990136528eab29a00296427b0d090482ca3baee957ed234adc3da405c70
MD5 c5c763e5a1c9adfc670881839327ea51
BLAKE2b-256 4da63bda3064bc9e31bb7db6d88495888d17c5735b1e5986332617178d3ff8ae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 868990413845354443206764bbc45e54df0daf8e09f1948736b006b0ed6140c4
MD5 733780d22d9889a20997b736db212b13
BLAKE2b-256 7d43789b564a47c9df1f99d8a2451dbd209bec472f89098dfe32a8e41978ad30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fbfd47f49beee806dc8c706e936a00d46a407a5f56268a9ad2671d8ef844be41
MD5 419620bdafaf923113cece6d655c8f39
BLAKE2b-256 a9e941b8001f0f89488866d9f7da88b005c4ba316d7f6da5e1eb6299d25dcf61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dab1591e1ca4130435c2906d002f0fdb396a1185d675d6006dd40bd9d8851d1b
MD5 1790118e7ea4d360335e5cc4d975f4a5
BLAKE2b-256 74694ba4031945b857014c882ccb21fb7acee182d7adf02ce605183ae04e7d02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cb3b71423fef3ebb504a9c81eee33b27d31e99df717cfcca77db76912461b2fc
MD5 a7aca06fc4504a54a4d80861ed6d16f7
BLAKE2b-256 bf2079bf14a5cf6a6848ff094886eced6546b17e19af06835fe2ba843423d25b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 42a9f63c8c6978b9bcdd8b97d82e2a67cb14ad2572785fb087b25763603a41dd
MD5 d1caff49daacb8955164bc1f15e5cfe6
BLAKE2b-256 f48add10130f10e31b6214bced08e788b8f58208d1a4ca50282808b7abc63ccd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4f54ec1f1f96024b1bbdcb83513c428dd43e70a07cf921e7da5f6af6d092b97
MD5 0d7c09d31523941890d3078d20f5b47d
BLAKE2b-256 3b14e3bad32f4e700f5bc0dd19b0efbcff92bee1c07e00d43df7695bae0f0989

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d5e05dd810b0d97d69b863d7646a80d535934b71344d9b3bf4f74e24527c482f
MD5 fd41b8129a5e29ce3d9ac246b852dc6b
BLAKE2b-256 4d202d7aacb47cd15af9fedf85951c436cd641e45e2587ae5216de4c56bd7448

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 e7d532f4cf61af34e4c183f899699619788cf0bffc02ed10974d931f35225dff
MD5 d658e9706faea854bace28966c92493c
BLAKE2b-256 2af55143e095c0936c6bf43404ae79259c9a0f756e442f63359192e9877ccf7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 6669650ed7e59d61906b15d89b060ab8eae18a39e1430da5086a0dedefef3a9d
MD5 23e208593c0e8cab3cb5b3a5af7b9e8c
BLAKE2b-256 6ea76781f9b72b59b646108d6a82a9bb9d914207be2f0655a470eaf5e65bf958

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 62babdd5e04ef6d51d7aa884bbbe294a89e54e066e319992fec26b84eea2817a
MD5 1a953e5821e94780e08a16ab2bad965b
BLAKE2b-256 70ae0adc25acea77631030102472b2a5954058c0bf4c1b0a70a79ac7104c5906

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp38-cp38-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 2b0d30d0860dc40abf1708d7e3e9cadf3474cd232dd7090c2539a7e94cc4370b
MD5 89f6e50f0fb37597a45b18615dc4a4c9
BLAKE2b-256 429eea6d814002b01326ee57374862e02c438336f5bbbfc2ee5f155078f45c30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ad8c005e63e4b199425d869d2d22e765a8f19279c315be18e073af15ee8d1db2
MD5 457e27e2e76e9597e062389e6a959adc
BLAKE2b-256 be44a08edaed120f3cc110bf840ad1988e1f90b1dd88381dd8aa20ec0afff162

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 6e7c4f1fbe6319139740b52a524368d39b1b7eaa15362eb69cdde9d0ee585707
MD5 3a4f54b43311fb2cdc39a2a827f49177
BLAKE2b-256 b17c2c27add8812171237d355e90231d36a7b4be8e8bcad2cfc029e26bd948f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c05912a36eb4280ae771851b6dfc1f563124aa3c35e0a25ba159277f796c8cd2
MD5 6f4ec3edd68f355fde03f67ebc8ad6a4
BLAKE2b-256 51012d8b450338fcc7c28e65a5f58ca58737978fff2d0ae573ecb3c976f928f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 aac8dd3d844b8cfccdeb1786b01fb8080ca3c427c8fa144bba6c2da25fce27d0
MD5 e4418f11abc159b1119dd6401676e7a4
BLAKE2b-256 94047b839945f2099bbcbfb77f72107dca4d806a58529de9c5deeac133ec5617

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 9064a12715a94232f21e97847d92cbbdde2cd7a14c5b92348960df9179c12a25
MD5 35a602f9c2389af29dfa63f26f416970
BLAKE2b-256 93a2e80bad992560ed7c26d7bffb73c365b2d7099c01ac399e3c239ab4d9d6fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 4b00f44f125825f2764c63a0f96efe366a00ff2a56cc068fea1b020a040b4397
MD5 1dacda2f7ea366ce755b8aec5caa9bd7
BLAKE2b-256 2e94abacd1ba334ddff63d5ae13a7fc7eacb54580864a27e171ac8eafda88e43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ae0b537d4c5b63ee4e3ae2e3ff7d396513db91232daa31e3fc7e2c1b1a13492a
MD5 1b8e00b3c89535c7d29bee220f7e3d02
BLAKE2b-256 0ba3d78d1edd969f1a3f71c8600cba5bc6bb89d5a8e226c351a8751c88d91167

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 41a2bfd1b0e5e3653fdf8ea0d538cd9ddcc9ad38fcd91d34b2dd397a56d9b93d
MD5 7b8af930b79dcd941848c0475f09953a
BLAKE2b-256 30fe663b9f690449edeef9c016af2051c4ca632c14bf5c4bcb724c39cf6f8a0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 bf5f9f64da47a1b0ef9fc7baf267579c04dc499e10c129e7e619a96e3fdbf09f
MD5 02abf7c894f424c3d31abafc47a460dc
BLAKE2b-256 19577657c90da657dc1cb65066ad5205c73d718c90e72b924d9e8d25fe3068bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.2-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 1ddaa7a99fecd15bb5caf48ad38e1e31e2ed9d4c6d945e194339866bbf1c0649
MD5 4fe95d992022e5cb447cde08726f7ccc
BLAKE2b-256 24a726656699d7d6b4e245ccab64d9b917cb65f13c073dc90e7f8fcfed494263

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