Skip to main content

Introduction

OVDS-Utils is a python library implementing classes and wrapers with easier to comprehend interfaces to openvds.

Examples are:

  • VDS class implementing __getitem__ method for easy data read out and many others feature to make life easier.

To install:

Run pip install ovds-utils or execute python setup.py install in the source directory

Creating and reading VDS source example

You can easily create and access the VDS source/file by simply creating a VDS class instance and using __getitem__ method to read data.

import numpy as np

from ovds_utils.ovds.enums import BrickSizes
from ovds_utils.vds import VDS

shape = (251, 51, 126)
data = np.random.rand(*shape).astype(np.float32)

vds = VDS(
    path="example.vds",
    connection_string="",
    shape=shape,
    data=data,
    databrick_size=BrickSizes.BrickSize_128,
    access_mode=AccessModes.Create,
)

print(vds[:10,0,0])
>>> [0.14836921 0.06490713 0.05770212 0.2364456  0.49000826 0.1573576
 0.5017615  0.456749   0.6573513  0.72831243]

Writing to VDS source chunk by chunk

import numpy as np

from ovds_utils.metadata import MetadataTypes, MetadataValue
from ovds_utils.ovds.enums import BrickSizes, Formats
from ovds_utils.vds import VDS, Channel, Components, Formats, AccessModes

metadata = {
    "example": MetadataValue(value="value", category="category#1", type=MetadataTypes.String)
}

shape = (251, 51, 126)
data = np.random.rand(*shape).astype(np.float64)
zeros = np.zeros(shape, dtype=np.float64)

vds = VDS(
    "example.vds",
    data=zeros,
    metadata_dict=metadata,
    databrick_size=BrickSizes.BrickSize_64,
    access_mode=AccessModes.Create,
    channels=[
        Channel(
            name="Channel0",
            format=Formats.R64,
            unit="unitless",
            value_range_min=0.0,
            value_range_max=1000.0,
            components=Components.Components_1
        )
    ]
)
for c in vds.channel(0).chunks():
    c[:, :, :] = data[c.slices]
    c.release()
vds.channel(0).commit()

print(vds[:10,0,0])
>>> [0.14836921 0.06490713 0.05770212 0.2364456  0.49000826 0.1573576
 0.5017615  0.456749   0.6573513  0.72831243]

Links

Metadata

Release files for ovds-utils 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ovds-utils 0.3.1
File Size Uploaded
ovds_utils-0.3.1.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ovds-utils 0.3.1
File Interpreter ABI Platform
ovds_utils-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.0 kB

Release files / ovds_utils-0.3.1.tar.gz

Download URL ovds_utils-0.3.1.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bf5b901f591f0b789538baf7cc9513a2f8592407691cdb59a06a2718966e6b1c
BLAKE2b-256 checksum
How to use checksums
5f17223783f98c2c3d611116079bf664dc1518fb0832ddae7c017bbbdaec587c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / ovds_utils-0.3.1-py3-none-any.whl

Download URL ovds_utils-0.3.1-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5daf1d9cdb389b0c6f4402ac9b4a774f331cdca37e5ed03775e21cc88728ac72
BLAKE2b-256 checksum
How to use checksums
5174f431f2a9219601837461902965be24d265be9ec74b9a4fb99e715ffe8f9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page