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.0.1.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.

spectator_db-0.0.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for spectator_db-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d593cd914b5affb72f0ba4b606551fb37de3bdbdaf2ee2e87dc98114bbb8ef54
MD5 b6e8c993baafdf7ca52da8579d9b3b2d
BLAKE2b-256 b1c0ca167ab9ba3bcde290973ae83f5f65ddd69547a91052fc00ce9eec924a5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectator_db-0.0.1.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.0.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for spectator_db-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 42e53771b3780cbafa208e18f7828b51d2f84a9164e0a2cdbf9295769ed4030a
MD5 9e7917dcdb9a286beeb80966b0f97245
BLAKE2b-256 1e2a262c555bb6585634a147655c34a83996ee205e18e40361ac94962a1e4f7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectator_db-0.0.1-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