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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.9 Windows x86-64

DLite_Python-0.4.5-cp39-cp39-musllinux_1_1_i686.whl (390.0 kB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

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

Uploaded CPython 3.8 Windows x86-64

DLite_Python-0.4.5-cp38-cp38-musllinux_1_1_i686.whl (390.0 kB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

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

Uploaded CPython 3.7m Windows x86-64

DLite_Python-0.4.5-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.5-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.5-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.5-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.5-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.5.tar.gz.

File metadata

  • Download URL: DLite-Python-0.4.5.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.5.tar.gz
Algorithm Hash digest
SHA256 a76b3495873180477c543796929cf44ff3ddbe20127b2a2f1feff5c3674f79d3
MD5 46990b0caf70d0448dec219a23512e48
BLAKE2b-256 fd6a0a1d1a500cec46d33df8db30d55a9ab0453c9eb0c9463fa28d73b19dbaad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 45c7917985cf0a54f1088a2b9ab4af3e3fd4a3820e484dbfc04aeb2fe022f04c
MD5 9a862dd197640d010babd86c7c9be00b
BLAKE2b-256 5b17a2955dac55033e8e34724f7ec14c5621f6564f2ef7474035423f4dbcebe8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1a1a63561e021ef507c4e618f63fa09187b0667625ae5d5e0b7e64611cbb23e2
MD5 a8dae1978e010e2ab3adc193a303df7b
BLAKE2b-256 d9150a6ad1c417cf9c269996e215ad9572fc24e18cf09f281dd6c2563301876c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f0da86fdc0114cc985a51299d09fae090f05097f20b4e3278bfd62c08278e9bd
MD5 9bd24892e8693202fba1fcb1bcb90a92
BLAKE2b-256 20725b915887397f81742937ebc0e96d52c3aa1e6cd27d3eb805eb065695f22a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 01fde34358e9d165ceffb47cedd11c56cad384a9b37b4c238556e20354b08580
MD5 28ce87925b90e715d1ae14abb4b885c4
BLAKE2b-256 8d47c76793dc65674d0c4a59deae1e880f88970b3684dfce400740545422c764

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2b555c8c4dd17b7eb8f60e674b73d14e47786687db2312d9ad10733171268363
MD5 a68e48667a109cfc2b0942ccd9180816
BLAKE2b-256 f58b4cd8ab0e08d66617ce28ee0eef7d42440112075c7bea761097bc7abad063

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp39-cp39-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 70bb13e9743f25cc61617bcb183425e803c7c78a90e59dc28318c576177f1487
MD5 687a633c25d531362c1cb13657af7e7f
BLAKE2b-256 ebc9695e87079c3d5bac22bab0f7de27c2d42bc819bd7d958c0ba67ebb7077cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 22dfe487dcef02812edeefdc9cf098f13bb8ad31739e273e22c2002d3497f6b4
MD5 d0e9e2733190c8421fa9005515206c79
BLAKE2b-256 29dc3a5c3c0bf881bcc8dd9a10231ed97be34c735dd8b1b0ed8e033eb171351c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 8da9e5a5a5b4ff28406060753b5ec0a0d80991fc253b42eb3b428b6070e46dad
MD5 bd8dc96a0d4b4d8018dbf4cda9803edf
BLAKE2b-256 be79bf9fbbc64460e55331503c19e311913f869df4b695fe4751fc988d7ee3f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f80569a8b4393b6df6e4a16adfd197187b2bb360977d54e66d3fc86a911401e7
MD5 3190dcaf084cc588830951c74a93dcbf
BLAKE2b-256 fa2f659958d46c6b202ec1067271630879a2dfdd6e4869569dde8a3be8b55a20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 ff3da6901f2c2545c7b20ea4e62c5390d5c8a01fd20ada8338ca1af78ba580ef
MD5 5f249f6f6086dbe77922febb1cd517cc
BLAKE2b-256 9baad245af4553442b633a58e2e0920703e0a2af93ea851b56c0bd9f78ca2661

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f367cb321a79df412f258a21461140a98cdfbe73fa064a1fc53f95232403a5e2
MD5 edb39ab5c5300997323898d245628870
BLAKE2b-256 73f675e8283c0063721cbd996008d95a94af8e509aaa6481a6113b4c8bfef77d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp38-cp38-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 60aef5144258c506433ea8550684a0082a4089cd73b7be9ee29f561977f97119
MD5 36690041a71950475005019bf9034a29
BLAKE2b-256 c46f12149748d75a12afa4cfd1838979ec4c843f34ce66c649401751a44ac161

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dea3c2c3a4192b33206f48a962b0c887209933ceabce6ad9ef2e15936b60fa8d
MD5 464b4c8e86aa9bfce3b06ac448ac4f0d
BLAKE2b-256 1177cc791df7839d8c796e94e42ccda70b53b47cc7aa0c40e63c4109cd17f9cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 af70a02e86174537b46f17863a618ea3e37da43ae405941b74af1d4067325798
MD5 eb8e8a8fe363a33f1b359623640a6c98
BLAKE2b-256 71b8dc2af2d23ab31aca831253c6c16cae8343476eeac78438ffa85ea837682a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 6d9dcca145f2b434ca9106f4bc8c5175a4d9dea0b2071770d653ce48c112965b
MD5 6d703b7d40f4896c513055920dd0d4c4
BLAKE2b-256 223428654bf2c0e99c41a1ea321c1c603162d652d892e4b2c61307004a0b5c2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 571fa3f78444e062e1c562000c432d4d078f66a82072a4abf05f66f8ed6dde63
MD5 1bbd5b568a50e1b8406bc4e95b7e4b72
BLAKE2b-256 416b7ded5113f8b48a4f7a81775f8cedd1d406756e8914531a76f16494e38730

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 9ccea30ea447ac2d530b713a293b40c3e13bd76e37eb973280ac942c01d8bdc0
MD5 1178b10c06920d90a23c449a6e5a7958
BLAKE2b-256 d2fc2c2e82cb67ab659db2d0cff4e1afa99855ef9870ed4d9838a9564476f343

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp37-cp37m-musllinux_1_1_i686.whl
Algorithm Hash digest
SHA256 899abd2015bba912ba34c35cfeeda21aa3c11c79801f415018ce67d7560333bd
MD5 ef4d665c62dcaa66ba5e4eff5bc0264b
BLAKE2b-256 9e8319de38f802f61a27de8d8cda4e1c2f8334e0dc5e9476570a1c47742fe3b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 49923c2d95544ab459103f35682ca49d2c15b09f88e6a7dff494bf7adda68260
MD5 21d28aad1fc43d071e7d581752a373f7
BLAKE2b-256 445bac75658f619c552db0a24b28b3eb6a1a2abe7a83f9c10ebbdfcc02532a07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 1144a7870d1dcf6f1f0fd4230bfae27e3e55e2ebf9c401cb32a0ee1342fcb81f
MD5 fbecd5295216b5ec3f4924e83c129dbe
BLAKE2b-256 3332160b8d5c802a39595c54d0cfc0a50da91c0999381b8fb675866c47e58f54

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 bb265e4598831eafa968d354d3f2e9bc66c1558aa620b2c6a837bfb4aaa04e32
MD5 690d6499e1caea1ae7f0156a21b81f52
BLAKE2b-256 25a7bd3c0130f380d8f9e354cc6520b5c61d5f92ce5399d9c2e0ae62367f9aa5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for DLite_Python-0.4.5-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 d26ec06edd8581d01378c7d1c5529601979eba7427107f34ba9d39afd09a8c68
MD5 291389309b65814a01907ea06bd49ac3
BLAKE2b-256 14f39159d96e27ee4c6887a62ad5a5fdc543dd160806f315846bf457d3267a12

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