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

Uploaded Source

Built Distributions

DLite_Python-0.4.4-cp311-cp311-win_amd64.whl (363.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

DLite_Python-0.4.4-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.4-cp310-cp310-win_amd64.whl (363.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

DLite_Python-0.4.4-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.4-cp39-cp39-win_amd64.whl (363.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

DLite_Python-0.4.4-cp39-cp39-musllinux_1_1_i686.whl (390.1 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

DLite_Python-0.4.4-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.4-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.4-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.4-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.4-cp38-cp38-win_amd64.whl (363.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

DLite_Python-0.4.4-cp38-cp38-musllinux_1_1_i686.whl (390.1 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

DLite_Python-0.4.4-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.4-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.4-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.4-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.4-cp37-cp37m-win_amd64.whl (362.4 kB view details)

Uploaded CPython 3.7m Windows x86-64

DLite_Python-0.4.4-cp37-cp37m-musllinux_1_1_i686.whl (390.6 kB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ i686

DLite_Python-0.4.4-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.4-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.4-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.4-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.4.tar.gz.

File metadata

  • Download URL: DLite-Python-0.4.4.tar.gz
  • Upload date:
  • Size: 17.2 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.4.tar.gz
Algorithm Hash digest
SHA256 350492519346a4734a8a1a4ad25dffc6977ffc21185dbf6c018e43dda4491230
MD5 3e5b02c6cf6c21bd3272cda70be5ec1f
BLAKE2b-256 d73c08305e3001785e95d0b3c8c3cfe44486900e79d68b709c0d263c2d3b6d64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6143fbe8e3b8b87e1a337d0a93d493d46fde42fcbbb427f04ff01b27d6bcb6e2
MD5 dc55e15490d35b431d271f08671d50e4
BLAKE2b-256 ff7b00e88765b3d360e21d294a0adc5ecca99b6a4c6bb5fb8cb69aad714ed239

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 df57d87f4bb5c57a82e6b105fa95235b5d1df78dcc0642b6741da7cb42732906
MD5 90414a84cbcb9caf055dff0c712640ee
BLAKE2b-256 aa0b0b7ec1e70298d105a1f69f08626ff8714b58754bdbe934e0c725e7dd5d7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 460a9b763a01ef5ee817318db266432f7918cc8d31af410329eca67589199bef
MD5 fd485d3d887f8266f5be02fcaa775e1a
BLAKE2b-256 8a1edaf18917579cac4c03273fa8525313e51716c4cba36a98b7f1d10e2ab2ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 478cc951e27abdd2b6d573b09db06952b43d1f94534c38289ab3199313e82da7
MD5 732559a13de99420fa6e278f0005f8d8
BLAKE2b-256 c18457cd38931cc383b7af2de8e223b54c71e1c9b8483facc6a505f2e7523a56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 f99ad19014475841e60690761cce87f0bd4466233e438c20a9fc041a7de28785
MD5 831e33998dfe317a459e5a2782b5a3f5
BLAKE2b-256 6c3943d6d0251899b07c31353619eb5a1fb24af62753ce1c93cc024cc35c1fc5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 744b2a0d9bf26a83c25bf22870538092682fae38d79600f26573600de1631106
MD5 1e79f58146096b462763b38bdea85a21
BLAKE2b-256 e506a5ce0ece53047819093193f6658bce452703c03a1e3357611f28ba16324b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f1bcae1e7075721e539ab7c7f2692cc235e167d493837d9c396a030c1f540c13
MD5 1db0dbc76e2e296cf79d3190d3c6a9a3
BLAKE2b-256 caca69bb822d268e13d0d7a3510d36b29c789ed34ac58d3b60ad2c635fb1d7f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 2a1b73d003ce537a77d91b936b78b73c611412442f8a637030cb24fdea72ca19
MD5 333051fe3db7a8150e0e16aedd701ffc
BLAKE2b-256 9943140e884d9c830cdae9862d492d89122bf0d03e0a553a805ed5c7599bab5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 3e09eaa6f9c23390d1ebfffa6266caaabf57cbde8ecd3c484e1b7ea18f864853
MD5 3e2647f5885a4c7b8e3211c9ebbe9620
BLAKE2b-256 db2c12092beb4b2691146008722e41357036c21e806610e87d0565df5f6cff9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 a38d42822a633144a6a5b9dae362ed0ec9a60c486d27d025e129c770fac8814a
MD5 c5545970158707c55d5883bb4c2b9693
BLAKE2b-256 f240952f1ef55fb1b5274ced85cb82e745dec8475ca86fa89e3f92cfe97eb141

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 49792f3b26f57280d1134d7ace0044206fdebab0766adbdcc424b650141eb72f
MD5 73656d002834ae7dde731a99b23aaced
BLAKE2b-256 5070809c6c12e127aafc6ce55aa3d0546598e1f54efca34e9b049b4ef56493a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp38-cp38-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 118a06a4dc68caa07f1f5a8191e6945b8b53511edaaf278ea60bdc42185085fc
MD5 c33656a70925766dd49cbb67a2c706f1
BLAKE2b-256 f24628b209a5c86cab1355479c7e01a9813150014486bfd61def4eedee87516d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 73c9f913823617c7790466caf35f99b87ece61230fdad9bf4f07b886186ff496
MD5 a11fc0ba641236eb4b01febce4377743
BLAKE2b-256 15e109a3a6b10b216328ed3a288117851025ccabefbfde767f257662f6f4fcb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b883ad3b73f826b11ecea13b3bd09e8388df5a8742afb589a5902c4871e7dc72
MD5 81b9574cb718ba5a0b8669321947aa4d
BLAKE2b-256 f20c57e0173a7d2db01902efcb60532d90ed0a10e549eb6df5b17fe071c33e60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 8b250969ffbf5bcb19030a46ee9ca2a8127cadfcbb45a2f19035cf84fc96bc87
MD5 0bba792ef44d1eb341eb9b1edb1c4fe1
BLAKE2b-256 1bfb0077eec1be0cf819b401fce9be4ec0675c5a876ac5b6f2d8ed28cc0bfe83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 e9671f7f53ef493916cefe45f14da38dc7e6717f416a14e133e225902ff4a18d
MD5 3107dcab6e37bb931d322b47bad8cd1b
BLAKE2b-256 78d502d3b8af6cdc6eed958a506d81f23a687fb02dce7f4ba0496ebd2d131870

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 1f91d3b31ea6b87864cdb8ce3b276b66d8b6e6f8255406f30250357b68c0cd0b
MD5 6c891d1f5bf985d1d9e9d019c01888ea
BLAKE2b-256 b9b9d439b6fc29559be7f799feeab81b8b24276ec10a3013af9951d0cb011ebb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 a475393b58915a348c8b8f13146bc37783fa7cfa676d4a7df4f1c1a831f4269a
MD5 805c304fff990aa6f22de9c86ce6b0e5
BLAKE2b-256 3de4009b8382990f751e76b1d1c573edefc3ec3ac0fda3b64eb6c06c5e70101a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5654ade81c1fa2e0023ba99c3955a3c35498c3bc1aa2b30d4d424241ffb4a201
MD5 fdf2f2b02cf7e87a99669f6702d9178d
BLAKE2b-256 5b0ec81e47705f3ebb8d1b9454223d2d4c7d10480cb304f48548602adc12e1c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 bb5c72c6562d9bdd4e634636e584433b9c509d5d70ec7f67c744337710a1251e
MD5 123e522be4bab034768da0c26dbc893a
BLAKE2b-256 4140518792f759c4d64908470f18c441c625946e29ecc0dd4328bae3089c90c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 dcc1d36d694f9642d0dc57fb818ee6c0bc06b647cb1d1fd2d590d07213b3235d
MD5 c8455672d61223369ec036acb0affbe9
BLAKE2b-256 5b028465c8f02be11427443c783df782e2bad32df6565f373550ce051d5a9359

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.4-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 65ff74dcde48650cd8af2f943ca9eb66421da180e8fbca7351ab1478f637988f
MD5 0280ec7a542a33e0f909ccaf0ac22dec
BLAKE2b-256 77114b7afb55914ea25c2c24a344bb231cf6a0fe012e1787a31baa64028ff638

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