precleared 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {precleared-0.2.0 → precleared-0.2.1}/PKG-INFO +3 -3
- {precleared-0.2.0 → precleared-0.2.1}/README.md +2 -2
- {precleared-0.2.0 → precleared-0.2.1}/pyproject.toml +1 -1
- {precleared-0.2.0 → precleared-0.2.1}/src/precleared/_tools.py +1 -1
- precleared-0.2.1/src/precleared/_version.py +1 -0
- {precleared-0.2.0 → precleared-0.2.1}/tests/test_async_client.py +1 -1
- {precleared-0.2.0 → precleared-0.2.1}/tests/test_client.py +2 -2
- {precleared-0.2.0 → precleared-0.2.1}/tests/test_tools_common.py +1 -1
- precleared-0.2.0/src/precleared/_version.py +0 -1
- {precleared-0.2.0 → precleared-0.2.1}/.gitignore +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/LICENSE +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/PUBLISHING.md +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/src/precleared/__init__.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/src/precleared/_schemas.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/src/precleared/client.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/src/precleared/crewai.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/src/precleared/errors.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/src/precleared/langchain.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/src/precleared/llamaindex.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/src/precleared/models.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/src/precleared/openai_agents.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/src/precleared/py.typed +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/tests/conftest.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/tests/test_crewai.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/tests/test_import_guards.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/tests/test_langchain.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/tests/test_live_samples.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/tests/test_llamaindex.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/tests/test_models.py +0 -0
- {precleared-0.2.0 → precleared-0.2.1}/tests/test_openai_agents.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: precleared
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Cold-email legality check for AI agents: a Python client for the Precleared API, with LangChain, CrewAI, LlamaIndex and OpenAI Agents tools.
|
|
5
5
|
Project-URL: Homepage, https://precleared.dev
|
|
6
6
|
Project-URL: Documentation, https://precleared.dev/docs
|
|
@@ -45,7 +45,7 @@ Description-Content-Type: text/markdown
|
|
|
45
45
|
|
|
46
46
|
Python client for [Precleared](https://precleared.dev), a cold-email legality check for AI agents.
|
|
47
47
|
|
|
48
|
-
One call per recipient, before the first cold email, answers: is it legal to send this person a cold or marketing email? Precleared looks the recipient up live (for the UK: Companies House, the domain and the company website) and applies the local rules (UK PECR and GDPR, US CAN-SPAM, Canadian CASL, German UWG, French CNIL guidance and the rules for Australia, Ireland, the Netherlands, Spain, Italy, Latvia
|
|
48
|
+
One call per recipient, before the first cold email, answers: is it legal to send this person a cold or marketing email? Precleared looks the recipient up live (for the UK: Companies House, the domain and the company website) and applies the local rules (UK PECR and GDPR, US CAN-SPAM, Canadian CASL, German UWG, French CNIL guidance and the rules for Australia, Ireland, the Netherlands, Spain, Italy, Latvia, the United Arab Emirates, Egypt and Qatar). It returns a verdict, the rule that decided it with its source, what the footer must include, the next step and a signed receipt.
|
|
49
49
|
|
|
50
50
|
Decision support with sources, not legal advice.
|
|
51
51
|
|
|
@@ -121,7 +121,7 @@ async with AsyncPrecleared("pc_live_...") as client:
|
|
|
121
121
|
|
|
122
122
|
## Framework tools
|
|
123
123
|
|
|
124
|
-
Each adapter exposes the same two tools, `precleared_check` and `precleared_verify_receipt`, with descriptions that tell the model when to call them: before the first cold email to anyone who is not already a customer, in the UK, US, Canada, Germany, France, Australia, Ireland, the Netherlands, Spain, Italy, Latvia
|
|
124
|
+
Each adapter exposes the same two tools, `precleared_check` and `precleared_verify_receipt`, with descriptions that tell the model when to call them: before the first cold email to anyone who is not already a customer, in the UK, US, Canada, Germany, France, Australia, Ireland, the Netherlands, Spain, Italy, Latvia, the UAE, Egypt or Qatar, and not for transactional email. The tools return compact text (verdict, rule, footer_text, next_step, receipt URL) rather than the whole JSON. Pass `to_dict=True` for a dictionary instead. Every factory takes an optional `api_key`.
|
|
125
125
|
|
|
126
126
|
Example tool output:
|
|
127
127
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Python client for [Precleared](https://precleared.dev), a cold-email legality check for AI agents.
|
|
4
4
|
|
|
5
|
-
One call per recipient, before the first cold email, answers: is it legal to send this person a cold or marketing email? Precleared looks the recipient up live (for the UK: Companies House, the domain and the company website) and applies the local rules (UK PECR and GDPR, US CAN-SPAM, Canadian CASL, German UWG, French CNIL guidance and the rules for Australia, Ireland, the Netherlands, Spain, Italy, Latvia
|
|
5
|
+
One call per recipient, before the first cold email, answers: is it legal to send this person a cold or marketing email? Precleared looks the recipient up live (for the UK: Companies House, the domain and the company website) and applies the local rules (UK PECR and GDPR, US CAN-SPAM, Canadian CASL, German UWG, French CNIL guidance and the rules for Australia, Ireland, the Netherlands, Spain, Italy, Latvia, the United Arab Emirates, Egypt and Qatar). It returns a verdict, the rule that decided it with its source, what the footer must include, the next step and a signed receipt.
|
|
6
6
|
|
|
7
7
|
Decision support with sources, not legal advice.
|
|
8
8
|
|
|
@@ -78,7 +78,7 @@ async with AsyncPrecleared("pc_live_...") as client:
|
|
|
78
78
|
|
|
79
79
|
## Framework tools
|
|
80
80
|
|
|
81
|
-
Each adapter exposes the same two tools, `precleared_check` and `precleared_verify_receipt`, with descriptions that tell the model when to call them: before the first cold email to anyone who is not already a customer, in the UK, US, Canada, Germany, France, Australia, Ireland, the Netherlands, Spain, Italy, Latvia
|
|
81
|
+
Each adapter exposes the same two tools, `precleared_check` and `precleared_verify_receipt`, with descriptions that tell the model when to call them: before the first cold email to anyone who is not already a customer, in the UK, US, Canada, Germany, France, Australia, Ireland, the Netherlands, Spain, Italy, Latvia, the UAE, Egypt or Qatar, and not for transactional email. The tools return compact text (verdict, rule, footer_text, next_step, receipt URL) rather than the whole JSON. Pass `to_dict=True` for a dictionary instead. Every factory takes an optional `api_key`.
|
|
82
82
|
|
|
83
83
|
Example tool output:
|
|
84
84
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "precleared"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "Cold-email legality check for AI agents: a Python client for the Precleared API, with LangChain, CrewAI, LlamaIndex and OpenAI Agents tools."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -24,7 +24,7 @@ VERIFY_TOOL_NAME = "precleared_verify_receipt"
|
|
|
24
24
|
CHECK_DESCRIPTION = (
|
|
25
25
|
"Check whether a cold or marketing email to one recipient is legal. "
|
|
26
26
|
"Call this once per address before the first cold email to anyone who is not already a customer, "
|
|
27
|
-
"in the UK, US, Canada, Germany, France, Australia, Ireland, the Netherlands, Spain, Italy, Latvia
|
|
27
|
+
"in the UK, US, Canada, Germany, France, Australia, Ireland, the Netherlands, Spain, Italy, Latvia, the UAE, Egypt or Qatar, "
|
|
28
28
|
"including every address in a lead list. Not needed for transactional email such as invoices. "
|
|
29
29
|
"It applies the local rules (UK PECR, US CAN-SPAM, CASL and others) with live lookups "
|
|
30
30
|
"such as UK Companies House. Returns a verdict, the rule that decided it with its source, "
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.1"
|
|
@@ -30,7 +30,7 @@ async def test_async_check_success(make_async_client, recorder):
|
|
|
30
30
|
assert result.rule == "gb_pecr_corporate_subscriber"
|
|
31
31
|
assert result.receipt_url == "https://precleared.dev/r/cc_rcpt_0123456789ABCDEF"
|
|
32
32
|
assert recorder.last.headers["authorization"] == f"Bearer {KEY}"
|
|
33
|
-
assert recorder.last.headers["user-agent"] == "precleared-python/0.2.
|
|
33
|
+
assert recorder.last.headers["user-agent"] == "precleared-python/0.2.1"
|
|
34
34
|
assert recorder.last_json()["address_source"] == "given"
|
|
35
35
|
assert client._http.is_closed
|
|
36
36
|
|
|
@@ -85,7 +85,7 @@ def test_check_sends_expected_body_and_headers_keyless(make_client, recorder):
|
|
|
85
85
|
assert request.method == "POST"
|
|
86
86
|
assert str(request.url) == "https://precleared.dev/api/v1/check"
|
|
87
87
|
assert request.headers["content-type"] == "application/json"
|
|
88
|
-
assert request.headers["user-agent"] == "precleared-python/0.2.
|
|
88
|
+
assert request.headers["user-agent"] == "precleared-python/0.2.1" == DEFAULT_USER_AGENT
|
|
89
89
|
assert request.headers["accept"] == "application/json"
|
|
90
90
|
assert "authorization" not in request.headers
|
|
91
91
|
|
|
@@ -494,7 +494,7 @@ def test_public_exports():
|
|
|
494
494
|
):
|
|
495
495
|
assert name in precleared.__all__
|
|
496
496
|
assert hasattr(precleared, name)
|
|
497
|
-
assert precleared.__version__ == "0.2.
|
|
497
|
+
assert precleared.__version__ == "0.2.1"
|
|
498
498
|
for cls in (InvalidRequest, InvalidKey, PaymentRequired, DailyLimit, RateLimited, ReceiptNotFound, ServerError, NetworkError):
|
|
499
499
|
assert issubclass(cls, PreclearedError)
|
|
500
500
|
|
|
@@ -28,7 +28,7 @@ def test_tool_names_and_descriptions_tell_the_model_when_to_call():
|
|
|
28
28
|
for phrase in (
|
|
29
29
|
"before the first cold email",
|
|
30
30
|
"not already a customer",
|
|
31
|
-
"UK, US, Canada, Germany, France, Australia, Ireland, the Netherlands, Spain, Italy, Latvia
|
|
31
|
+
"UK, US, Canada, Germany, France, Australia, Ireland, the Netherlands, Spain, Italy, Latvia, the UAE, Egypt or Qatar",
|
|
32
32
|
"Not needed for transactional email",
|
|
33
33
|
"ok_to_email means send, with a footer that meets footer_text",
|
|
34
34
|
"consent_needed and blocked mean do not send",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.0"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|