useknockout 0.7.0__tar.gz → 0.8.1__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 @@
1
+ *
File without changes
@@ -0,0 +1,8 @@
1
+ 01:27:19 [hook] session-start: PROJECT_DIR=C:/Users/Troy/projects/useknockout-python PIPELINE_DIR=C:/Users/Troy/.claude/plugins/cache/claude-plugins-official/remember/0.8.3 REMEMBER_DIR=C:/Users/Troy/projects/useknockout-python/.remember
2
+ 01:29:21 [hook] post-tool: PROJECT_DIR=C:/Users/Troy/projects/useknockout-python PIPELINE_DIR=C:/Users/Troy/.claude/plugins/cache/claude-plugins-official/remember/0.8.3 PYTHON=python REMEMBER_DIR=C:/Users/Troy/projects/useknockout-python/.remember
3
+ 01:29:24 [hook] post-tool: PROJECT_DIR=C:/Users/Troy/projects/useknockout-python PIPELINE_DIR=C:/Users/Troy/.claude/plugins/cache/claude-plugins-official/remember/0.8.3 PYTHON=python REMEMBER_DIR=C:/Users/Troy/projects/useknockout-python/.remember
4
+ 01:29:35 [hook] post-tool: PROJECT_DIR=C:/Users/Troy/projects/useknockout-python PIPELINE_DIR=C:/Users/Troy/.claude/plugins/cache/claude-plugins-official/remember/0.8.3 PYTHON=python REMEMBER_DIR=C:/Users/Troy/projects/useknockout-python/.remember
5
+ 01:29:46 [hook] post-tool: PROJECT_DIR=C:/Users/Troy/projects/useknockout-python PIPELINE_DIR=C:/Users/Troy/.claude/plugins/cache/claude-plugins-official/remember/0.8.3 PYTHON=python REMEMBER_DIR=C:/Users/Troy/projects/useknockout-python/.remember
6
+ 01:30:06 [hook] post-tool: PROJECT_DIR=C:/Users/Troy/projects/useknockout-python PIPELINE_DIR=C:/Users/Troy/.claude/plugins/cache/claude-plugins-official/remember/0.8.3 PYTHON=python REMEMBER_DIR=C:/Users/Troy/projects/useknockout-python/.remember
7
+ 01:30:12 [hook] post-tool: PROJECT_DIR=C:/Users/Troy/projects/useknockout-python PIPELINE_DIR=C:/Users/Troy/.claude/plugins/cache/claude-plugins-official/remember/0.8.3 PYTHON=python REMEMBER_DIR=C:/Users/Troy/projects/useknockout-python/.remember
8
+ 01:30:33 [hook] post-tool: PROJECT_DIR=C:/Users/Troy/projects/useknockout-python PIPELINE_DIR=C:/Users/Troy/.claude/plugins/cache/claude-plugins-official/remember/0.8.3 PYTHON=python REMEMBER_DIR=C:/Users/Troy/projects/useknockout-python/.remember
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: useknockout
3
- Version: 0.7.0
4
- Summary: Python SDK for useknockout — state-of-the-art background removal API.
3
+ Version: 0.8.1
4
+ Summary: Python SDK for useknockout, the open source background removal API.
5
5
  Project-URL: Homepage, https://useknockout.com
6
6
  Project-URL: Documentation, https://github.com/useknockout/python
7
7
  Project-URL: Repository, https://github.com/useknockout/python
@@ -9,7 +9,7 @@ Project-URL: Issues, https://github.com/useknockout/python/issues
9
9
  Author: useknockout
10
10
  License: MIT
11
11
  License-File: LICENSE
12
- Keywords: ai,background-removal,birefnet,image-processing,remove-background,useknockout
12
+ Keywords: ai,background-removal,birefnet,image-processing,open-source,remove-background,useknockout
13
13
  Classifier: Development Status :: 4 - Beta
14
14
  Classifier: Intended Audience :: Developers
15
15
  Classifier: License :: OSI Approved :: MIT License
@@ -30,20 +30,18 @@ Requires-Dist: pytest>=8.0; extra == 'dev'
30
30
  Requires-Dist: ruff>=0.6.0; extra == 'dev'
31
31
  Description-Content-Type: text/markdown
32
32
 
33
- ---
34
- project: projects/useknockout-python
35
- type: readme
36
- ---
33
+
37
34
 
38
35
  <div align="center">
39
36
 
40
37
  # 🥊 useknockout
41
38
 
42
- **State-of-the-art background removal API — Python SDK.**
39
+ **Python SDK for useknockout, the open source background removal API.**
43
40
 
