confamnode 0.2.2__tar.gz → 0.2.3__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.
- {confamnode-0.2.2 → confamnode-0.2.3}/PKG-INFO +16 -17
- {confamnode-0.2.2 → confamnode-0.2.3}/README.md +15 -15
- {confamnode-0.2.2 → confamnode-0.2.3}/confamnode/__init__.py +1 -1
- {confamnode-0.2.2 → confamnode-0.2.3}/confamnode/client.py +5 -3
- confamnode-0.2.3/confamnode/utils.py +26 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/pyproject.toml +1 -1
- confamnode-0.2.3/tests/test_client_errors.py +82 -0
- confamnode-0.2.3/tests/test_utils.py +46 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/uv.lock +1 -1
- confamnode-0.2.2/LICENSE +0 -201
- {confamnode-0.2.2 → confamnode-0.2.3}/.gitignore +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/.python-version +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/confamnode/ansa.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/confamnode/builders.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/confamnode/config.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/confamnode/exceptions.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/confamnode/models.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/confamnode/registry.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/tests/__init__.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/tests/test_ansa.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/tests/test_client.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/tests/test_exceptions.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/tests/test_gist.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/tests/test_init.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/tests/test_models.py +0 -0
- {confamnode-0.2.2 → confamnode-0.2.3}/tests/test_stream.py +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: confamnode
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: The Nigerian AI inference gateway
|
|
5
5
|
Project-URL: Repository, https://github.com/confamnodeai/confamnode
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/confamnodeai/confamnode/issues
|
|
7
7
|
Author-email: JoTeq the First <hello@confamnode.com>
|
|
8
8
|
License: Apache-2.0
|
|
9
|
-
License-File: LICENSE
|
|
10
9
|
Keywords: ai,confamnode,inference,joteq,llm,nigeria
|
|
11
10
|
Classifier: Development Status :: 3 - Alpha
|
|
12
11
|
Classifier: Intended Audience :: Developers
|
|
@@ -174,25 +173,25 @@ ansa.raw["usage"] # prompt and completion token counts
|
|
|
174
173
|
|
|
175
174
|
### Free Tier
|
|
176
175
|
|
|
177
|
-
| Model | Description | Price |
|
|
178
|
-
|
|
179
|
-
| `confam-lite` | Light text and general chat | Free |
|
|
180
|
-
| `confam-speed` | Fast, high quality responses | Free |
|
|
181
|
-
| `confam-reasoning` | Standard reasoning and analysis | Free |
|
|
176
|
+
| Model | Description | Modality | Price |
|
|
177
|
+
|---|---|---|---|
|
|
178
|
+
| `confam-lite` | Light text and general chat | Text-to-Text | Free |
|
|
179
|
+
| `confam-speed` | Fast, high quality responses | Image-Text-to-Text | Free |
|
|
180
|
+
| `confam-reasoning` | Standard reasoning and analysis | Text-to-Text | Free |
|
|
182
181
|
|
|
183
182
|
### Paid Tier
|
|
184
183
|
|
|
185
|
-
| Model | Description | Input ₦/1M | Output ₦/1M | Input ₦/1K | Output ₦/1K |
|
|
186
|
-
|
|
187
|
-
| `confam-intelligence` | General smart tasks, 1M context | ₦596 | ₦3,571 | ₦0.596 | ₦3.571 |
|
|
188
|
-
| `confam-deep-reasoning` | Complex thinking, multi-step analysis | ₦234 | ₦468 | ₦0.234 | ₦0.468 |
|
|
189
|
-
| `confam-code` | Coding assistance, 1M context | ₦234 | ₦468 | ₦0.234 | ₦0.468 |
|
|
184
|
+
| Model | Description | Modality | Input ₦/1M | Output ₦/1M | Input ₦/1K | Output ₦/1K |
|
|
185
|
+
|---|---|---|---|---|---|---|
|
|
186
|
+
| `confam-intelligence` | General smart tasks, 1M context | Image-Text-to-Text | ₦596 | ₦3,571 | ₦0.596 | ₦3.571 |
|
|
187
|
+
| `confam-deep-reasoning` | Complex thinking, multi-step analysis | Image-Text-to-Text | ₦234 | ₦468 | ₦0.234 | ₦0.468 |
|
|
188
|
+
| `confam-code` | Coding assistance, 1M context | Image-Text-to-Text | ₦234 | ₦468 | ₦0.234 | ₦0.468 |
|
|
190
189
|
|
|
191
190
|
### Local Models — Nigerian Data Residency
|
|
192
191
|
|
|
193
|
-
| Model | Description | Input ₦/1M | Output ₦/1M | Input ₦/1K | Output ₦/1K |
|
|
194
|
-
|
|
195
|
-
| `confam-nano` | Local model — data stays in Nigeria | ₦500 | ₦1,500 | ₦0.500 | ₦1.500 |
|
|
192
|
+
| Model | Description | Modality | Input ₦/1M | Output ₦/1M | Input ₦/1K | Output ₦/1K |
|
|
193
|
+
|---|---|---|---|---|---|---|
|
|
194
|
+
| `confam-nano` | Local model — data stays in Nigeria | Image-Text-to-Text | ₦500 | ₦1,500 | ₦0.500 | ₦1.500 |
|
|
196
195
|
|
|
197
196
|
Runs entirely on Nigerian hardware. Data never transmitted abroad.
|
|
198
197
|
Ideal for banks, fintechs, hospitals, law firms, and government agencies.
|
|
@@ -341,7 +340,7 @@ For enterprise clients running ConfamNode on private infrastructure:
|
|
|
341
340
|
```python
|
|
342
341
|
client = ConfamNode(
|
|
343
342
|
api_key="confam-xxx",
|
|
344
|
-
base_url="http://your-private-server:
|
|
343
|
+
base_url="http://your-private-server:8000/v1"
|
|
345
344
|
)
|
|
346
345
|
```
|
|
347
346
|
|
|
@@ -404,4 +403,4 @@ Contact: [hello@confamnode.com](mailto:hello@confamnode.com)
|
|
|
404
403
|
|
|
405
404
|
Apache 2.0
|
|
406
405
|
|
|
407
|
-
---
|
|
406
|
+
---
|
|
@@ -150,25 +150,25 @@ ansa.raw["usage"] # prompt and completion token counts
|
|
|
150
150
|
|
|
151
151
|
### Free Tier
|
|
152
152
|
|
|
153
|
-
| Model | Description | Price |
|
|
154
|
-
|
|
155
|
-
| `confam-lite` | Light text and general chat | Free |
|
|
156
|
-
| `confam-speed` | Fast, high quality responses | Free |
|
|
157
|
-
| `confam-reasoning` | Standard reasoning and analysis | Free |
|
|
153
|
+
| Model | Description | Modality | Price |
|
|
154
|
+
|---|---|---|---|
|
|
155
|
+
| `confam-lite` | Light text and general chat | Text-to-Text | Free |
|
|
156
|
+
| `confam-speed` | Fast, high quality responses | Image-Text-to-Text | Free |
|
|
157
|
+
| `confam-reasoning` | Standard reasoning and analysis | Text-to-Text | Free |
|
|
158
158
|
|
|
159
159
|
### Paid Tier
|
|
160
160
|
|
|
161
|
-
| Model | Description | Input ₦/1M | Output ₦/1M | Input ₦/1K | Output ₦/1K |
|
|
162
|
-
|
|
163
|
-
| `confam-intelligence` | General smart tasks, 1M context | ₦596 | ₦3,571 | ₦0.596 | ₦3.571 |
|
|
164
|
-
| `confam-deep-reasoning` | Complex thinking, multi-step analysis | ₦234 | ₦468 | ₦0.234 | ₦0.468 |
|
|
165
|
-
| `confam-code` | Coding assistance, 1M context | ₦234 | ₦468 | ₦0.234 | ₦0.468 |
|
|
161
|
+
| Model | Description | Modality | Input ₦/1M | Output ₦/1M | Input ₦/1K | Output ₦/1K |
|
|
162
|
+
|---|---|---|---|---|---|---|
|
|
163
|
+
| `confam-intelligence` | General smart tasks, 1M context | Image-Text-to-Text | ₦596 | ₦3,571 | ₦0.596 | ₦3.571 |
|
|
164
|
+
| `confam-deep-reasoning` | Complex thinking, multi-step analysis | Image-Text-to-Text | ₦234 | ₦468 | ₦0.234 | ₦0.468 |
|
|
165
|
+
| `confam-code` | Coding assistance, 1M context | Image-Text-to-Text | ₦234 | ₦468 | ₦0.234 | ₦0.468 |
|
|
166
166
|
|
|
167
167
|
### Local Models — Nigerian Data Residency
|
|
168
168
|
|
|
169
|
-
| Model | Description | Input ₦/1M | Output ₦/1M | Input ₦/1K | Output ₦/1K |
|
|
170
|
-
|
|
171
|
-
| `confam-nano` | Local model — data stays in Nigeria | ₦500 | ₦1,500 | ₦0.500 | ₦1.500 |
|
|
169
|
+
| Model | Description | Modality | Input ₦/1M | Output ₦/1M | Input ₦/1K | Output ₦/1K |
|
|
170
|
+
|---|---|---|---|---|---|---|
|
|
171
|
+
| `confam-nano` | Local model — data stays in Nigeria | Image-Text-to-Text | ₦500 | ₦1,500 | ₦0.500 | ₦1.500 |
|
|
172
172
|
|
|
173
173
|
Runs entirely on Nigerian hardware. Data never transmitted abroad.
|
|
174
174
|
Ideal for banks, fintechs, hospitals, law firms, and government agencies.
|
|
@@ -317,7 +317,7 @@ For enterprise clients running ConfamNode on private infrastructure:
|
|
|
317
317
|
```python
|
|
318
318
|
client = ConfamNode(
|
|
319
319
|
api_key="confam-xxx",
|
|
320
|
-
base_url="http://your-private-server:
|
|
320
|
+
base_url="http://your-private-server:8000/v1"
|
|
321
321
|
)
|
|
322
322
|
```
|
|
323
323
|
|
|
@@ -380,4 +380,4 @@ Contact: [hello@confamnode.com](mailto:hello@confamnode.com)
|
|
|
380
380
|
|
|
381
381
|
Apache 2.0
|
|
382
382
|
|
|
383
|
-
---
|
|
383
|
+
---
|
|
@@ -4,6 +4,7 @@ import httpx
|
|
|
4
4
|
|
|
5
5
|
from typing import Union, List, Dict
|
|
6
6
|
|
|
7
|
+
from confamnode.utils import extract_error
|
|
7
8
|
from confamnode.builders import parse_chunk
|
|
8
9
|
from confamnode.ansa import Ansa, Usage, Cost
|
|
9
10
|
from confamnode.registry import VALID_MODELS
|
|
@@ -76,10 +77,11 @@ class ConfamNode:
|
|
|
76
77
|
|
|
77
78
|
if stream_response.status_code >= 400:
|
|
78
79
|
stream_response.read()
|
|
80
|
+
status = stream_response.status_code
|
|
81
|
+
error = extract_error(stream_response)
|
|
79
82
|
stream_response.close()
|
|
80
83
|
http_client.close()
|
|
81
|
-
|
|
82
|
-
raise Exception(f"ConfamNode error {stream_response.status_code}: {error}")
|
|
84
|
+
raise Exception(f"ConfamNode error {status}: {error}")
|
|
83
85
|
|
|
84
86
|
return ConfamStream(stream_response, http_client, model)
|
|
85
87
|
|
|
@@ -94,7 +96,7 @@ class ConfamNode:
|
|
|
94
96
|
)
|
|
95
97
|
|
|
96
98
|
if response.status_code >= 400:
|
|
97
|
-
error = response
|
|
99
|
+
error = extract_error(response)
|
|
98
100
|
raise Exception(f"ConfamNode error {response.status_code}: {error}")
|
|
99
101
|
|
|
100
102
|
data = response.json()
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Small internal helpers shared across the confamnode client.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def extract_error(response) -> str:
|
|
7
|
+
"""
|
|
8
|
+
Best-effort error detail from a non-2xx response, WITHOUT raising.
|
|
9
|
+
|
|
10
|
+
The server's normal error shape is {"detail": "..."}, but gateway-level
|
|
11
|
+
errors (e.g. a 429 throttle, a 502/504 from a proxy) often return an
|
|
12
|
+
empty or non-JSON body. Calling response.json() directly on those bodies
|
|
13
|
+
raises JSONDecodeError and swallows the status code -- the one thing the
|
|
14
|
+
caller actually needs. So we parse defensively and always fall back to
|
|
15
|
+
the raw text, then to a status-only message.
|
|
16
|
+
"""
|
|
17
|
+
try:
|
|
18
|
+
payload = response.json()
|
|
19
|
+
if isinstance(payload, dict):
|
|
20
|
+
detail = payload.get("detail") or payload.get("error") or payload.get("message")
|
|
21
|
+
if detail:
|
|
22
|
+
return str(detail)
|
|
23
|
+
except Exception:
|
|
24
|
+
pass
|
|
25
|
+
text = (getattr(response, "text", "") or "").strip()
|
|
26
|
+
return text or "no response body"
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Tests for ConfamNode.gist() error handling.
|
|
3
|
+
|
|
4
|
+
The original bug: a non-2xx response with an empty / non-JSON body made the
|
|
5
|
+
SDK call response.json() in its error branch, which raised JSONDecodeError
|
|
6
|
+
and hid the HTTP status. These tests pin down that:
|
|
7
|
+
- an empty error body raises a clean "ConfamNode error <status>: ..." with
|
|
8
|
+
the status code intact (NOT a JSONDecodeError), and
|
|
9
|
+
- the normal success path still works after the refactor.
|
|
10
|
+
|
|
11
|
+
No network: httpx.post is monkeypatched to return a fake response.
|
|
12
|
+
"""
|
|
13
|
+
import httpx
|
|
14
|
+
import pytest
|
|
15
|
+
|
|
16
|
+
from confamnode.client import ConfamNode
|
|
17
|
+
from confamnode.registry import VALID_MODELS
|
|
18
|
+
|
|
19
|
+
API_KEY = "confam-test"
|
|
20
|
+
MODEL = next(iter(VALID_MODELS)) # any valid model; we never really call out
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class FakeResponse:
|
|
24
|
+
def __init__(self, status_code, payload=None, *, json_raises=False, text=""):
|
|
25
|
+
self.status_code = status_code
|
|
26
|
+
self._payload = payload
|
|
27
|
+
self._json_raises = json_raises
|
|
28
|
+
self.text = text
|
|
29
|
+
|
|
30
|
+
def json(self):
|
|
31
|
+
if self._json_raises:
|
|
32
|
+
raise ValueError("Expecting value: line 1 column 1 (char 0)")
|
|
33
|
+
return self._payload
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _patch_post(monkeypatch, response):
|
|
37
|
+
monkeypatch.setattr(httpx, "post", lambda *a, **k: response)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def test_empty_error_body_raises_with_status_not_jsondecodeerror(monkeypatch):
|
|
41
|
+
# The reproduction of the reported crash: 429, empty body.
|
|
42
|
+
_patch_post(monkeypatch, FakeResponse(429, json_raises=True, text=""))
|
|
43
|
+
client = ConfamNode(api_key=API_KEY)
|
|
44
|
+
with pytest.raises(Exception) as exc:
|
|
45
|
+
client.gist(model=MODEL, messages="hi")
|
|
46
|
+
msg = str(exc.value)
|
|
47
|
+
assert "429" in msg
|
|
48
|
+
assert "no response body" in msg
|
|
49
|
+
assert "JSONDecode" not in type(exc.value).__name__
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def test_json_detail_error_surfaces_detail(monkeypatch):
|
|
53
|
+
_patch_post(monkeypatch, FakeResponse(400, payload={"detail": "invalid model"}))
|
|
54
|
+
client = ConfamNode(api_key=API_KEY)
|
|
55
|
+
with pytest.raises(Exception) as exc:
|
|
56
|
+
client.gist(model=MODEL, messages="hi")
|
|
57
|
+
assert "400" in str(exc.value)
|
|
58
|
+
assert "invalid model" in str(exc.value)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def test_html_gateway_error_surfaces_text(monkeypatch):
|
|
62
|
+
_patch_post(monkeypatch, FakeResponse(502, json_raises=True,
|
|
63
|
+
text="<html>502 Bad Gateway</html>"))
|
|
64
|
+
client = ConfamNode(api_key=API_KEY)
|
|
65
|
+
with pytest.raises(Exception) as exc:
|
|
66
|
+
client.gist(model=MODEL, messages="hi")
|
|
67
|
+
assert "502" in str(exc.value)
|
|
68
|
+
assert "Bad Gateway" in str(exc.value)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def test_success_path_still_returns_ansa(monkeypatch):
|
|
72
|
+
payload = {
|
|
73
|
+
"id": "abc",
|
|
74
|
+
"choices": [{"message": {"content": "hello"}, "finish_reason": "stop"}],
|
|
75
|
+
"usage": {"prompt_tokens": 1, "completion_tokens": 2, "total_tokens": 3},
|
|
76
|
+
"confam": {"request_id": "r1", "cost": {"naira": 0.0}},
|
|
77
|
+
}
|
|
78
|
+
_patch_post(monkeypatch, FakeResponse(200, payload=payload))
|
|
79
|
+
client = ConfamNode(api_key=API_KEY)
|
|
80
|
+
ansa = client.gist(model=MODEL, messages="hi")
|
|
81
|
+
assert ansa.text == "hello"
|
|
82
|
+
assert ansa.cost.naira == 0.0
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Unit tests for confamnode.utils.extract_error.
|
|
3
|
+
|
|
4
|
+
Pure function, no network: just feed it fake responses and assert it never
|
|
5
|
+
raises and always produces a usable message.
|
|
6
|
+
"""
|
|
7
|
+
from confamnode.utils import extract_error
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class _Resp:
|
|
11
|
+
"""Minimal stand-in for an httpx.Response."""
|
|
12
|
+
def __init__(self, payload=None, *, json_raises=False, text=""):
|
|
13
|
+
self._payload = payload
|
|
14
|
+
self._json_raises = json_raises
|
|
15
|
+
self.text = text
|
|
16
|
+
|
|
17
|
+
def json(self):
|
|
18
|
+
if self._json_raises:
|
|
19
|
+
raise ValueError("Expecting value: line 1 column 1 (char 0)")
|
|
20
|
+
return self._payload
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def test_empty_body_returns_placeholder():
|
|
24
|
+
# The exact case that crashed the SDK: empty 429 body.
|
|
25
|
+
assert extract_error(_Resp(json_raises=True, text="")) == "no response body"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def test_non_json_text_body_is_returned_stripped():
|
|
29
|
+
assert extract_error(_Resp(json_raises=True, text=" upstream timeout ")) == "upstream timeout"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def test_detail_key_is_preferred():
|
|
33
|
+
assert extract_error(_Resp(payload={"detail": "invalid model"})) == "invalid model"
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def test_error_key_fallback():
|
|
37
|
+
assert extract_error(_Resp(payload={"error": "nope"})) == "nope"
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def test_message_key_fallback():
|
|
41
|
+
assert extract_error(_Resp(payload={"message": "hmm"})) == "hmm"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_non_dict_json_falls_back_to_text():
|
|
45
|
+
# A JSON array (not a dict) shouldn't blow up; fall back to text.
|
|
46
|
+
assert extract_error(_Resp(payload=["a", "b"], text="listy")) == "listy"
|
confamnode-0.2.2/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|