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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d593cd914b5affb72f0ba4b606551fb37de3bdbdaf2ee2e87dc98114bbb8ef54
|
|
| MD5 |
b6e8c993baafdf7ca52da8579d9b3b2d
|
|
| BLAKE2b-256 |
b1c0ca167ab9ba3bcde290973ae83f5f65ddd69547a91052fc00ce9eec924a5d
|
Provenance
The following attestation bundles were made for spectator_db-0.0.1.tar.gz:
Publisher:
pypi_publish.yml on iot-spectator/spectator-db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spectator_db-0.0.1.tar.gz -
Subject digest:
d593cd914b5affb72f0ba4b606551fb37de3bdbdaf2ee2e87dc98114bbb8ef54 - Sigstore transparency entry: 772073867
- Sigstore integration time:
-
Permalink:
iot-spectator/spectator-db@e4ba736c67ae3cd2f76ceb5d158401658904ee8c -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/iot-spectator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_publish.yml@e4ba736c67ae3cd2f76ceb5d158401658904ee8c -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42e53771b3780cbafa208e18f7828b51d2f84a9164e0a2cdbf9295769ed4030a
|
|
| MD5 |
9e7917dcdb9a286beeb80966b0f97245
|
|
| BLAKE2b-256 |
1e2a262c555bb6585634a147655c34a83996ee205e18e40361ac94962a1e4f7b
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spectator_db-0.0.1-py3-none-any.whl -
Subject digest:
42e53771b3780cbafa208e18f7828b51d2f84a9164e0a2cdbf9295769ed4030a - Sigstore transparency entry: 772073872
- Sigstore integration time:
-
Permalink:
iot-spectator/spectator-db@e4ba736c67ae3cd2f76ceb5d158401658904ee8c -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/iot-spectator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_publish.yml@e4ba736c67ae3cd2f76ceb5d158401658904ee8c -
Trigger Event:
release
-
Statement type: