Skip to main content

A Python library to download datasets created with Scry.

Project description

ScryDatasets

Overview

ScryDatasets is a Python library that allows users to easily manage datasets created on the IoT-Sense platform. Users can download datasets they have created, list available datasets, and delete user-uploaded files.

Installation

To install ScryDatasets, clone the repository and install the dependencies:

git clone <repository-url>
cd scry_dataset
pip install -r requirements.txt

or

pip install git+https://github.com/sc-govsin/ScryDatasets.git@v1.0.3

Configuration

ScryDatasets can be configured using a YAML file. The library will look for the configuration file in the following locations, in order:

  1. ~/.datasetmanager/config.yaml (User's home directory)
  2. /etc/datasetmanager/config.yaml (System-wide configuration)
  3. config.yaml (Current working directory)

You can specify settings such as the default workspace, API keys, and other preferences in this configuration file.

Sample Configuration

storage:
    type: oci
    bucket: ScryDatasets

mongodb:
    database: llm_test_db
    uri: ""
    pem: "/mongo.pem"
    ca: "/rootCA.crt"
oci:
  user: 
  fingerprint: 
  key_file: key.pem
  tenancy: 
  region: 

Example Usage

Downloading Datasets Created on IoT-Sense Platform

import pandas as pd
from ScryDatasets.dataset_manager import DatasetManager

# Initialize DatasetManager
manager = DatasetManager()

# Download the dataset created from the IoT-platform
# Replace 'Dataset_ABC_28-02-2025T10_55_31' with the actual dataset name

df = manager.download('Dataset_ABC_28-02-2025T10_55_31')
if df is not None:
    print(df.head())
else:
    print("Dataset not found or could not be downloaded.")

Additional Features

Uploading a Dataset (Deprecated)

# Create a sample DataFrame
data = {
    'column1': [1, 2, 3],
    'column2': ['a', 'b', 'c']
}
df = pd.DataFrame(data)

# Save the dataset to a CSV file
csv_path = 'sample_dataset.csv'
df.to_csv(csv_path, index=False)

# Upload the dataset
manager = DatasetManager()
dataset_info = manager.upload(csv_path, name='sample_dataset', description='Sample dataset', tags=['sample'])

Listing All Datasets

datasets = manager.list_datasets()
for ds in datasets:
    print(ds)

Downloading User-Uploaded Datasets (Deprecated)

df = manager.download_user_uploaded_data('sample_dataset')

Deleting a Dataset

# Only user-uploaded datasets can be deleted
manager.delete('sample_dataset')

Notes

  • Dataset downloads from the IoT-Sense platform: Ensure you use the correct dataset name.
  • Deprecation Notice: The upload() and download_user_uploaded_data() methods are deprecated.
  • Deletion: You can only delete datasets that you have uploaded.

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

ScryDatasets-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ScryDatasets-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file ScryDatasets-0.1.0.tar.gz.

File metadata

  • Download URL: ScryDatasets-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for ScryDatasets-0.1.0.tar.gz
Algorithm Hash digest
SHA256 72ae813b24158f69e7f4d9088b78ad97c002ff2cd04f5e3c6ad3330b9f27d55a
MD5 a65413c2fc2452a47184c0653aae5c0a
BLAKE2b-256 4dcdf4e4456293509061bd299a0c9403994ae5172d054558526ff6950a19b5c6

See more details on using hashes here.

File details

Details for the file ScryDatasets-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ScryDatasets-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for ScryDatasets-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2ef019bdcf951c9109915b072e17b93bced7721878c0b9afc8e38455eb5c2f4
MD5 3cd2c7f79f405fba53ea216050fd97d1
BLAKE2b-256 f3e5f881fd897a8435daabc62ea1ec281a7f07f77f8f7cfe4fb202b1ed3eef62

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page