llamagen-python 0.1.8__tar.gz → 0.1.10__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: llamagen-python
3
- Version: 0.1.8
3
+ Version: 0.1.10
4
4
  Summary: Official Python SDK for LlamaGen Comic API and Animation API
5
5
  Project-URL: Homepage, https://llamagen.ai/comic-api
6
6
  Project-URL: Documentation, https://llamagen.ai/comic-api/docs
@@ -81,26 +81,10 @@ done = client.comic.wait_for_completion(created["id"], timeout_ms=WAIT_TIMEOUT_M
81
81
  print("comic.wait_for_completion:", done["id"], done.get("status"), done.get("comics"))
82
82
  ```
83
83
 
84
- The full runnable demo is in [`examples/quickstart.py`](examples/quickstart.py):
85
-
86
- ```bash
87
- python examples/quickstart.py
88
- ```
89
-
90
- Pass a local image path to run the upload example:
91
-
92
- ```bash
93
- python examples/quickstart.py upload /path/to/reference.png
94
- ```
95
-
96
- Other README examples are available as subcommands, such as `comic-create`,
97
- `comic-create-advanced`, `comic-get`, `comic-wait`, `comic-create-and-wait`,
98
- `comic-continue`, `comic-update-panel`, `usage`, `animation-create`,
99
- `animation-create-wait`, `animation-wait`, and `animation-create-and-wait`.
100
-
101
- All Python examples below are self-contained for copy/paste usage. Replace
102
- `YOUR_COMIC_ID` or `YOUR_ANIMATION_ID` with an existing generation ID when an
103
- example fetches, waits for, continues, or updates an existing job.
84
+ All Python examples below are self-contained for copy/paste usage in your own
85
+ script, notebook, worker, or backend service. Replace `YOUR_COMIC_ID` or
86
+ `YOUR_ANIMATION_ID` with an existing generation ID when an example fetches,
87
+ waits for, continues, or updates an existing job.
104
88
 
105
89
  ## Configure The Client
106
90
 
@@ -153,11 +137,11 @@ generation = client.comic.create({
153
137
 
154
138
  Comic methods:
155
139
 
156
- - `llamagen.comic.create(params)` calls `POST /v1/comics/generations`.
157
- - `llamagen.comic.get(id, page=None, panel=None)` calls `GET /v1/comics/generations/{id}`.
140
+ - `llamagen.comic.create(params)` submits a new comic generation job and returns the created job id, status, and usage metadata.
141
+ - `llamagen.comic.get(id, page=None, panel=None)` fetches a comic generation's status and result, or a specific page or panel.
158
142
  - `llamagen.comic.continue_write(id, params)` extends an existing comic.
159
143
  - `llamagen.comic.update_panel(id, params)` regenerates one panel.
160
- - `llamagen.comic.usage()` calls `GET /v1/comics/usage`.
144
+ - `llamagen.comic.usage()` fetches the current Comic API usage, available quota, and credit information for the API key.
161
145
  - `llamagen.comic.upload(file, filename=None)` calls `POST /v1/comics/upload`.
162
146
  - `llamagen.comic.wait_for_completion(id, **options)` polls until a terminal status.
163
147
  - `llamagen.comic.create_and_wait(params, **options)` creates and polls.
@@ -332,8 +316,8 @@ print("animation.wait_for_completion:", finished["id"], finished.get("status"))
332
316
 
333
317
  Animation methods:
334
318
 
335
- - `llamagen.animation.create(params)` calls `POST /v1/artworks/generations`.
336
- - `llamagen.animation.get(id)` calls `GET /v1/artworks/generations/{id}`.
319
+ - `llamagen.animation.create(params)` submits a new animation generation job and returns the created job id, status, and usage metadata.
320
+ - `llamagen.animation.get(id)` fetches an animation generation's status, result, and output video metadata.
337
321
  - `llamagen.animation.wait_for_completion(id, **options)` polls video status.
338
322
  - `llamagen.animation.create_and_wait(params, **options)` creates and polls.
339
323
 
@@ -56,26 +56,10 @@ done = client.comic.wait_for_completion(created["id"], timeout_ms=WAIT_TIMEOUT_M
56
56
  print("comic.wait_for_completion:", done["id"], done.get("status"), done.get("comics"))
57
57
  ```
58
58
 
59
- The full runnable demo is in [`examples/quickstart.py`](examples/quickstart.py):
60
-
61
- ```bash
62
- python examples/quickstart.py
63
- ```
64
-
65
- Pass a local image path to run the upload example:
66
-
67
- ```bash
68
- python examples/quickstart.py upload /path/to/reference.png
69
- ```
70
-
71
- Other README examples are available as subcommands, such as `comic-create`,
72
- `comic-create-advanced`, `comic-get`, `comic-wait`, `comic-create-and-wait`,
73
- `comic-continue`, `comic-update-panel`, `usage`, `animation-create`,
74
- `animation-create-wait`, `animation-wait`, and `animation-create-and-wait`.
75
-
76
- All Python examples below are self-contained for copy/paste usage. Replace
77
- `YOUR_COMIC_ID` or `YOUR_ANIMATION_ID` with an existing generation ID when an
78
- example fetches, waits for, continues, or updates an existing job.
59
+ All Python examples below are self-contained for copy/paste usage in your own
60
+ script, notebook, worker, or backend service. Replace `YOUR_COMIC_ID` or
61
+ `YOUR_ANIMATION_ID` with an existing generation ID when an example fetches,
62
+ waits for, continues, or updates an existing job.
79
63
 
80
64
  ## Configure The Client
81
65
 
@@ -128,11 +112,11 @@ generation = client.comic.create({
128
112
 
129
113
  Comic methods:
130
114
 
131
- - `llamagen.comic.create(params)` calls `POST /v1/comics/generations`.
132
- - `llamagen.comic.get(id, page=None, panel=None)` calls `GET /v1/comics/generations/{id}`.
115
+ - `llamagen.comic.create(params)` submits a new comic generation job and returns the created job id, status, and usage metadata.
116
+ - `llamagen.comic.get(id, page=None, panel=None)` fetches a comic generation's status and result, or a specific page or panel.
133
117
  - `llamagen.comic.continue_write(id, params)` extends an existing comic.
134
118
  - `llamagen.comic.update_panel(id, params)` regenerates one panel.
135
- - `llamagen.comic.usage()` calls `GET /v1/comics/usage`.
119
+ - `llamagen.comic.usage()` fetches the current Comic API usage, available quota, and credit information for the API key.
136
120
  - `llamagen.comic.upload(file, filename=None)` calls `POST /v1/comics/upload`.
137
121
  - `llamagen.comic.wait_for_completion(id, **options)` polls until a terminal status.
138
122
  - `llamagen.comic.create_and_wait(params, **options)` creates and polls.
@@ -307,8 +291,8 @@ print("animation.wait_for_completion:", finished["id"], finished.get("status"))
307
291
 
308
292
  Animation methods:
309
293
 
310
- - `llamagen.animation.create(params)` calls `POST /v1/artworks/generations`.
311
- - `llamagen.animation.get(id)` calls `GET /v1/artworks/generations/{id}`.
294
+ - `llamagen.animation.create(params)` submits a new animation generation job and returns the created job id, status, and usage metadata.
295
+ - `llamagen.animation.get(id)` fetches an animation generation's status, result, and output video metadata.
312
296
  - `llamagen.animation.wait_for_completion(id, **options)` polls video status.
313
297
  - `llamagen.animation.create_and_wait(params, **options)` creates and polls.
314
298
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "llamagen-python"
7
- version = "0.1.8"
7
+ version = "0.1.10"
8
8
  description = "Official Python SDK for LlamaGen Comic API and Animation API"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -14,4 +14,4 @@ __all__ = [
14
14
  "SUPPORTED_COMIC_SIZES",
15
15
  ]
16
16
 
17
- __version__ = "0.1.8"
17
+ __version__ = "0.1.10"
@@ -10,7 +10,7 @@ from typing import Any, Dict, Mapping, Optional, Protocol, Tuple
10
10
 
11
11
  from ._errors import LlamaGenAPIError, LlamaGenConnectionError, LlamaGenTimeoutError
12
12
 
13
- DEFAULT_USER_AGENT = "llamagen-python/0.1.8"
13
+ DEFAULT_USER_AGENT = "llamagen-python/0.1.10"
14
14
 
15
15
 
16
16
  class Transport(Protocol):
@@ -80,7 +80,7 @@ class ClientTests(unittest.TestCase):
80
80
  self.assertEqual(call["url"], "https://api.llamagen.ai/v1/comics/generations")
81
81
  self.assertEqual(call["headers"]["Authorization"], "Bearer test-key")
82
82
  self.assertEqual(call["headers"]["Accept"], "application/json")
83
- self.assertEqual(call["headers"]["User-Agent"], "llamagen-python/0.1.8")
83
+ self.assertEqual(call["headers"]["User-Agent"], "llamagen-python/0.1.10")
84
84
  body = json.loads(call["body"].decode("utf-8"))
85
85
  self.assertEqual(body["preset"], "neutral")
86
86
  self.assertEqual(body["size"], "1024x1024")