napari-aibirthday 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AI Birthday Video Generator (https://aibirthdayvideogenerator.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: napari-aibirthday
3
+ Version: 1.0.0
4
+ Summary: AI birthday video generator from a single photo: they pop champagne on a park bench, blow out a Scorpio cake, or light a crown cake at the car window. Official napari plugin.
5
+ Author-email: AI Birthday Video Generator <support@aibirthdayvideogenerator.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://aibirthdayvideogenerator.com/?utm_source=napari&utm_medium=package
8
+ Project-URL: Documentation, https://aibirthdayvideogenerator.readthedocs.io/en/latest/
9
+ Project-URL: Pricing, https://aibirthdayvideogenerator.com/pricing?utm_source=napari&utm_medium=package
10
+ Project-URL: Source, https://github.com/hanshs474/napari-aibirthday
11
+ Project-URL: Bug Tracker, https://github.com/hanshs474/napari-aibirthday/issues
12
+ Keywords: napari,ai,birthday-video,video-generation,image-to-video,seedance
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Framework :: napari
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Multimedia :: Video
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: aibirthday>=0.1.0
23
+ Requires-Dist: numpy
24
+ Requires-Dist: imageio>=2.28
25
+ Requires-Dist: magicgui
26
+ Dynamic: license-file
27
+
28
+ # napari-aibirthday
29
+
30
+ AI birthday video generator from a single photo: they pop champagne on a park bench, blow out a Scorpio cake, or light a crown cake at the car window.
31
+
32
+ Official napari plugin for [AI Birthday Video Generator](https://aibirthdayvideogenerator.com/?utm_source=napari&utm_medium=package) (`https://aibirthdayvideogenerator.com/`). Generate 12-second 720p vertical (`9:16`) birthday video clips on `seedance-2-mini` and open the decoded frame stack directly as a napari image layer.
33
+
34
+ - Create an API key at [API Keys](https://aibirthdayvideogenerator.com/settings/apikeys) and set `ABVG_API_KEY`.
35
+ - Scene guides: [Read the Docs](https://aibirthdayvideogenerator.readthedocs.io/en/latest/) · Credit packs: [Pricing](https://aibirthdayvideogenerator.com/pricing?utm_source=napari&utm_medium=package).
36
+ - Source code: [github.com/hanshs474/napari-aibirthday](https://github.com/hanshs474/napari-aibirthday).
37
+
38
+ ## Install
39
+
40
+ ```bash
41
+ pip install napari-aibirthday
42
+ ```
43
+
44
+ ## Usage
45
+
46
+ Open **Plugins → AI Birthday Video Generator** in napari, paste your prompt and optional portrait URL, and click **Generate Birthday Video**.
47
+
48
+ ## License
49
+
50
+ MIT
@@ -0,0 +1,23 @@
1
+ # napari-aibirthday
2
+
3
+ AI birthday video generator from a single photo: they pop champagne on a park bench, blow out a Scorpio cake, or light a crown cake at the car window.
4
+
5
+ Official napari plugin for [AI Birthday Video Generator](https://aibirthdayvideogenerator.com/?utm_source=napari&utm_medium=package) (`https://aibirthdayvideogenerator.com/`). Generate 12-second 720p vertical (`9:16`) birthday video clips on `seedance-2-mini` and open the decoded frame stack directly as a napari image layer.
6
+
7
+ - Create an API key at [API Keys](https://aibirthdayvideogenerator.com/settings/apikeys) and set `ABVG_API_KEY`.
8
+ - Scene guides: [Read the Docs](https://aibirthdayvideogenerator.readthedocs.io/en/latest/) · Credit packs: [Pricing](https://aibirthdayvideogenerator.com/pricing?utm_source=napari&utm_medium=package).
9
+ - Source code: [github.com/hanshs474/napari-aibirthday](https://github.com/hanshs474/napari-aibirthday).
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ pip install napari-aibirthday
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ Open **Plugins → AI Birthday Video Generator** in napari, paste your prompt and optional portrait URL, and click **Generate Birthday Video**.
20
+
21
+ ## License
22
+
23
+ MIT
@@ -0,0 +1,38 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "napari-aibirthday"
7
+ version = "1.0.0"
8
+ description = "AI birthday video generator from a single photo: they pop champagne on a park bench, blow out a Scorpio cake, or light a crown cake at the car window. Official napari plugin."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "AI Birthday Video Generator", email = "support@aibirthdayvideogenerator.com" }]
13
+ keywords = ["napari", "ai", "birthday-video", "video-generation", "image-to-video", "seedance"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Framework :: napari",
17
+ "Intended Audience :: Science/Research",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Programming Language :: Python :: 3",
20
+ "Topic :: Multimedia :: Video",
21
+ ]
22
+ dependencies = ["aibirthday>=0.1.0", "numpy", "imageio>=2.28", "magicgui"]
23
+
24
+ [project.urls]
25
+ Homepage = "https://aibirthdayvideogenerator.com/?utm_source=napari&utm_medium=package"
26
+ Documentation = "https://aibirthdayvideogenerator.readthedocs.io/en/latest/"
27
+ Pricing = "https://aibirthdayvideogenerator.com/pricing?utm_source=napari&utm_medium=package"
28
+ Source = "https://github.com/hanshs474/napari-aibirthday"
29
+ "Bug Tracker" = "https://github.com/hanshs474/napari-aibirthday/issues"
30
+
31
+ [project.entry-points."napari.manifest"]
32
+ napari-aibirthday = "napari_aibirthday:napari.yaml"
33
+
34
+ [tool.setuptools.packages.find]
35
+ where = ["src"]
36
+
37
+ [tool.setuptools.package-data]
38
+ napari_aibirthday = ["napari.yaml"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """napari plugin for AI Birthday Video Generator (https://aibirthdayvideogenerator.com/)."""
2
+
3
+ __version__ = "1.0.0"
@@ -0,0 +1,66 @@
1
+ from __future__ import annotations
2
+ import os
3
+ import tempfile
4
+ import time
5
+ import urllib.request
6
+ from typing import Any, Optional
7
+
8
+ from aibirthday import Client
9
+
10
+
11
+ def load_video_frames(video_url: str) -> Any:
12
+ """Download an MP4 clip and decode it into a (T, H, W, C) numpy array."""
13
+ import imageio.v3 as iio
14
+
15
+ with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as tmp:
16
+ tmp_path = tmp.name
17
+ try:
18
+ req = urllib.request.Request(video_url, headers={"User-Agent": "napari-aibirthday/1.0.0"})
19
+ with urllib.request.urlopen(req, timeout=120) as resp, open(tmp_path, "wb") as out:
20
+ out.write(resp.read())
21
+ return iio.imread(tmp_path)
22
+ finally:
23
+ if os.path.exists(tmp_path):
24
+ os.remove(tmp_path)
25
+
26
+
27
+ def generate_birthday_video_frames(
28
+ prompt: str,
29
+ image_url: str = "",
30
+ api_key: str = "",
31
+ client: Optional[Client] = None,
32
+ ) -> Any:
33
+ """Generate a 12-second 720p vertical birthday video and return its frame stack."""
34
+ c = client or Client(api_key=api_key or None)
35
+ task_id = c.submit(prompt, image_url=image_url.strip() or None)
36
+ deadline = time.monotonic() + c.timeout
37
+ while True:
38
+ st = c.status(task_id)
39
+ status = st.get("status")
40
+ if status == "success" and st.get("videos"):
41
+ return load_video_frames(st["videos"][0])
42
+ if status in ("failed", "canceled"):
43
+ raise RuntimeError(st.get("errorMessage") or f"run {task_id} {status}")
44
+ if time.monotonic() >= deadline:
45
+ raise TimeoutError(f"run {task_id} timed out")
46
+ time.sleep(c.poll_every)
47
+
48
+
49
+ try:
50
+ from magicgui import magic_factory
51
+
52
+ @magic_factory(
53
+ call_button="Generate Birthday Video",
54
+ prompt={"widget_type": "TextEdit", "label": "Prompt"},
55
+ image_url={"label": "Photo URL (optional)"},
56
+ api_key={"label": "ABVG API Key (or env ABVG_API_KEY)", "widget_type": "Password"},
57
+ )
58
+ def generate_clip(
59
+ prompt: str = "popping champagne on a park bench with a birthday cake",
60
+ image_url: str = "",
61
+ api_key: str = "",
62
+ ) -> "napari.types.ImageData":
63
+ return generate_birthday_video_frames(prompt=prompt, image_url=image_url, api_key=api_key)
64
+ except ImportError:
65
+ def generate_clip(prompt: str = "", image_url: str = "", api_key: str = "") -> Any:
66
+ return generate_birthday_video_frames(prompt=prompt, image_url=image_url, api_key=api_key)
@@ -0,0 +1,10 @@
1
+ name: napari-aibirthday
2
+ display_name: AI Birthday Video Generator
3
+ contributions:
4
+ commands:
5
+ - id: napari-aibirthday.generate_clip
6
+ python_name: napari_aibirthday._widget:generate_clip
7
+ title: Generate an AI birthday video layer
8
+ widgets:
9
+ - command: napari-aibirthday.generate_clip
10
+ display_name: AI Birthday Video Generator
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.4
2
+ Name: napari-aibirthday
3
+ Version: 1.0.0
4
+ Summary: AI birthday video generator from a single photo: they pop champagne on a park bench, blow out a Scorpio cake, or light a crown cake at the car window. Official napari plugin.
5
+ Author-email: AI Birthday Video Generator <support@aibirthdayvideogenerator.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://aibirthdayvideogenerator.com/?utm_source=napari&utm_medium=package
8
+ Project-URL: Documentation, https://aibirthdayvideogenerator.readthedocs.io/en/latest/
9
+ Project-URL: Pricing, https://aibirthdayvideogenerator.com/pricing?utm_source=napari&utm_medium=package
10
+ Project-URL: Source, https://github.com/hanshs474/napari-aibirthday
11
+ Project-URL: Bug Tracker, https://github.com/hanshs474/napari-aibirthday/issues
12
+ Keywords: napari,ai,birthday-video,video-generation,image-to-video,seedance
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Framework :: napari
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Topic :: Multimedia :: Video
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: aibirthday>=0.1.0
23
+ Requires-Dist: numpy
24
+ Requires-Dist: imageio>=2.28
25
+ Requires-Dist: magicgui
26
+ Dynamic: license-file
27
+
28
+ # napari-aibirthday
29
+
30
+ AI birthday video generator from a single photo: they pop champagne on a park bench, blow out a Scorpio cake, or light a crown cake at the car window.
31
+
32
+ Official napari plugin for [AI Birthday Video Generator](https://aibirthdayvideogenerator.com/?utm_source=napari&utm_medium=package) (`https://aibirthdayvideogenerator.com/`). Generate 12-second 720p vertical (`9:16`) birthday video clips on `seedance-2-mini` and open the decoded frame stack directly as a napari image layer.
33
+
34
+ - Create an API key at [API Keys](https://aibirthdayvideogenerator.com/settings/apikeys) and set `ABVG_API_KEY`.
35
+ - Scene guides: [Read the Docs](https://aibirthdayvideogenerator.readthedocs.io/en/latest/) · Credit packs: [Pricing](https://aibirthdayvideogenerator.com/pricing?utm_source=napari&utm_medium=package).
36
+ - Source code: [github.com/hanshs474/napari-aibirthday](https://github.com/hanshs474/napari-aibirthday).
37
+
38
+ ## Install
39
+
40
+ ```bash
41
+ pip install napari-aibirthday
42
+ ```
43
+
44
+ ## Usage
45
+
46
+ Open **Plugins → AI Birthday Video Generator** in napari, paste your prompt and optional portrait URL, and click **Generate Birthday Video**.
47
+
48
+ ## License
49
+
50
+ MIT
@@ -0,0 +1,12 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/napari_aibirthday/__init__.py
5
+ src/napari_aibirthday/_widget.py
6
+ src/napari_aibirthday/napari.yaml
7
+ src/napari_aibirthday.egg-info/PKG-INFO
8
+ src/napari_aibirthday.egg-info/SOURCES.txt
9
+ src/napari_aibirthday.egg-info/dependency_links.txt
10
+ src/napari_aibirthday.egg-info/entry_points.txt
11
+ src/napari_aibirthday.egg-info/requires.txt
12
+ src/napari_aibirthday.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [napari.manifest]
2
+ napari-aibirthday = napari_aibirthday:napari.yaml
@@ -0,0 +1,4 @@
1
+ aibirthday>=0.1.0
2
+ numpy
3
+ imageio>=2.28
4
+ magicgui
@@ -0,0 +1 @@
1
+ napari_aibirthday