Skip to main content

A Python toolkit for managing, retrieving and processing data.

Reason this release was yanked:

package is broken

Project description

Python Dataware Toolkit

A Python toolkit for managing, retrieving, and processing data.

Installation

You can install the toolkit with:

$ pip3 install pydtk

If you want to install the toolkit with extra feature (e.g. support for PointCloud and ROS), you can install it with extra dependencies as follows:

$ pip3 install pydtk[pointcloud,ros]

Some PyDTK models require additional packages.
Please refer the following table and install them manually with command pip install ....

PyDTK model Required packages
rosbag.* ros_numpy (https://github.com/eric-wieser/ros_numpy.git)
pointcloud.PCDModel pypcd (https://github.com/klintan/pypcd.git)

Usage

By using Pydtk, you can load a variety of types of data with a unified interface as shown below.

  1. Load DBHandler for retrieving metadata
from pydtk.db import DBHandler

# Initialize handler (This will read all the metadata from DB on initialization)
handler = DBHandler(
    db_class='meta',
    db_host='./examples/example_db',
    base_dir_path='./test'
)
  1. Read metadata from db with data selection.
# Select by timestamp
handler.read(pql='start_timestamp > 1420000000 and end_timestamp < 1500000000')
print(handler.data)

# Select by record-id
handler.read(pql='record_id == regex("test.*")')
print(handler.data)
  1. Load data from files based on metadata.
from pydtk.io import BaseFileReader, NoModelMatchedError

reader = BaseFileReader()

try:
    for sample in handler:
        print('loading content "{0}" from file "{1}"'.format(sample['contents'], sample['path']))
        try:
            timestamps, data, columns = reader.read(sample)
            assert print(data)
        except NoModelMatchedError as e:
            print(str(e))
            continue
except EOFError:
    pass

Documentation

For more information about this toolkit, please refer the document.

Setup for contribution

To improve this toolkit, firstly clone this repository and then run the following command to prepare the environment.

$ git clone git@github.com:dataware-tools/pydtk.git --recurse-submodules
$ poetry install

Make sure that poetry is installed before executing the command.

If you want to install the toolkit with extra feature (e.g. support for ROS), please specify it with -E option.
Example (installation with pointcloud and ros extras):

$ poetry install -E pointcloud -E ros

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

pydtk-0.2.14.tar.gz (79.8 kB view details)

Uploaded Source

Built Distribution

pydtk-0.2.14-py3-none-any.whl (131.6 kB view details)

Uploaded Python 3

File details

Details for the file pydtk-0.2.14.tar.gz.

File metadata

  • Download URL: pydtk-0.2.14.tar.gz
  • Upload date:
  • Size: 79.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.9.13 Linux/5.15.0-48-generic

File hashes

Hashes for pydtk-0.2.14.tar.gz
Algorithm Hash digest
SHA256 66e46e5269929e612e11bfbc32fe0fb77406bc38ad17a253a5b83689fc159589
MD5 34b0e939352e764fd5086f63f145339e
BLAKE2b-256 d54ee07b03afe50e07c7d484b028552298a2cfdbaf1b67a53257c78a57b490e1

See more details on using hashes here.

File details

Details for the file pydtk-0.2.14-py3-none-any.whl.

File metadata

  • Download URL: pydtk-0.2.14-py3-none-any.whl
  • Upload date:
  • Size: 131.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.0 CPython/3.9.13 Linux/5.15.0-48-generic

File hashes

Hashes for pydtk-0.2.14-py3-none-any.whl
Algorithm Hash digest
SHA256 a2b0febed487cc399032977b4af06fa5072056990479091826234a29051190a1
MD5 696b855d87b8a5d41857e538bab34a9d
BLAKE2b-256 cf0ba2b05cb367947a59cb9869d68e7e9c8276c45829454d1ac16134d799915a

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