Skip to content

Commit 23543b3

Browse files
authored
Merge branch 'main' into v0.1.0/scene-index
2 parents 962e4d4 + e0b3eee commit 23543b3

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

setup.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_version():
2828
long_description_content_type="text/markdown",
2929
url="https://github.com/video-db/videodb-python",
3030
packages=find_packages(exclude=["tests", "tests.*"]),
31-
python_requires=">=3.9",
31+
python_requires=">=3.8",
3232
install_requires=[
3333
"requests>=2.25.1",
3434
"backoff>=2.2.1",
@@ -37,6 +37,11 @@ def get_version():
3737
classifiers=[
3838
"Intended Audience :: Developers",
3939
"Programming Language :: Python :: 3",
40+
"Programming Language :: Python :: 3.8",
4041
"Programming Language :: Python :: 3.9",
42+
"Programming Language :: Python :: 3.10",
43+
"Programming Language :: Python :: 3.11",
44+
"Programming Language :: Python :: 3.12",
45+
"License :: OSI Approved :: Apache Software License",
4146
],
4247
)

videodb/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
logger: logging.Logger = logging.getLogger("videodb")
2525

26-
__version__ = "0.0.4"
26+
__version__ = "0.0.5"
2727
__author__ = "videodb"
2828

2929
__all__ = [

videodb/collection.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import (
44
Optional,
55
Union,
6+
List,
67
)
78
from videodb._upload import (
89
upload,
@@ -26,7 +27,7 @@ def __init__(self, _connection, id: str, name: str = None, description: str = No
2627
self.name = name
2728
self.description = description
2829

29-
def get_videos(self) -> list[Video]:
30+
def get_videos(self) -> List[Video]:
3031
videos_data = self._connection.get(path=f"{ApiPath.video}")
3132
return [Video(self._connection, **video) for video in videos_data.get("videos")]
3233

@@ -44,7 +45,7 @@ def delete_video(self, video_id: str) -> None:
4445
"""
4546
return self._connection.delete(path=f"{ApiPath.video}/{video_id}")
4647

47-
def get_audios(self) -> list[Audio]:
48+
def get_audios(self) -> List[Audio]:
4849
audios_data = self._connection.get(path=f"{ApiPath.audio}")
4950
return [Audio(self._connection, **audio) for audio in audios_data.get("audios")]
5051

@@ -55,7 +56,7 @@ def get_audio(self, audio_id: str) -> Audio:
5556
def delete_audio(self, audio_id: str) -> None:
5657
return self._connection.delete(path=f"{ApiPath.audio}/{audio_id}")
5758

58-
def get_images(self) -> list[Image]:
59+
def get_images(self) -> List[Image]:
5960
images_data = self._connection.get(path=f"{ApiPath.image}")
6061
return [Image(self._connection, **image) for image in images_data.get("images")]
6162

videodb/video.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Optional, Union
1+
from typing import Optional, List, Dict, Tuple
22
from videodb._utils._video import play_stream
33
from videodb._constants import (
44
ApiPath,
@@ -68,7 +68,7 @@ def delete(self) -> None:
6868
"""
6969
self._connection.delete(path=f"{ApiPath.video}/{self.id}")
7070

71-
def generate_stream(self, timeline: Optional[list[tuple[int, int]]] = None) -> str:
71+
def generate_stream(self, timeline: Optional[List[Tuple[int, int]]] = None) -> str:
7272
"""Generate the stream url of the video
7373
7474
:param list timeline: The timeline of the video to be streamed. Defaults to None.
@@ -108,7 +108,7 @@ def _fetch_transcript(self, force: bool = False) -> None:
108108
self.transcript = transcript_data.get("word_timestamps", [])
109109
self.transcript_text = transcript_data.get("text", "")
110110

111-
def get_transcript(self, force: bool = False) -> list[dict]:
111+
def get_transcript(self, force: bool = False) -> List[Dict]:
112112
self._fetch_transcript(force)
113113
return self.transcript
114114

0 commit comments

Comments
 (0)