pierre-storage 0.12.1__py3-none-any.whl → 1.0.0__py3-none-any.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.
pierre_storage/repo.py CHANGED
@@ -1,5 +1,6 @@
1
1
  """Repository implementation for Pierre Git Storage SDK."""
2
2
 
3
+ import warnings
3
4
  from datetime import datetime
4
5
  from types import TracebackType
5
6
  from typing import Any, Callable, Dict, List, Optional
@@ -235,6 +236,62 @@ class RepoImpl:
235
236
 
236
237
  return StreamingResponse(response, client)
237
238
 
239
+ async def get_archive_stream(
240
+ self,
241
+ *,
242
+ ref: Optional[str] = None,
243
+ include_globs: Optional[List[str]] = None,
244
+ exclude_globs: Optional[List[str]] = None,
245
+ archive_prefix: Optional[str] = None,
246
+ ttl: Optional[int] = None,
247
+ ) -> StreamingResponse:
248
+ """Get repository archive as streaming response.
249
+
250
+ Args:
251
+ ref: Git ref (branch, tag, or commit SHA)
252
+ include_globs: Optional include globs for archived files
253
+ exclude_globs: Optional exclude globs for archived files
254
+ archive_prefix: Optional archive prefix for tar entries
255
+ ttl: Token TTL in seconds
256
+
257
+ Returns:
258
+ HTTP response with archive stream
259
+ """
260
+ ttl = ttl or DEFAULT_TOKEN_TTL_SECONDS
261
+ jwt = self.generate_jwt(self._id, {"permissions": ["git:read"], "ttl": ttl})
262
+
263
+ body: Dict[str, Any] = {}
264
+ if ref and ref.strip():
265
+ body["ref"] = ref.strip()
266
+ if include_globs:
267
+ body["include_globs"] = include_globs
268
+ if exclude_globs:
269
+ body["exclude_globs"] = exclude_globs
270
+ if archive_prefix and archive_prefix.strip():
271
+ body["archive"] = {"prefix": archive_prefix.strip()}
272
+
273
+ url = f"{self.api_base_url}/api/v{self.api_version}/repos/archive"
274
+
275
+ client = httpx.AsyncClient()
276
+ try:
277
+ request_kwargs: Dict[str, Any] = {
278
+ "headers": {
279
+ "Authorization": f"Bearer {jwt}",
280
+ "Code-Storage-Agent": get_user_agent(),
281
+ },
282
+ "timeout": 30.0,
283
+ }
284
+ if body:
285
+ request_kwargs["json"] = body
286
+ stream_context = client.stream("POST", url, **request_kwargs)
287
+ response = await stream_context.__aenter__()
288
+ response.raise_for_status()
289
+ except Exception:
290
+ await client.aclose()
291
+ raise
292
+
293
+ return StreamingResponse(response, client)
294
+
238
295
  async def list_files(
239
296
  self,
240
297
  *,
@@ -785,6 +842,7 @@ class RepoImpl:
785
842
  *,
786
843
  pattern: str,
787
844
  ref: Optional[str] = None,
845
+ rev: Optional[str] = None,
788
846
  paths: Optional[list[str]] = None,
789
847
  case_sensitive: Optional[bool] = None,
790
848
  file_filters: Optional[Dict[str, Any]] = None,
@@ -798,6 +856,7 @@ class RepoImpl:
798
856
  Args:
799
857
  pattern: Regex pattern to search for
800
858
  ref: Git ref to search (defaults to server-side default branch)
859
+ rev: Deprecated alias for ref
801
860
  paths: Git pathspecs to restrict search
802
861
  case_sensitive: Whether search is case-sensitive (default: server default)
803
862
  file_filters: Optional filters with include_globs/exclude_globs/extension_filters
@@ -812,6 +871,12 @@ class RepoImpl:
812
871
  pattern_clean = pattern.strip()
813
872
  if not pattern_clean:
814
873
  raise ValueError("grep pattern is required")
874
+ if rev and rev.strip():
875
+ warnings.warn(
876
+ "repo.grep rev is deprecated; use ref instead",
877
+ DeprecationWarning,
878
+ stacklevel=2,
879
+ )
815
880
 
816
881
  ttl_value = ttl or DEFAULT_TOKEN_TTL_SECONDS
817
882
  jwt = self.generate_jwt(self._id, {"permissions": ["git:read"], "ttl": ttl_value})
@@ -825,7 +890,9 @@ class RepoImpl:
825
890
  if case_sensitive is not None:
826
891
  body["query"]["case_sensitive"] = bool(case_sensitive)
827
892
  if ref:
828
- body["rev"] = ref
893
+ body["ref"] = ref
894
+ elif rev:
895
+ body["ref"] = rev
829
896
  if paths:
830
897
  body["paths"] = paths
831
898
  if file_filters:
pierre_storage/types.py CHANGED
@@ -429,6 +429,18 @@ class Repo(Protocol):
429
429
  """Get a file as a stream."""
430
430
  ...
431
431
 
432
+ async def get_archive_stream(
433
+ self,
434
+ *,
435
+ ref: Optional[str] = None,
436
+ include_globs: Optional[list[str]] = None,
437
+ exclude_globs: Optional[list[str]] = None,
438
+ archive_prefix: Optional[str] = None,
439
+ ttl: Optional[int] = None,
440
+ ) -> Any: # httpx.Response
441
+ """Get a repository archive as a stream."""
442
+ ...
443
+
432
444
  async def list_files(
433
445
  self,
434
446
  *,
@@ -555,6 +567,7 @@ class Repo(Protocol):
555
567
  *,
556
568
  pattern: str,
557
569
  ref: Optional[str] = None,
570
+ rev: Optional[str] = None,
558
571
  paths: Optional[list[str]] = None,
559
572
  case_sensitive: Optional[bool] = None,
560
573
  file_filters: Optional[Dict[str, Any]] = None,
@@ -563,7 +576,13 @@ class Repo(Protocol):
563
576
  pagination: Optional[Dict[str, Any]] = None,
564
577
  ttl: Optional[int] = None,
565
578
  ) -> "GrepResult":
566
- """Run grep against the repository."""
579
+ """Run grep against the repository.
580
+
581
+ Args:
582
+ pattern: Regex pattern to search for.
583
+ ref: Git ref to search (defaults to server-side default branch).
584
+ rev: Deprecated alias for ref.
585
+ """
567
586
  ...
568
587
 
569
588
  async def pull_upstream(
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pierre-storage
3
- Version: 0.12.1
3
+ Version: 1.0.0
4
4
  Summary: Pierre Git Storage SDK for Python
5
5
  Author-email: Pierre <support@pierre.io>
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://pierre.io
8
8
  Project-URL: Documentation, https://docs.pierre.io
9
- Project-URL: Repository, https://github.com/pierre/monorepo
10
- Project-URL: Issues, https://github.com/pierre/monorepo/issues
9
+ Project-URL: Repository, https://github.com/pierrecomputer/pierre
10
+ Project-URL: Issues, https://github.com/pierrecomputer/pierre/issues
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Intended Audience :: Developers
13
13
  Classifier: Programming Language :: Python :: 3
@@ -171,6 +171,16 @@ response = await repo.get_file_stream(
171
171
  text = await response.aread()
172
172
  print(text.decode())
173
173
 
174
+ # Download repository archive (streaming tar.gz)
175
+ archive_response = await repo.get_archive_stream(
176
+ ref="main",
177
+ include_globs=["README.md"],
178
+ exclude_globs=["vendor/**"],
179
+ archive_prefix="repo/",
180
+ )
181
+ archive_bytes = await archive_response.aread()
182
+ print(len(archive_bytes))
183
+
174
184
  # List all files in the repository
175
185
  files = await repo.list_files(
176
186
  ref="main", # optional, defaults to default branch
@@ -244,7 +254,8 @@ print(commit_diff["files"])
244
254
 
245
255
  ### Creating Commits
246
256
 
247
- The SDK provides a fluent builder API for creating commits with streaming support:
257
+ The SDK provides a fluent builder API for creating commits with streaming
258
+ support:
248
259
 
249
260
  ```python
250
261
  # Create a commit
@@ -268,7 +279,8 @@ print(result["ref_update"]["old_sha"]) # All zeroes when ref is created
268
279
  The builder exposes:
269
280
 
270
281
  - `add_file(path, source, *, mode=None)` - Attach bytes from various sources
271
- - `add_file_from_string(path, contents, encoding="utf-8", *, mode=None)` - Add text files (defaults to UTF-8)
282
+ - `add_file_from_string(path, contents, encoding="utf-8", *, mode=None)` - Add
283
+ text files (defaults to UTF-8)
272
284
  - `delete_path(path)` - Remove files or folders
273
285
  - `send()` - Finalize the commit and receive metadata
274
286
 
@@ -289,22 +301,29 @@ The builder exposes:
289
301
  }
290
302
  ```
291
303
 
292
- If the backend reports a failure, the builder raises a `RefUpdateError` containing the status, reason, and ref details.
304
+ If the backend reports a failure, the builder raises a `RefUpdateError`
305
+ containing the status, reason, and ref details.
293
306
 
294
307
  **Options:**
295
308
 
296
309
  - `target_branch` (required): Branch name (without `refs/heads/` prefix)
297
- - `expected_head_sha` (optional): Branch or commit that must match the remote tip
298
- - `base_branch` (optional): Name of the branch to use as the base when creating a new branch (without `refs/heads/` prefix)
299
- - `ephemeral` (optional): Mark the target branch as ephemeral (stored in separate namespace)
300
- - `ephemeral_base` (optional): Indicates the base branch is ephemeral (requires `base_branch`)
310
+ - `expected_head_sha` (optional): Branch or commit that must match the remote
311
+ tip
312
+ - `base_branch` (optional): Name of the branch to use as the base when creating
313
+ a new branch (without `refs/heads/` prefix)
314
+ - `ephemeral` (optional): Mark the target branch as ephemeral (stored in
315
+ separate namespace)
316
+ - `ephemeral_base` (optional): Indicates the base branch is ephemeral (requires
317
+ `base_branch`)
301
318
  - `commit_message` (required): The commit message
302
319
  - `author` (required): Dictionary with `name` and `email`
303
- - `committer` (optional): Dictionary with `name` and `email` (defaults to author)
320
+ - `committer` (optional): Dictionary with `name` and `email` (defaults to
321
+ author)
304
322
 
305
323
  ### Creating Commits from Diff Streams
306
324
 
307
- When you already have a unified diff, you can let the SDK apply it directly without building individual file operations:
325
+ When you already have a unified diff, you can let the SDK apply it directly
326
+ without building individual file operations:
308
327
 
309
328
  ```python
310
329
  diff_text = """\
@@ -327,13 +346,21 @@ result = await repo.create_commit_from_diff(
327
346
  print(result["commit_sha"])
328
347
  ```
329
348
 
330
- `diff` accepts the same source types as the commit builder (string, bytes, async iterator, etc.). The helper automatically streams the diff to the `/diff-commit` endpoint and returns a `CommitResult`. On conflicts or validation errors, it raises `RefUpdateError` with the server-provided status and message.
349
+ `diff` accepts the same source types as the commit builder (string, bytes, async
350
+ iterator, etc.). The helper automatically streams the diff to the `/diff-commit`
351
+ endpoint and returns a `CommitResult`. On conflicts or validation errors, it
352
+ raises `RefUpdateError` with the server-provided status and message.
331
353
 
332
- You can provide the same metadata options as `create_commit`, including `expected_head_sha`, `base_branch`, `ephemeral`, `ephemeral_base`, and `committer`.
354
+ You can provide the same metadata options as `create_commit`, including
355
+ `expected_head_sha`, `base_branch`, `ephemeral`, `ephemeral_base`, and
356
+ `committer`.
333
357
 
334
- > Files are chunked into 4 MiB segments, allowing streaming of large assets without buffering in memory.
358
+ > Files are chunked into 4 MiB segments, allowing streaming of large assets
359
+ > without buffering in memory.
335
360
 
336
- > The `target_branch` must already exist on the remote repository. To seed an empty repository, omit `expected_head_sha`; the service will create the first commit only when no refs are present.
361
+ > The `target_branch` must already exist on the remote repository. To seed an
362
+ > empty repository, omit `expected_head_sha`; the service will create the first
363
+ > commit only when no refs are present.
337
364
 
338
365
  **Branching Example:**
339
366
 
@@ -353,7 +380,9 @@ result = await (
353
380
 
354
381
  ### Ephemeral Branches
355
382
 
356
- Ephemeral branches are temporary branches that are stored in a separate namespace. They're useful for preview environments, temporary workspaces, or short-lived feature branches that don't need to be permanent.
383
+ Ephemeral branches are temporary branches that are stored in a separate
384
+ namespace. They're useful for preview environments, temporary workspaces, or
385
+ short-lived feature branches that don't need to be permanent.
357
386
 
358
387
  **Creating an ephemeral branch:**
359
388
 
@@ -424,9 +453,12 @@ print(result["target_branch"]) # "feature/awesome-change"
424
453
 
425
454
  - Ephemeral branches are stored separately from regular branches
426
455
  - Use `ephemeral=True` when creating commits, reading files, or listing files
427
- - Use `ephemeral_base=True` when branching off another ephemeral branch (requires `base_branch`)
428
- - Promote an ephemeral branch with `repo.promote_ephemeral_branch()`; omit `target_branch` to keep the same name
429
- - Ephemeral branches are ideal for temporary previews, CI/CD environments, or experiments
456
+ - Use `ephemeral_base=True` when branching off another ephemeral branch
457
+ (requires `base_branch`)
458
+ - Promote an ephemeral branch with `repo.promote_ephemeral_branch()`; omit
459
+ `target_branch` to keep the same name
460
+ - Ephemeral branches are ideal for temporary previews, CI/CD environments, or
461
+ experiments
430
462
 
431
463
  ### Streaming Large Files
432
464
 
@@ -476,9 +508,11 @@ commits = await repo.list_commits()
476
508
 
477
509
  **How it works:**
478
510
 
479
- 1. When you create a repo with `base_repo`, Pierre links it to the specified GitHub repository
511
+ 1. When you create a repo with `base_repo`, Pierre links it to the specified
512
+ GitHub repository
480
513
  2. The `pull_upstream()` method fetches the latest changes from GitHub
481
- 3. You can then use all Pierre SDK features (diffs, commits, file access) on the synced content
514
+ 3. You can then use all Pierre SDK features (diffs, commits, file access) on the
515
+ synced content
482
516
  4. The provider is automatically set to `"github"` when using `base_repo`
483
517
 
484
518
  ### Forking Repositories
@@ -564,6 +598,16 @@ class Repo:
564
598
  ttl: Optional[int] = None,
565
599
  ) -> Response: ...
566
600
 
601
+ async def get_archive_stream(
602
+ self,
603
+ *,
604
+ ref: Optional[str] = None,
605
+ include_globs: Optional[List[str]] = None,
606
+ exclude_globs: Optional[List[str]] = None,
607
+ archive_prefix: Optional[str] = None,
608
+ ttl: Optional[int] = None,
609
+ ) -> Response: ...
610
+
567
611
  async def list_files(
568
612
  self,
569
613
  *,
@@ -724,17 +768,20 @@ else:
724
768
 
725
769
  ## Authentication
726
770
 
727
- The SDK uses JWT (JSON Web Tokens) for authentication. When you call `get_remote_url()`, it:
771
+ The SDK uses JWT (JSON Web Tokens) for authentication. When you call
772
+ `get_remote_url()`, it:
728
773
 
729
774
  1. Creates a JWT with your name, repository ID, and requested permissions
730
775
  2. Signs it with your private key (ES256, RS256, or EdDSA)
731
776
  3. Embeds it in the Git remote URL as the password
732
777
 
733
- The generated URLs are compatible with standard Git clients and include all necessary authentication.
778
+ The generated URLs are compatible with standard Git clients and include all
779
+ necessary authentication.
734
780
 
735
781
  ### Manual JWT Generation
736
782
 
737
- For advanced use cases, you can generate JWTs manually using the `generate_jwt` helper:
783
+ For advanced use cases, you can generate JWTs manually using the `generate_jwt`
784
+ helper:
738
785
 
739
786
  ```python
740
787
  from pierre_storage import generate_jwt
@@ -761,11 +808,13 @@ git_url = f"https://t:{token}@your-name.code.storage/your-repo-id.git"
761
808
  - `key_pem` (required): Private key in PEM format (PKCS8)
762
809
  - `issuer` (required): Token issuer (your customer name)
763
810
  - `repo_id` (required): Repository identifier
764
- - `scopes` (optional): List of permission scopes. Defaults to `["git:write", "git:read"]`
811
+ - `scopes` (optional): List of permission scopes. Defaults to
812
+ `["git:write", "git:read"]`
765
813
  - Available scopes: `"git:read"`, `"git:write"`, `"repo:write"`
766
814
  - `ttl` (optional): Time-to-live in seconds. Defaults to 31536000 (1 year)
767
815
 
768
- The function automatically detects the key type (RSA, EC, or EdDSA) and uses the appropriate signing algorithm (RS256, ES256, or EdDSA).
816
+ The function automatically detects the key type (RSA, EC, or EdDSA) and uses the
817
+ appropriate signing algorithm (RS256, ES256, or EdDSA).
769
818
 
770
819
  ## Error Handling
771
820
 
@@ -4,12 +4,12 @@ pierre_storage/client.py,sha256=FVUB-r1Oxr112nFAXPEo_rpkGVFdxYvu_NpBXh8aclI,1490
4
4
  pierre_storage/commit.py,sha256=ks5hKScHHricJ3sx8DyLSAASM72CPmVv-tbtUgHbUF4,16766
5
5
  pierre_storage/errors.py,sha256=-vuA2BUGwyDlErFtdh2boLdk0fDFDFYBEIohJk4AsIs,2184
6
6
  pierre_storage/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
7
- pierre_storage/repo.py,sha256=wnTDVtHx9v8tJTHJ9cHJs8cn5dImsCA3M3xxx7RqhS8,44117
8
- pierre_storage/types.py,sha256=9THfT19hM_qEkozdNH5qhiL34_USubSGIRFHUw8HY9E,14661
7
+ pierre_storage/repo.py,sha256=IsCYYDvZVbQCnydTl_XDODVDrsgABfDQLGhXKx5m9PQ,46472
8
+ pierre_storage/types.py,sha256=peRfmcYi0Hls17yC3j2A9hYspaPh0iY1HEQdxz9Ic7g,15264
9
9
  pierre_storage/version.py,sha256=L7upS30suP-fz3rFGhpCsKcU2OKkpynrjqNIfdNDhFc,316
10
10
  pierre_storage/webhook.py,sha256=hyjSmTlU_x35m612erXDqNXbLUh5i5As5GRw7kxylFc,7425
11
- pierre_storage-0.12.1.dist-info/licenses/LICENSE,sha256=CFzxoMyurfMUB0u0RaXBFZ6IDeUd6FQhKrLR_IeXtuU,1063
12
- pierre_storage-0.12.1.dist-info/METADATA,sha256=r1wvmVRSZsARL6StuI8cLWRz5b7KYbQByBjEnmv7MXk,23306
13
- pierre_storage-0.12.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
14
- pierre_storage-0.12.1.dist-info/top_level.txt,sha256=RzcYFaSdETlcwX-45G9Q39xUgXWZLJEWcOiK0p6ZepY,15
15
- pierre_storage-0.12.1.dist-info/RECORD,,
11
+ pierre_storage-1.0.0.dist-info/licenses/LICENSE,sha256=E9kr4Y1c6sUm8zzJa2kCoU0Wjz4dSxa-c48Ppw2n_pg,10899
12
+ pierre_storage-1.0.0.dist-info/METADATA,sha256=w-COyqU_PBGiTUB3lPpsMqjBQVDOP7Fjucf1ge9Rwvs,23935
13
+ pierre_storage-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
14
+ pierre_storage-1.0.0.dist-info/top_level.txt,sha256=RzcYFaSdETlcwX-45G9Q39xUgXWZLJEWcOiK0p6ZepY,15
15
+ pierre_storage-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,189 @@
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, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the
13
+ copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other
16
+ entities that control, are controlled by, or are under common control with
17
+ that entity. For the purposes of this definition, "control" means (i) the
18
+ power, direct or indirect, to cause the direction or management of such
19
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent
20
+ (50%) or more of the outstanding shares, or (iii) beneficial ownership of
21
+ such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
24
+ 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 source, and
28
+ configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical transformation
31
+ or translation of a Source form, including but not limited to compiled
32
+ object code, generated documentation, and conversions to other media types.
33
+
34
+ "Work" shall mean the work of authorship, whether in Source or Object form,
35
+ made available under the License, as indicated by a copyright notice that is
36
+ included in or attached to the work (an example is provided in the Appendix
37
+ below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object form,
40
+ that is based on (or derived from) the Work and for which the editorial
41
+ revisions, annotations, elaborations, or other modifications represent, as a
42
+ whole, an original work of authorship. For the purposes of this License,
43
+ Derivative Works shall not include works that remain separable from, or
44
+ merely link (or bind by name) to the interfaces of, the Work and Derivative
45
+ Works thereof.
46
+
47
+ "Contribution" shall mean any work of authorship, including the original
48
+ version of the Work and any modifications or additions to that Work or
49
+ Derivative Works thereof, that is intentionally submitted to Licensor for
50
+ inclusion in the Work by the copyright owner or by an individual or Legal
51
+ Entity authorized to submit on behalf of the copyright owner. For the
52
+ purposes of this definition, "submitted" means any form of electronic,
53
+ verbal, or written communication sent to the Licensor or its
54
+ representatives, including but not limited to communication on electronic
55
+ mailing lists, source code control systems, and issue tracking systems that
56
+ are managed by, or on behalf of, the Licensor for the purpose of discussing
57
+ and improving the Work, but excluding communication that is conspicuously
58
+ marked or otherwise designated in writing by the copyright owner as "Not a
59
+ Contribution."
60
+
61
+ "Contributor" shall mean Licensor and any individual or Legal Entity on
62
+ behalf of whom a Contribution has been received by Licensor and subsequently
63
+ incorporated within the Work.
64
+
65
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
66
+ License, each Contributor hereby grants to You a perpetual, worldwide,
67
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
68
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
69
+ sublicense, and distribute the Work and such Derivative Works in Source or
70
+ Object form.
71
+
72
+ 3. Grant of Patent License. Subject to the terms and conditions of this
73
+ License, each Contributor hereby grants to You a perpetual, worldwide,
74
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in
75
+ this section) patent license to make, have made, use, offer to sell, sell,
76
+ import, and otherwise transfer the Work, where such license applies only to
77
+ those patent claims licensable by such Contributor that are necessarily
78
+ infringed by their Contribution(s) alone or by combination of their
79
+ Contribution(s) with the Work to which such Contribution(s) was submitted.
80
+ If You institute patent litigation against any entity (including a
81
+ cross-claim or counterclaim in a lawsuit) alleging that the Work or a
82
+ Contribution incorporated within the Work constitutes direct or contributory
83
+ patent infringement, then any patent licenses granted to You under this
84
+ License for that Work shall terminate as of the date such litigation is
85
+ filed.
86
+
87
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
88
+ Derivative Works thereof in any medium, with or without modifications, and
89
+ in Source or Object form, provided that You meet the following conditions:
90
+
91
+ (a) You must give any other recipients of the Work or Derivative Works a
92
+ copy of this License; and
93
+
94
+ (b) You must cause any modified files to carry prominent notices stating
95
+ that You changed the files; and
96
+
97
+ (c) You must retain, in the Source form of any Derivative Works that You
98
+ distribute, all copyright, patent, trademark, and attribution notices from
99
+ the Source form of the Work, excluding those notices that do not pertain to
100
+ any part of the Derivative Works; and
101
+
102
+ (d) If the Work includes a "NOTICE" text file as part of its distribution,
103
+ then any Derivative Works that You distribute must include a readable copy
104
+ of the attribution notices contained within such NOTICE file, excluding
105
+ those notices that do not pertain to any part of the Derivative Works, in at
106
+ least one of the following places: within a NOTICE text file distributed as
107
+ part of the Derivative Works; within the Source form or documentation, if
108
+ provided along with the Derivative Works; or, within a display generated by
109
+ the Derivative Works, if and wherever such third-party notices normally
110
+ appear. The contents of the NOTICE file are for informational purposes only
111
+ and do not modify the License. You may add Your own attribution notices
112
+ within Derivative Works that You distribute, alongside or as an addendum to
113
+ the NOTICE text from the Work, provided that such additional attribution
114
+ notices cannot be construed as modifying the License.
115
+
116
+ You may add Your own copyright statement to Your modifications and may
117
+ provide additional or different license terms and conditions for use,
118
+ reproduction, or distribution of Your modifications, or for any such
119
+ Derivative Works as a whole, provided Your use, reproduction, and
120
+ distribution of the Work otherwise complies with the conditions stated in
121
+ this License.
122
+
123
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
124
+ Contribution intentionally submitted for inclusion in the Work by You to the
125
+ Licensor shall be under the terms and conditions of this License, without
126
+ any additional terms or conditions. Notwithstanding the above, nothing
127
+ herein shall supersede or modify the terms of any separate license agreement
128
+ you may have executed with Licensor regarding such Contributions.
129
+
130
+ 6. Trademarks. This License does not grant permission to use the trade names,
131
+ trademarks, service marks, or product names of the Licensor, except as
132
+ required for reasonable and customary use in describing the origin of the
133
+ Work and reproducing the content of the NOTICE file.
134
+
135
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
136
+ writing, Licensor provides the Work (and each Contributor provides its
137
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
138
+ KIND, either express or implied, including, without limitation, any
139
+ warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
140
+ FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining
141
+ the appropriateness of using or redistributing the Work and assume any risks
142
+ associated with Your exercise of permissions under this License.
143
+
144
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
145
+ tort (including negligence), contract, or otherwise, unless required by
146
+ applicable law (such as deliberate and grossly negligent acts) or agreed to
147
+ in writing, shall any Contributor be liable to You for damages, including
148
+ any direct, indirect, special, incidental, or consequential damages of any
149
+ character arising as a result of this License or out of the use or inability
150
+ to use the Work (including but not limited to damages for loss of goodwill,
151
+ work stoppage, computer failure or malfunction, or any and all other
152
+ commercial damages or losses), even if such Contributor has been advised of
153
+ the possibility of such damages.
154
+
155
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
156
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
157
+ acceptance of support, warranty, indemnity, or other liability obligations
158
+ and/or rights consistent with this License. However, in accepting such
159
+ obligations, You may act only on Your own behalf and on Your sole
160
+ responsibility, not on behalf of any other Contributor, and only if You
161
+ agree to indemnify, defend, and hold each Contributor harmless for any
162
+ liability incurred by, or claims asserted against, such Contributor by
163
+ reason of your accepting any such warranty or additional liability.
164
+
165
+ END OF TERMS AND CONDITIONS
166
+
167
+ APPENDIX: How to apply the Apache License to your work.
168
+
169
+ To apply the Apache License to your work, attach the following
170
+ boilerplate notice, with the fields enclosed by brackets "[]"
171
+ replaced with your own identifying information. (Don't include
172
+ the brackets!) The text should be enclosed in the appropriate
173
+ comment syntax for the file format. We also recommend that a
174
+ file or class name and description of purpose be included on the
175
+ same "printed page" as the copyright notice for easier
176
+ identification within third-party archives.
177
+
178
+ Copyright 2025 Pierre Computer Company
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
181
+ this file except in compliance with the License. You may obtain a copy of the
182
+ License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software distributed
187
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
188
+ CONDITIONS OF ANY KIND, either express or implied. See the License for the
189
+ specific language governing permissions and limitations under the License.
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Pierre
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.