44
41
  [![PyPI](https://img.shields.io/pypi/v/useknockout.svg)](https://pypi.org/project/useknockout/)
45
42
  [![Python](https://img.shields.io/pypi/pyversions/useknockout.svg)](https://pypi.org/project/useknockout/)
46
43
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
44
+ [![PyPI Downloads](https://static.pepy.tech/personalized-badge/useknockout?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/useknockout)
47
45
 
48
46
  [Website](https://useknockout.com) ·
49
47
  [API repo](https://github.com/useknockout/api) ·
@@ -53,7 +51,7 @@ type: readme
53
51
 
54
52
  <img src="https://raw.githubusercontent.com/useknockout/api/main/docs/banner.png" width="800" alt="useknockout — background removal API for developers" />
55
53
 
56
- *Background removal, 40× cheaper than remove.bg. MIT licensed. Self-hostable.*
54
+ *Open source background removal and image processing. MIT licensed.*
57
55
 
58
56
  </div>
59
57
 
@@ -68,6 +66,9 @@ subject-aware image operations: background replacement, drop shadows, stickers a
68
66
  outlines, e-commerce / LinkedIn presets, super-resolution upscaling, face
69
67
  restoration, colorization, silhouettes, and inpainting.
70
68
 
69
+ The API is open source under the MIT license:
70
+ [github.com/useknockout/api](https://github.com/useknockout/api).
71
+
71
72
  The SDK is a thin, fully-typed wrapper over [`httpx`](https://www.python-httpx.org/).
72
73
  It ships both a synchronous client (`Knockout`) and an asynchronous one
73
74
  (`AsyncKnockout`) with identical method signatures. Every image-returning method
@@ -88,14 +89,15 @@ Requires Python 3.9+. The only runtime dependency is `httpx>=0.27.0`.
88
89
  ```python
89
90
  from useknockout import Knockout
90
91
 
91
- client = Knockout() # uses public beta token by default
92
+ client = Knockout() # uses the shared demo key
92
93
  png = client.remove("photo.jpg")
93
94
 
94
95
  with open("out.png", "wb") as f:
95
96
  f.write(png)
96
97
  ```
97
98
 
98
- That's it. Free during the public beta.
99
+ That's it, no sign-up needed to try it. The demo key is limited, so get your own
100
+ key before building on it (see [Authentication](#authentication)).
99
101
 
100
102
  ## Async
101
103
 
@@ -123,16 +125,24 @@ The client resolves its token by falling through three sources, in order:
123
125
 
124
126
  1. The `token=` constructor argument
125
127
  2. The `KNOCKOUT_TOKEN` environment variable
126
- 3. The public beta token (free, rate-limited — baked into the SDK)
128
+ 3. A shared demo key built into the SDK
127
129
 
128
130
  ```python
129
131
  client = Knockout(token="kno_...") # explicit
130
- client = Knockout() # env var or public beta token
132
+ client = Knockout() # env var or shared demo key
131
133
  ```
132
134
 
133
- The token is sent as a `Bearer` header on every request. Get your own token by
134
- emailing `troy@useknockout.com` (paid tier launches at $0.005/image — 40× cheaper
135
- than remove.bg).
135
+ The token is sent as a `Bearer` header on every request.
136
+
137
+ **Demo key limits.** It is for trying the API without an account. It only works
138
+ with `remove`, `replace_background`, `mask`, `sticker` and `compare`, output is
139
+ capped at 1536 px, and it has daily usage limits. Other image methods return an
140
+ error.
141
+
142
+ **Your own key.** Sign up at [useknockout.com/signin](https://useknockout.com/signin).
143
+ Free accounts get 30 images every month on the core tools, no card. Pay-as-you-go
144
+ is $0.02 per image and unlocks the rest. Current rates are on the
145
+ [pricing page](https://useknockout.com/pricing).
136
146
 
137
147
  ## Input types
138
148
 
@@ -152,7 +162,7 @@ client.remove(open("photo.jpg", "rb").read())# bytes
152
162
  ```python
153
163
  from useknockout import Knockout
154
164
 
155
- c = Knockout()
165
+ c = Knockout(token="kno_...") # your own key; the demo key covers only a few of these
156
166
 
157
167
  # --- Core background removal ---
158
168
  c.remove("photo.jpg") # returns PNG/WebP bytes
@@ -297,30 +307,14 @@ when available).
297
307
 
298
308
  | Constructor arg | Default | Purpose |
299
309
  | --- | --- | --- |
300
- | `token` | env var → public beta token | API token, sent as `Bearer` header |
301
- | `base_url` | `https://useknockout--api.modal.run` | API base URL (override for self-hosted) |
310
+ | `token` | env var → shared demo key | API token, sent as `Bearer` header |
311
+ | `base_url` | `https://useknockout--api.modal.run` | API base URL |
302
312
  | `timeout` | `60.0` | per-request timeout in seconds |
303
313
 
304
314
  | Environment variable | Purpose |
305
315
  | --- | --- |
306
316
  | `KNOCKOUT_TOKEN` | API token, used when `token=` is not passed |
307
317
 
308
- ## Self-host
309
-
310
- The API is open source and runs on Modal. Deploy your own copy:
311
-
312
- ```bash
313
- git clone https://github.com/useknockout/api
314
- cd api
315
- modal deploy main.py
316
- ```
317
-
318
- Then point the SDK at your deployment:
319
-
320
- ```python
321
- client = Knockout(token="your-token", base_url="https://your-deploy.modal.run")
322
- ```
323
-
324
318
  ## Project structure
325
319
 
326
320
  ```