cl-forge 0.1.0__cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
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.
- cl_forge/__init__.py +20 -0
- cl_forge/cmf.py +17 -0
- cl_forge/cmf.pyi +75 -0
- cl_forge/core/__init__.py +0 -0
- cl_forge/core/_rs_cl_forge.cpython-314-x86_64-linux-gnu.so +0 -0
- cl_forge/verify.py +25 -0
- cl_forge/verify.pyi +140 -0
- cl_forge-0.1.0.dist-info/METADATA +109 -0
- cl_forge-0.1.0.dist-info/RECORD +11 -0
- cl_forge-0.1.0.dist-info/WHEEL +5 -0
- cl_forge-0.1.0.dist-info/licenses/LICENSE +201 -0
cl_forge/__init__.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Simple yet powerful Chilean and other tools written in Rust and Python."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from . import cmf, verify
|
|
7
|
+
|
|
8
|
+
__all__ = (
|
|
9
|
+
"cmf",
|
|
10
|
+
"verify",
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import importlib
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def __getattr__(name: str):
|
|
18
|
+
if name in __all__:
|
|
19
|
+
return importlib.import_module(f".{name}", __name__)
|
|
20
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
cl_forge/cmf.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
|
|
3
|
+
if TYPE_CHECKING:
|
|
4
|
+
from .core._rs_cl_forge import _rs_cmf as _cmf # noqa
|
|
5
|
+
|
|
6
|
+
CmfClient = _cmf.CmfClient
|
|
7
|
+
|
|
8
|
+
__all__ = (
|
|
9
|
+
"CmfClient",
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def __getattr__(name: str):
|
|
14
|
+
if name in __all__:
|
|
15
|
+
from .core._rs_cl_forge import _rs_cmf as _cmf # noqa
|
|
16
|
+
return getattr(_cmf, name)
|
|
17
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
cl_forge/cmf.pyi
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Literal
|
|
4
|
+
|
|
5
|
+
class CmfClient:
|
|
6
|
+
"""
|
|
7
|
+
Client for interacting with the Chilean CMF API.
|
|
8
|
+
|
|
9
|
+
The API is free to use, but has a limit of 10.000 monthly requests per
|
|
10
|
+
user and requires an API key for authentication, which can be requested in
|
|
11
|
+
`Contact`_ and is usually sent to the given email during the day.
|
|
12
|
+
|
|
13
|
+
.. _Contact: https://api.cmfchile.cl/api_cmf/contactanos.jsp
|
|
14
|
+
|
|
15
|
+
Attributes
|
|
16
|
+
----------
|
|
17
|
+
api_key: str
|
|
18
|
+
Truncated API Key to at most 5 characters.
|
|
19
|
+
base_url: str
|
|
20
|
+
The base URL for the CMF API.
|
|
21
|
+
|
|
22
|
+
Notes
|
|
23
|
+
-----
|
|
24
|
+
- CMF stands for `Comisión para el Mercado Financiero`.
|
|
25
|
+
"""
|
|
26
|
+
def __init__(self, api_key: str) -> None:
|
|
27
|
+
"""
|
|
28
|
+
Initializes the CMF client with the provided API key.
|
|
29
|
+
|
|
30
|
+
Parameters
|
|
31
|
+
----------
|
|
32
|
+
api_key: str
|
|
33
|
+
The API key for authenticating with the CMF API.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def get(
|
|
37
|
+
self,
|
|
38
|
+
path: str,
|
|
39
|
+
format: Literal['json', 'xml'] = 'json', # noqa: A002
|
|
40
|
+
params: dict | None = None
|
|
41
|
+
) -> dict | str:
|
|
42
|
+
"""
|
|
43
|
+
Sends a GET request to the specified CMF API endpoint. See the `API Docs`_
|
|
44
|
+
for all the available endpoints.
|
|
45
|
+
|
|
46
|
+
.. _API Docs: https://api.cmfchile.cl/documentacion/index.html
|
|
47
|
+
|
|
48
|
+
Parameters
|
|
49
|
+
----------
|
|
50
|
+
path : str
|
|
51
|
+
The API endpoint path. Must start with '/'.
|
|
52
|
+
format : Literal['json', 'xml']
|
|
53
|
+
The format of the response. Must be lower case 'json' or 'xml'.
|
|
54
|
+
Defaults to 'json'.
|
|
55
|
+
params : dict | None
|
|
56
|
+
Optional query parameters for the request.
|
|
57
|
+
|
|
58
|
+
Raises
|
|
59
|
+
------
|
|
60
|
+
EmptyPath
|
|
61
|
+
If the path is empty.
|
|
62
|
+
InvalidPath
|
|
63
|
+
If the path doesn't start with '/'.
|
|
64
|
+
BadStatus
|
|
65
|
+
If the request doesn't succeed (status code != 200).
|
|
66
|
+
ValueError
|
|
67
|
+
If the format is not 'json' or 'xml', or if fail to parse JSON the
|
|
68
|
+
response.
|
|
69
|
+
|
|
70
|
+
Returns
|
|
71
|
+
-------
|
|
72
|
+
dict | str
|
|
73
|
+
The response from the CMF API. Returns a dict if format is 'json',
|
|
74
|
+
and a str if format is 'xml'.
|
|
75
|
+
"""
|
|
File without changes
|
|
Binary file
|
cl_forge/verify.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
|
|
3
|
+
if TYPE_CHECKING:
|
|
4
|
+
from .core._rs_cl_forge import _rs_verify as _verify # noqa
|
|
5
|
+
|
|
6
|
+
Ppu = _verify.Ppu
|
|
7
|
+
calculate_verifier = _verify.calculate_verifier
|
|
8
|
+
normalize_ppu = _verify.normalize_ppu
|
|
9
|
+
ppu_to_numeric = _verify.ppu_to_numeric
|
|
10
|
+
validate_rut = _verify.validate_rut
|
|
11
|
+
|
|
12
|
+
__all__ = (
|
|
13
|
+
"Ppu",
|
|
14
|
+
"calculate_verifier",
|
|
15
|
+
"normalize_ppu",
|
|
16
|
+
"ppu_to_numeric",
|
|
17
|
+
"validate_rut",
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def __getattr__(name: str):
|
|
22
|
+
if name in __all__:
|
|
23
|
+
from .core._rs_cl_forge import _rs_verify as _verify # noqa
|
|
24
|
+
return getattr(_verify, name)
|
|
25
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
cl_forge/verify.pyi
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
class Ppu:
|
|
4
|
+
"""
|
|
5
|
+
Represents a Chilean PPU (vehicle license plate).
|
|
6
|
+
|
|
7
|
+
Attributes
|
|
8
|
+
----------
|
|
9
|
+
raw : str
|
|
10
|
+
The input PPU.
|
|
11
|
+
numeric : str
|
|
12
|
+
The numeric representation of the PPU.
|
|
13
|
+
normalized: str
|
|
14
|
+
The normalized PPU.
|
|
15
|
+
verifier: str
|
|
16
|
+
The calculated verifier digit of the PPU.
|
|
17
|
+
format: str
|
|
18
|
+
The detected format of the PPU. Supported formats:
|
|
19
|
+
|
|
20
|
+
- `LLLNN` -> 3 letters followed by 2 digits
|
|
21
|
+
- `LLLNNN` -> 4 letters followed by 3 digits
|
|
22
|
+
- `LLLLNN` -> 4 letters followed by 2 digits
|
|
23
|
+
- `LLNNNN` -> 2 letters followed by 4 digits
|
|
24
|
+
complete: str
|
|
25
|
+
The normalized PPU with the verifier digit, separated by '-'.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
def __init__(self, ppu: str, /) -> None:
|
|
29
|
+
"""
|
|
30
|
+
Initializes a Ppu instance by normalizing the input PPU and
|
|
31
|
+
calculating its numeric representation.
|
|
32
|
+
|
|
33
|
+
Parameters
|
|
34
|
+
----------
|
|
35
|
+
ppu : str
|
|
36
|
+
Chilean PPU (vehicle license plate).
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def raw(self) -> str:
|
|
41
|
+
"""The input PPU."""
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def numeric(self) -> str:
|
|
45
|
+
"""The numeric representation of the PPU."""
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def normalized(self) -> str:
|
|
49
|
+
"""The normalized PPU."""
|
|
50
|
+
|
|
51
|
+
@property
|
|
52
|
+
def verifier(self) -> str:
|
|
53
|
+
"""The calculated verifier digit of the PPU."""
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def format(self) -> str:
|
|
57
|
+
"""The detected format of the PPU."""
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def complete(self) -> str:
|
|
61
|
+
"""The normalized PPU with the verifier digit, separated by '-'."""
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def calculate_verifier(digits: str, /) -> str:
|
|
65
|
+
"""
|
|
66
|
+
Calculates the verifier digit (DV) of a Chilean RUT/RUN using Module 11
|
|
67
|
+
algorithm.
|
|
68
|
+
|
|
69
|
+
Parameters
|
|
70
|
+
----------
|
|
71
|
+
digits : str
|
|
72
|
+
Numeric part of the RUT/RUN (digits only).
|
|
73
|
+
|
|
74
|
+
Returns
|
|
75
|
+
-------
|
|
76
|
+
str
|
|
77
|
+
Verifier digit: '0'..'9' or 'K'.
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def ppu_to_numeric(ppu: str, /) -> str:
|
|
82
|
+
"""
|
|
83
|
+
Converts a Chilean PPU (vehicle license plate) into its numeric
|
|
84
|
+
representation.
|
|
85
|
+
|
|
86
|
+
Parameters
|
|
87
|
+
----------
|
|
88
|
+
ppu : str
|
|
89
|
+
Chilean PPU (vehicle license plate). Supported formats:
|
|
90
|
+
|
|
91
|
+
- `LLLNN` -> 3 letters followed by 2 digits
|
|
92
|
+
- `LLLNNN` -> 4 letters followed by 3 digits
|
|
93
|
+
- `LLLLNN` -> 4 letters followed by 2 digits
|
|
94
|
+
- `LLNNNN` -> 2 letters followed by 4 digits
|
|
95
|
+
|
|
96
|
+
Returns
|
|
97
|
+
-------
|
|
98
|
+
str
|
|
99
|
+
Numeric representation of the PPU.
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def normalize_ppu(ppu: str, /) -> str:
|
|
104
|
+
"""
|
|
105
|
+
Normalizes a given PPU string to a standard format.
|
|
106
|
+
|
|
107
|
+
If the format is recognized as `LLLNN` (3 letters followed by 2 digits),
|
|
108
|
+
the function prepends a '0' after the first 3 characters, resulting in a
|
|
109
|
+
normalized format of `LLL0NN`. Otherwise, the `ppu` is returned as-is, but
|
|
110
|
+
trimmed in uppercase.
|
|
111
|
+
|
|
112
|
+
Parameters
|
|
113
|
+
----------
|
|
114
|
+
ppu : Chilean PPU (vehicle license plate).
|
|
115
|
+
|
|
116
|
+
Returns
|
|
117
|
+
-------
|
|
118
|
+
str
|
|
119
|
+
Normalized PPU.
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def validate_rut(digits: str, verifier: str, /) -> bool:
|
|
124
|
+
"""
|
|
125
|
+
Validates a Chilean RUT/RUN by checking if the provided verifier digit
|
|
126
|
+
matches the calculated one using Module 11 algorithm.
|
|
127
|
+
|
|
128
|
+
Parameters
|
|
129
|
+
----------
|
|
130
|
+
digits : str
|
|
131
|
+
Numeric part of the RUT/RUN (digits only).
|
|
132
|
+
verifier : str
|
|
133
|
+
Verifier digit to validate against: "0".."9" or "K".
|
|
134
|
+
|
|
135
|
+
Returns
|
|
136
|
+
-------
|
|
137
|
+
bool
|
|
138
|
+
`True` if the verifier is valid for the given correlative,
|
|
139
|
+
`False` otherwise.
|
|
140
|
+
"""
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cl-forge
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
License-File: LICENSE
|
|
5
|
+
Summary: Simple yet powerful Chilean and other tools written in Rust and Python.
|
|
6
|
+
Requires-Python: >=3.13
|
|
7
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
8
|
+
Project-URL: Homepage, https://github.com/mschiaff/cl-forge
|
|
9
|
+
Project-URL: Issues, https://github.com/mschiaff/cl-forge/issues
|
|
10
|
+
Project-URL: Repository, https://github.com/mschiaff/cl-forge.git
|
|
11
|
+
|
|
12
|
+
[](https://github.com/mschiaff/cl-forge/actions/workflows/python-package.yml)
|
|
13
|
+
|
|
14
|
+
# cl-forge 🇨🇱
|
|
15
|
+
|
|
16
|
+
Simple yet powerful Chilean and other tools written in Rust and Python.
|
|
17
|
+
|
|
18
|
+
`cl-forge` provides a collection of high-performance utilities for common Chilean data formats and API integrations. The core logic is implemented in Rust for maximum speed, with a clean and easy-to-use Python interface.
|
|
19
|
+
|
|
20
|
+
## Features
|
|
21
|
+
|
|
22
|
+
- **Verify**: Efficiently validate and manipulate Chilean RUT/RUN and PPU (License Plates).
|
|
23
|
+
- **CMF API**: A simple client to interact with the Chilean Financial Market Commission (CMF) API.
|
|
24
|
+
- **High Performance**: Core logic written in Rust.
|
|
25
|
+
- **Lazy Loading**: Submodules are loaded only when needed to keep the initial import fast.
|
|
26
|
+
- **Type Safety**: Full type hints and `.pyi` stubs for excellent IDE support.
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install cl-forge
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Or using `uv`:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
uv add cl-forge
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
### Verification (RUT & PPU)
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
from cl_forge import verify
|
|
46
|
+
|
|
47
|
+
# Validate a RUT
|
|
48
|
+
is_valid = verify.validate_rut("12345678", "5")
|
|
49
|
+
print(f"RUT is valid: {is_valid}")
|
|
50
|
+
|
|
51
|
+
# Calculate RUT verifier
|
|
52
|
+
dv = verify.calculate_verifier("12345678")
|
|
53
|
+
print(f"Verifier digit: {dv}")
|
|
54
|
+
|
|
55
|
+
# Work with PPUs (License Plates)
|
|
56
|
+
ppu = verify.Ppu("PHZF55")
|
|
57
|
+
print(f"Normalized: {ppu.normalized}") # PHZF55
|
|
58
|
+
print(f"Verifier: {ppu.verifier}") # K
|
|
59
|
+
print(f"Complete: {ppu.complete}") # PHZF55-K
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### CMF API Client
|
|
63
|
+
|
|
64
|
+
To use the CMF API, you need an API key. You can request one at [CMF Chile](https://api.cmfchile.cl/api_cmf/contactanos.jsp).
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
from cl_forge.cmf import CmfClient
|
|
68
|
+
|
|
69
|
+
client = CmfClient(api_key="your_api_key_here")
|
|
70
|
+
|
|
71
|
+
# Get IPC data
|
|
72
|
+
ipc_data = client.get(path="/ipc")
|
|
73
|
+
print(ipc_data) # {'IPCs': [{'Valor': '-0,2', 'Fecha': '2025-12-01'}]}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
See the [CMF API documentation](https://api.cmfchile.cl/documentacion/index.html) for details about the available endpoints.
|
|
77
|
+
|
|
78
|
+
## Development
|
|
79
|
+
|
|
80
|
+
This project uses [maturin](https://github.com/PyO3/maturin) to build the Rust extension.
|
|
81
|
+
|
|
82
|
+
### Setup
|
|
83
|
+
|
|
84
|
+
1. Clone the repository:
|
|
85
|
+
```bash
|
|
86
|
+
git clone https://github.com/mschiaff/cl-forge.git
|
|
87
|
+
cd cl-forge
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
2. Install development dependencies (using [uv](https://github.com/astral-sh/uv)):
|
|
91
|
+
```bash
|
|
92
|
+
uv sync --all-groups
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
3. Build the Rust extension in develop mode:
|
|
96
|
+
```bash
|
|
97
|
+
uv run maturin develop
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Running Tests
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
uv run pytest
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.
|
|
109
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
cl_forge/__init__.py,sha256=wCRxfZKTzi_3w2SNISfgu82AFk2MqaetzonVoj3Myfg,409
|
|
2
|
+
cl_forge/cmf.py,sha256=sFXogntp1MwSlgG-taVEsoBP4GYRsGgWgI3oKUX3IxQ,400
|
|
3
|
+
cl_forge/cmf.pyi,sha256=uCIk5jvS1BQibYFwQRIEzQ1Pqdhr5yJlPTzouO1cOB0,2205
|
|
4
|
+
cl_forge/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
cl_forge/core/_rs_cl_forge.cpython-314-x86_64-linux-gnu.so,sha256=Sb31iUllQC_U_Un_WphNn13BbW_SUta5HGZWgHTQ1XM,8546288
|
|
6
|
+
cl_forge/verify.py,sha256=TsXqkJB05E6-GlbVAEQe0OPWUUwqzviJnF2ush14TiI,668
|
|
7
|
+
cl_forge/verify.pyi,sha256=zlEIo7IFOxX4wuzFzI242dr8fYl3cVpXhpwnFUM77-I,3493
|
|
8
|
+
cl_forge-0.1.0.dist-info/METADATA,sha256=_qYkAIjITlZtxxUqYqkzL7NwUb32qDIY4nVak_-bKDE,3063
|
|
9
|
+
cl_forge-0.1.0.dist-info/WHEEL,sha256=1GO8NDKTfrlRkgVXFQ5KJDUbdgIfejZHnbKJV8XeeSw,147
|
|
10
|
+
cl_forge-0.1.0.dist-info/licenses/LICENSE,sha256=0CR2XP3u-v3ExT3JHO7rSNWjD1_okpXA9vVHceeIKqk,11357
|
|
11
|
+
cl_forge-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,201 @@
|
|
|
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 (c) 2026 Matías Schiaffino Tyrer
|
|
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.
|