lawdiver 0.1.0__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.
@@ -0,0 +1,19 @@
1
+ # Node / TypeScript
2
+ node_modules/
3
+ dist/
4
+ dist-tests/
5
+ *.tsbuildinfo
6
+
7
+ # Python
8
+ __pycache__/
9
+ *.py[cod]
10
+ *.egg-info/
11
+ .pytest_cache/
12
+ .venv/
13
+ venv/
14
+ build/
15
+ python/dist/
16
+
17
+ # Environment
18
+ .env
19
+ .env.*
lawdiver-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LawDiver
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.
@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.5
2
+ Name: lawdiver
3
+ Version: 0.1.0
4
+ Summary: Official Python SDK for the LawDiver Legal Research API — U.S. case law, statutes, cite-checking, tax, trademark, and immigration.
5
+ Project-URL: Homepage, https://lawdiver.com/products/api
6
+ Project-URL: Documentation, https://lawdiver.com/products/api
7
+ Project-URL: MCP Server, https://lawdiver.com/products/legal-mcp-server
8
+ Project-URL: Repository, https://github.com/lawdiver/lawdiver-sdk
9
+ Project-URL: Issues, https://github.com/lawdiver/lawdiver-sdk/issues
10
+ Author-email: LawDiver <support@lawdiver.com>
11
+ License: MIT
12
+ License-File: LICENSE
13
+ Keywords: case-law,caselaw,citator,cite-check,immigration,lawdiver,legal-api,legal-research,mcp,statutes,tax-law,trademark
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Intended Audience :: Legal Industry
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Typing :: Typed
25
+ Requires-Python: >=3.9
26
+ Requires-Dist: httpx>=0.27.0
27
+ Requires-Dist: pydantic>=2.0.0
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
30
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
31
+ Description-Content-Type: text/markdown
32
+
33
+ # lawdiver
34
+
35
+ Official Python SDK (sync & async) for the [LawDiver Legal Research API](https://lawdiver.com/products/api).
36
+
37
+ - **API Documentation & Keys:** [https://lawdiver.com/products/api](https://lawdiver.com/products/api)
38
+ - **Legal MCP Server:** [https://lawdiver.com/products/legal-mcp-server](https://lawdiver.com/products/legal-mcp-server)
39
+ - **GitHub:** [https://github.com/lawdiver/lawdiver-sdk](https://github.com/lawdiver/lawdiver-sdk)
40
+
41
+ ## Quick Start
42
+
43
+ ```bash
44
+ pip install lawdiver
45
+ ```
46
+
47
+ ```python
48
+ from lawdiver import LawDiver
49
+
50
+ client = LawDiver() # reads LAWDIVER_API_KEY from environment
51
+ results = client.search(query="negligence AND causation", jurisdiction={"type": "all_federal"}, limit=5)
52
+ print(results)
53
+ ```
54
+
55
+ ### Async Client
56
+
57
+ ```python
58
+ import asyncio
59
+ from lawdiver import AsyncLawDiver
60
+
61
+ async def main():
62
+ async with AsyncLawDiver() as client:
63
+ case = await client.retrieve_case(query="410 U.S. 113")
64
+ print(case)
65
+
66
+ asyncio.run(main())
67
+ ```
68
+
69
+ ## Examples
70
+
71
+ ```python
72
+ # Check citations & good-law status
73
+ checked = client.cite_check(citations=["410 U.S. 113", "42 U.S.C. § 1983"])
74
+
75
+ # Retrieve a statute
76
+ statute = client.retrieve_statute(query="42 U.S.C. § 1983")
77
+
78
+ # Tax (requires ld_tax_... key)
79
+ tax_client = LawDiver(api_key="ld_tax_...")
80
+ irc = tax_client.tax.retrieve(kind="irc", cite="2518")
81
+
82
+ # Trademark (requires ld_tm_... key)
83
+ tm_client = LawDiver(api_key="ld_tm_...")
84
+ tmep = tm_client.trademark.retrieve(kind="tmep", section="1207.01")
85
+
86
+ # Immigration (requires ld_imm_... key)
87
+ imm_client = LawDiver(api_key="ld_imm_...")
88
+ bulletin = imm_client.immigration.get_bulletin(month="2026-11")
89
+ ```
90
+
91
+ ## MCP Setup (Cursor / Claude Desktop)
92
+
93
+ Connect AI agents directly to the hosted [LawDiver Legal MCP Server](https://lawdiver.com/products/legal-mcp-server):
94
+
95
+ ```json
96
+ {
97
+ "mcpServers": {
98
+ "lawdiver": {
99
+ "url": "https://lawdiver.com/mcp",
100
+ "headers": {
101
+ "Authorization": "Bearer YOUR_LAWDIVER_API_KEY"
102
+ }
103
+ }
104
+ }
105
+ }
106
+ ```
107
+
108
+ ## License
109
+
110
+ MIT
@@ -0,0 +1,78 @@
1
+ # lawdiver
2
+
3
+ Official Python SDK (sync & async) for the [LawDiver Legal Research API](https://lawdiver.com/products/api).
4
+
5
+ - **API Documentation & Keys:** [https://lawdiver.com/products/api](https://lawdiver.com/products/api)
6
+ - **Legal MCP Server:** [https://lawdiver.com/products/legal-mcp-server](https://lawdiver.com/products/legal-mcp-server)
7
+ - **GitHub:** [https://github.com/lawdiver/lawdiver-sdk](https://github.com/lawdiver/lawdiver-sdk)
8
+
9
+ ## Quick Start
10
+
11
+ ```bash
12
+ pip install lawdiver
13
+ ```
14
+
15
+ ```python
16
+ from lawdiver import LawDiver
17
+
18
+ client = LawDiver() # reads LAWDIVER_API_KEY from environment
19
+ results = client.search(query="negligence AND causation", jurisdiction={"type": "all_federal"}, limit=5)
20
+ print(results)
21
+ ```
22
+
23
+ ### Async Client
24
+
25
+ ```python
26
+ import asyncio
27
+ from lawdiver import AsyncLawDiver
28
+
29
+ async def main():
30
+ async with AsyncLawDiver() as client:
31
+ case = await client.retrieve_case(query="410 U.S. 113")
32
+ print(case)
33
+
34
+ asyncio.run(main())
35
+ ```
36
+
37
+ ## Examples
38
+
39
+ ```python
40
+ # Check citations & good-law status
41
+ checked = client.cite_check(citations=["410 U.S. 113", "42 U.S.C. § 1983"])
42
+
43
+ # Retrieve a statute
44
+ statute = client.retrieve_statute(query="42 U.S.C. § 1983")
45
+
46
+ # Tax (requires ld_tax_... key)
47
+ tax_client = LawDiver(api_key="ld_tax_...")
48
+ irc = tax_client.tax.retrieve(kind="irc", cite="2518")
49
+
50
+ # Trademark (requires ld_tm_... key)
51
+ tm_client = LawDiver(api_key="ld_tm_...")
52
+ tmep = tm_client.trademark.retrieve(kind="tmep", section="1207.01")
53
+
54
+ # Immigration (requires ld_imm_... key)
55
+ imm_client = LawDiver(api_key="ld_imm_...")
56
+ bulletin = imm_client.immigration.get_bulletin(month="2026-11")
57
+ ```
58
+
59
+ ## MCP Setup (Cursor / Claude Desktop)
60
+
61
+ Connect AI agents directly to the hosted [LawDiver Legal MCP Server](https://lawdiver.com/products/legal-mcp-server):
62
+
63
+ ```json
64
+ {
65
+ "mcpServers": {
66
+ "lawdiver": {
67
+ "url": "https://lawdiver.com/mcp",
68
+ "headers": {
69
+ "Authorization": "Bearer YOUR_LAWDIVER_API_KEY"
70
+ }
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ ## License
77
+
78
+ MIT
@@ -0,0 +1,63 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.25.0"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "lawdiver"
7
+ version = "0.1.0"
8
+ description = "Official Python SDK for the LawDiver Legal Research API — U.S. case law, statutes, cite-checking, tax, trademark, and immigration."
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.9"
12
+ authors = [{ name = "LawDiver", email = "support@lawdiver.com" }]
13
+ keywords = [
14
+ "lawdiver",
15
+ "legal-api",
16
+ "caselaw",
17
+ "case-law",
18
+ "legal-research",
19
+ "cite-check",
20
+ "citator",
21
+ "statutes",
22
+ "tax-law",
23
+ "trademark",
24
+ "immigration",
25
+ "mcp",
26
+ ]
27
+ classifiers = [
28
+ "Development Status :: 4 - Beta",
29
+ "Intended Audience :: Developers",
30
+ "Intended Audience :: Legal Industry",
31
+ "License :: OSI Approved :: MIT License",
32
+ "Programming Language :: Python :: 3",
33
+ "Programming Language :: Python :: 3.9",
34
+ "Programming Language :: Python :: 3.10",
35
+ "Programming Language :: Python :: 3.11",
36
+ "Programming Language :: Python :: 3.12",
37
+ "Programming Language :: Python :: 3.13",
38
+ "Typing :: Typed",
39
+ ]
40
+ dependencies = [
41
+ "httpx>=0.27.0",
42
+ "pydantic>=2.0.0",
43
+ ]
44
+
45
+ [project.optional-dependencies]
46
+ dev = [
47
+ "pytest>=8.0.0",
48
+ "pytest-asyncio>=0.24.0",
49
+ ]
50
+
51
+ [project.urls]
52
+ Homepage = "https://lawdiver.com/products/api"
53
+ Documentation = "https://lawdiver.com/products/api"
54
+ "MCP Server" = "https://lawdiver.com/products/legal-mcp-server"
55
+ Repository = "https://github.com/lawdiver/lawdiver-sdk"
56
+ Issues = "https://github.com/lawdiver/lawdiver-sdk/issues"
57
+
58
+ [tool.hatch.build.targets.wheel]
59
+ packages = ["src/lawdiver"]
60
+
61
+ [tool.pytest.ini_options]
62
+ asyncio_mode = "auto"
63
+ testpaths = ["tests"]
@@ -0,0 +1,32 @@
1
+ from .client import AsyncLawDiver, LawDiver
2
+ from .errors import (
3
+ AuthenticationError,
4
+ BadRequestError,
5
+ LawDiverError,
6
+ PaymentRequiredError,
7
+ RateLimitError,
8
+ )
9
+ from .models import (
10
+ ApiResponse,
11
+ CircuitId,
12
+ JurisdictionFilter,
13
+ JurisdictionType,
14
+ TaxAuthorityKind,
15
+ TrademarkRetrieveKind,
16
+ )
17
+
18
+ __all__ = [
19
+ "LawDiver",
20
+ "AsyncLawDiver",
21
+ "LawDiverError",
22
+ "BadRequestError",
23
+ "AuthenticationError",
24
+ "PaymentRequiredError",
25
+ "RateLimitError",
26
+ "ApiResponse",
27
+ "JurisdictionFilter",
28
+ "JurisdictionType",
29
+ "CircuitId",
30
+ "TaxAuthorityKind",
31
+ "TrademarkRetrieveKind",
32
+ ]