Skip to main content

A database for storing and managing images and videos.

Project description

SpectatorDB

SpectatorDB is a Python library for managing media files (images and videos) and their metadata. It stores media files in the local file system and tracks metadata in a SQLite database, making it easy to organize, retrieve, and manage your media assets programmatically.

Requirements

  • Python 3.13+

Installation

Clone the repository and install dependencies:

# Clone the repository
$ git clone https://github.com/iot-spectator/spectator-db.git
$ cd spectator-db
$ python -m pip install -r requirements.txt

Usage

Basic Example

from spectatordb.spectatordb import SpectatorDB, MediaType
from spectatordb.connector.sqlite_connector import SQLiteConnector
from spectatordb.storage.local_storage import LocalStorage
import pathlib

# Set up storage and database connector
storage = LocalStorage("./media")
sql_connector = SQLiteConnector("./spectator.db")

# Initialize SpectatorDB
spectator_db = SpectatorDB(storage, sql_connector)

# Insert an image file
image_path = pathlib.Path("/path/to/image.jpg")
spectator_db.insert(image_path, MediaType.IMAGE)

# Insert a video file
video_path = pathlib.Path("/path/to/video.mp4")
spectator_db.insert(video_path, MediaType.VIDEO)

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

spectator_db-0.1.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

spectator_db-0.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spectator_db-0.1.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spectator_db-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1a56a7314831886076230d394a8f805a2ea4f6e662dfb885eb553bee9850010b
MD5 7b1dad32e53888bd4fd0cae4a3c5fbe5
BLAKE2b-256 66a902cce85720344b8ddf383882fe1419ed4bfbf85e6633c22cf9a2136ef884

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectator_db-0.1.0.tar.gz:

Publisher: pypi_publish.yml on iot-spectator/spectator-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: spectator_db-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spectator_db-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c34e43f7083917623203162b1fdddffb4cdff673785e823c204080bb520c7851
MD5 1e0e609f0d4f6f5353185d4095a01d44
BLAKE2b-256 6199a70aa90f849621bfff1b1153a71140fe1909d5b27e9199a45322994c246c

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectator_db-0.1.0-py3-none-any.whl:

Publisher: pypi_publish.yml on iot-spectator/spectator-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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