shield-python 0.1.6__py3-none-any.whl → 0.2.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.
shield/__init__.py CHANGED
@@ -2,4 +2,4 @@ from .client import Client
2
2
  from .exceptions import ShieldError
3
3
 
4
4
  __all__ = ["Client", "ShieldError"]
5
- __version__ = "0.1.5"
5
+ __version__ = "0.1.6"
shield/client.py CHANGED
@@ -14,7 +14,7 @@ from .resources.verify import Verify
14
14
 
15
15
  # ARCH-019: kept static to avoid leaking Python version / OS into server logs.
16
16
  # Bumped alongside setup.py version on each release.
17
- SDK_USER_AGENT = "shield-python/0.1.6"
17
+ SDK_USER_AGENT = "shield-python/0.2.0"
18
18
 
19
19
 
20
20
  class Client:
@@ -34,6 +34,14 @@ class Client:
34
34
  hmac_secret: Optional[str] = None,
35
35
  timeout: int = 30,
36
36
  ):
37
+ if not hmac_secret:
38
+ raise ShieldError(
39
+ message=(
40
+ "hmac_secret is required. All write operations must be signed. "
41
+ "See https://docs.getshield.dev/authentication"
42
+ ),
43
+ status_code=0,
44
+ )
37
45
  self.api_key = api_key
38
46
  self.base_url = base_url.rstrip("/")
39
47
  self.hmac_secret = hmac_secret
@@ -1,13 +1,15 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shield-python
3
- Version: 0.1.6
3
+ Version: 0.2.0
4
4
  Summary: Official Shield SDK for Python
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://getshield.dev
7
- Project-URL: Documentation, https://docs.getshield.dev
7
+ Project-URL: Documentation, https://getshield.dev/docs
8
8
  Requires-Python: >=3.8
9
9
  Description-Content-Type: text/markdown
10
+ License-File: LICENSE
10
11
  Requires-Dist: requests>=2.28.0
12
+ Dynamic: license-file
11
13
 
12
14
  # Shield Python SDK
13
15
 
@@ -16,7 +18,7 @@ Official Python SDK for [Shield](https://getshield.dev) ??tamper-evident session
16
18
  ## Installation
17
19
 
18
20
  ```bash
19
- pip install shield-python
21
+ pip install shield-python==0.1.6
20
22
  ```
21
23
 
22
24
  ## Quick Start
@@ -54,7 +56,7 @@ client.events.create(
54
56
 
55
57
  # Verify session integrity
56
58
  result = client.verify.session(session_id)
57
- print(result["intact"]) # True
59
+ print(result["valid"]) # True
58
60
 
59
61
  # Export session
60
62
  pdf_bytes = client.sessions.export(session_id, format="pdf")
@@ -123,7 +125,7 @@ def sign_agreement(session_id):
123
125
  session_id=session_id,
124
126
  event_type="shield.agreement.signed",
125
127
  actor=data["signer_email"],
126
- data={"document": data["document_name"], "ip": request.remote_addr},
128
+ data={"document": data["document_name"]},
127
129
  )
128
130
  return jsonify({"status": "signed"}), 200
129
131
  ```
@@ -192,7 +194,7 @@ async def verify_session(session_id: str):
192
194
 
193
195
  ## Event Types Reference
194
196
 
195
- Shield Standard Event Taxonomy v1.0 ??37 event types across 7 categories:
197
+ Shield Standard Event Taxonomy v1.0 39 event types across 8 categories:
196
198
 
197
199
  ### Party Events
198
200
  | Event Type | Description |
@@ -0,0 +1,12 @@
1
+ shield/__init__.py,sha256=5SoNzgp4CLk9XCzh3XlYfdRtXZXkXRBvtnKAIU0T6xA,122
2
+ shield/client.py,sha256=hNzvYzymJmwR-nrn3wQJ2QvBlORfGBPDMJsNoXmZqt8,5583
3
+ shield/exceptions.py,sha256=GgC2gtEvgCTxqekJyu7BJdHGi3sY1NzGWOEWkARpci8,500
4
+ shield/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ shield/resources/events.py,sha256=uH0TG235kRsoS6sOp-zPIcy5WbbtaPNAhC8aFMy00Po,1093
6
+ shield/resources/sessions.py,sha256=qOnJlpCx2Zk5nEh5TCFkf6v05l4M5SKAeF7klQ9YCQM,1268
7
+ shield/resources/verify.py,sha256=vGN51EWU56jOl8BVfNlfiP0ivkNvkLykicupGIGcpAw,498
8
+ shield_python-0.2.0.dist-info/licenses/LICENSE,sha256=q9AbInAHssIXz7La3zZMTD7ZAkEdS7RZ3W1rBiDrmAw,1063
9
+ shield_python-0.2.0.dist-info/METADATA,sha256=MXqZ_3B22TaQT_i84s9RvEtEnRy0JmQ5L-DOXpUHa08,8668
10
+ shield_python-0.2.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
11
+ shield_python-0.2.0.dist-info/top_level.txt,sha256=XumpIzJqChucal6arFU8u2d4ua7RA9yPcBSJFUi0JDU,7
12
+ shield_python-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shield
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.
@@ -1,11 +0,0 @@
1
- shield/__init__.py,sha256=Uktse_UZlAOJnYVIKLKzeXFL6kiSJEEqNy0BMDHIYM4,122
2
- shield/client.py,sha256=1bVkTyvgtCQX4vxpAOPTFE6z5OEPMHoKR4PHw90l0wE,5281
3
- shield/exceptions.py,sha256=GgC2gtEvgCTxqekJyu7BJdHGi3sY1NzGWOEWkARpci8,500
4
- shield/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- shield/resources/events.py,sha256=uH0TG235kRsoS6sOp-zPIcy5WbbtaPNAhC8aFMy00Po,1093
6
- shield/resources/sessions.py,sha256=qOnJlpCx2Zk5nEh5TCFkf6v05l4M5SKAeF7klQ9YCQM,1268
7
- shield/resources/verify.py,sha256=vGN51EWU56jOl8BVfNlfiP0ivkNvkLykicupGIGcpAw,498
8
- shield_python-0.1.6.dist-info/METADATA,sha256=GvbinXKIOVhxlBz5irtD6pcFvadRMy_qwd8hPw2F-AI,8641
9
- shield_python-0.1.6.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
10
- shield_python-0.1.6.dist-info/top_level.txt,sha256=XumpIzJqChucal6arFU8u2d4ua7RA9yPcBSJFUi0JDU,7
11
- shield_python-0.1.6.dist-info/RECORD,,