buildingactivity 0.1.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.
- buildingactivity-0.1.1/LICENSE +21 -0
- buildingactivity-0.1.1/PKG-INFO +93 -0
- buildingactivity-0.1.1/README.md +61 -0
- buildingactivity-0.1.1/pyproject.toml +51 -0
- buildingactivity-0.1.1/setup.cfg +4 -0
- buildingactivity-0.1.1/src/buildingactivity/__init__.py +2 -0
- buildingactivity-0.1.1/src/buildingactivity/cli/__init__.py +6 -0
- buildingactivity-0.1.1/src/buildingactivity/cli/__main__.py +5 -0
- buildingactivity-0.1.1/src/buildingactivity/cli/main.py +714 -0
- buildingactivity-0.1.1/src/buildingactivity/cli/spec.json +10428 -0
- buildingactivity-0.1.1/src/buildingactivity/cli/specsync.py +128 -0
- buildingactivity-0.1.1/src/buildingactivity/mcp/__init__.py +2 -0
- buildingactivity-0.1.1/src/buildingactivity/mcp/__main__.py +5 -0
- buildingactivity-0.1.1/src/buildingactivity/mcp/server.py +333 -0
- buildingactivity-0.1.1/src/buildingactivity/mcp/tools.py +928 -0
- buildingactivity-0.1.1/src/buildingactivity/mcp/usage.py +202 -0
- buildingactivity-0.1.1/src/buildingactivity.egg-info/PKG-INFO +93 -0
- buildingactivity-0.1.1/src/buildingactivity.egg-info/SOURCES.txt +37 -0
- buildingactivity-0.1.1/src/buildingactivity.egg-info/dependency_links.txt +1 -0
- buildingactivity-0.1.1/src/buildingactivity.egg-info/entry_points.txt +3 -0
- buildingactivity-0.1.1/src/buildingactivity.egg-info/requires.txt +12 -0
- buildingactivity-0.1.1/src/buildingactivity.egg-info/top_level.txt +1 -0
- buildingactivity-0.1.1/tests/test_cli.py +341 -0
- buildingactivity-0.1.1/tests/test_mcp_agency_name.py +27 -0
- buildingactivity-0.1.1/tests/test_mcp_batch.py +205 -0
- buildingactivity-0.1.1/tests/test_mcp_contract_recorded.py +182 -0
- buildingactivity-0.1.1/tests/test_mcp_count_object.py +85 -0
- buildingactivity-0.1.1/tests/test_mcp_dims_pii.py +70 -0
- buildingactivity-0.1.1/tests/test_mcp_kind.py +119 -0
- buildingactivity-0.1.1/tests/test_mcp_metrics_classes.py +105 -0
- buildingactivity-0.1.1/tests/test_mcp_project_type.py +75 -0
- buildingactivity-0.1.1/tests/test_mcp_q_text.py +61 -0
- buildingactivity-0.1.1/tests/test_mcp_records_text.py +17 -0
- buildingactivity-0.1.1/tests/test_mcp_signal_rows.py +79 -0
- buildingactivity-0.1.1/tests/test_mcp_signal_text.py +92 -0
- buildingactivity-0.1.1/tests/test_mcp_signal_type.py +80 -0
- buildingactivity-0.1.1/tests/test_mcp_tools.py +538 -0
- buildingactivity-0.1.1/tests/test_mcp_usage.py +313 -0
- buildingactivity-0.1.1/tests/test_spec.py +89 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Recursive Capital Inc.
|
|
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,93 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: buildingactivity
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Command line client and MCP server for the BuildingActivity building-permit API
|
|
5
|
+
Author: Recursive Capital Inc.
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://buildingactivity.com
|
|
8
|
+
Project-URL: Documentation, https://buildingactivity.com/api
|
|
9
|
+
Project-URL: Source, https://github.com/Recursive-Capital-Inc/buildingactivity-python
|
|
10
|
+
Keywords: building permits,construction,real estate,mcp,api client
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: requests>=2.28
|
|
22
|
+
Provides-Extra: mcp
|
|
23
|
+
Requires-Dist: mcp<3,>=2.3; extra == "mcp"
|
|
24
|
+
Requires-Dist: uvicorn>=0.30; extra == "mcp"
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
27
|
+
Requires-Dist: jsonschema>=4; extra == "dev"
|
|
28
|
+
Requires-Dist: httpx>=0.27; extra == "dev"
|
|
29
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
30
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
|
|
33
|
+
# buildingactivity
|
|
34
|
+
|
|
35
|
+
Command line client and MCP server for the [BuildingActivity](https://buildingactivity.com)
|
|
36
|
+
API: US building permits, properties, contractors, zoning decisions, early project signals
|
|
37
|
+
and big projects, each record linked to the issuer's own page (`source_url`).
|
|
38
|
+
|
|
39
|
+
Both tools are thin HTTP clients of `https://api.buildingactivity.com`. You need an API key
|
|
40
|
+
from [buildingactivity.com](https://buildingactivity.com/api).
|
|
41
|
+
|
|
42
|
+
## Install
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
pipx install buildingactivity # the CLI: `buildingactivity`
|
|
46
|
+
pipx install 'buildingactivity[mcp]' # adds the MCP server: `buildingactivity-mcp`
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Or with uv: `uv tool install buildingactivity` (add `--with mcp --with uvicorn`, or install
|
|
50
|
+
`'buildingactivity[mcp]'`). Python 3.11 or newer. The CLI needs only `requests`.
|
|
51
|
+
|
|
52
|
+
## CLI
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
export BUILDINGACTIVITY_API_KEY=... # or: buildingactivity config set-key (reads stdin)
|
|
56
|
+
buildingactivity permits search --geo-id cty_06041 --tags solar --limit 20
|
|
57
|
+
buildingactivity property --address "50 Barbaree Way, Tiburon, CA 94920"
|
|
58
|
+
buildingactivity signals list --geo-id CA --large-only
|
|
59
|
+
buildingactivity changes tail --geo-id cty_04013 --tags solar
|
|
60
|
+
buildingactivity usage
|
|
61
|
+
buildingactivity schema # every command, offline
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Commands are generated from the API's OpenAPI document bundled with the package, so every
|
|
65
|
+
API route and parameter has a command and a flag. JSON on stdout, JSON errors on stderr,
|
|
66
|
+
exit codes 0 ok, 1 client error, 2 auth, 3 rate limited, 4 records used up, 5 server or
|
|
67
|
+
network. Details: [docs/cli.md](docs/cli.md).
|
|
68
|
+
|
|
69
|
+
## MCP server
|
|
70
|
+
|
|
71
|
+
Hosted, nothing to install: `https://mcp.buildingactivity.com/mcp` with your key as an
|
|
72
|
+
`X-API-Key` (or `Authorization: Bearer`) header. Clients that can only take a URL
|
|
73
|
+
(ChatGPT connectors, Claude connectors without header support) use
|
|
74
|
+
`https://mcp.buildingactivity.com/mcp/<your key>`; treat that URL as a secret.
|
|
75
|
+
|
|
76
|
+
Local, over stdio (Claude Desktop, Cursor and most hosts):
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{"mcpServers": {"buildingactivity": {
|
|
80
|
+
"command": "uvx", "args": ["--from", "buildingactivity[mcp]", "buildingactivity-mcp"],
|
|
81
|
+
"env": {"BUILDINGACTIVITY_API_KEY": "<your key>"}}}}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
18 tools with short schemas and compact answers (default page 10, every answer under
|
|
85
|
+
4,000 tokens): permits, properties, addresses, contractors, areas, metrics, coverage,
|
|
86
|
+
projects, decisions, early signals, the change feed, work tags and your usage. Setup for
|
|
87
|
+
each client: [docs/connect.md](docs/connect.md); tools and answers:
|
|
88
|
+
[docs/mcp.md](docs/mcp.md); running the hosted service: [docs/hosted.md](docs/hosted.md).
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
MIT, see [LICENSE](LICENSE). The data you get from the API is governed by the
|
|
93
|
+
BuildingActivity terms of service, not by this license.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# buildingactivity
|
|
2
|
+
|
|
3
|
+
Command line client and MCP server for the [BuildingActivity](https://buildingactivity.com)
|
|
4
|
+
API: US building permits, properties, contractors, zoning decisions, early project signals
|
|
5
|
+
and big projects, each record linked to the issuer's own page (`source_url`).
|
|
6
|
+
|
|
7
|
+
Both tools are thin HTTP clients of `https://api.buildingactivity.com`. You need an API key
|
|
8
|
+
from [buildingactivity.com](https://buildingactivity.com/api).
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
pipx install buildingactivity # the CLI: `buildingactivity`
|
|
14
|
+
pipx install 'buildingactivity[mcp]' # adds the MCP server: `buildingactivity-mcp`
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or with uv: `uv tool install buildingactivity` (add `--with mcp --with uvicorn`, or install
|
|
18
|
+
`'buildingactivity[mcp]'`). Python 3.11 or newer. The CLI needs only `requests`.
|
|
19
|
+
|
|
20
|
+
## CLI
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
export BUILDINGACTIVITY_API_KEY=... # or: buildingactivity config set-key (reads stdin)
|
|
24
|
+
buildingactivity permits search --geo-id cty_06041 --tags solar --limit 20
|
|
25
|
+
buildingactivity property --address "50 Barbaree Way, Tiburon, CA 94920"
|
|
26
|
+
buildingactivity signals list --geo-id CA --large-only
|
|
27
|
+
buildingactivity changes tail --geo-id cty_04013 --tags solar
|
|
28
|
+
buildingactivity usage
|
|
29
|
+
buildingactivity schema # every command, offline
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Commands are generated from the API's OpenAPI document bundled with the package, so every
|
|
33
|
+
API route and parameter has a command and a flag. JSON on stdout, JSON errors on stderr,
|
|
34
|
+
exit codes 0 ok, 1 client error, 2 auth, 3 rate limited, 4 records used up, 5 server or
|
|
35
|
+
network. Details: [docs/cli.md](docs/cli.md).
|
|
36
|
+
|
|
37
|
+
## MCP server
|
|
38
|
+
|
|
39
|
+
Hosted, nothing to install: `https://mcp.buildingactivity.com/mcp` with your key as an
|
|
40
|
+
`X-API-Key` (or `Authorization: Bearer`) header. Clients that can only take a URL
|
|
41
|
+
(ChatGPT connectors, Claude connectors without header support) use
|
|
42
|
+
`https://mcp.buildingactivity.com/mcp/<your key>`; treat that URL as a secret.
|
|
43
|
+
|
|
44
|
+
Local, over stdio (Claude Desktop, Cursor and most hosts):
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{"mcpServers": {"buildingactivity": {
|
|
48
|
+
"command": "uvx", "args": ["--from", "buildingactivity[mcp]", "buildingactivity-mcp"],
|
|
49
|
+
"env": {"BUILDINGACTIVITY_API_KEY": "<your key>"}}}}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
18 tools with short schemas and compact answers (default page 10, every answer under
|
|
53
|
+
4,000 tokens): permits, properties, addresses, contractors, areas, metrics, coverage,
|
|
54
|
+
projects, decisions, early signals, the change feed, work tags and your usage. Setup for
|
|
55
|
+
each client: [docs/connect.md](docs/connect.md); tools and answers:
|
|
56
|
+
[docs/mcp.md](docs/mcp.md); running the hosted service: [docs/hosted.md](docs/hosted.md).
|
|
57
|
+
|
|
58
|
+
## License
|
|
59
|
+
|
|
60
|
+
MIT, see [LICENSE](LICENSE). The data you get from the API is governed by the
|
|
61
|
+
BuildingActivity terms of service, not by this license.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "buildingactivity"
|
|
3
|
+
version = "0.1.1"
|
|
4
|
+
description = "Command line client and MCP server for the BuildingActivity building-permit API"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
requires-python = ">=3.11"
|
|
9
|
+
authors = [{ name = "Recursive Capital Inc." }]
|
|
10
|
+
keywords = ["building permits", "construction", "real estate", "mcp", "api client"]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Development Status :: 4 - Beta",
|
|
13
|
+
"Environment :: Console",
|
|
14
|
+
"Intended Audience :: Developers",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
18
|
+
"Topic :: Scientific/Engineering :: Information Analysis",
|
|
19
|
+
]
|
|
20
|
+
dependencies = ["requests>=2.28"]
|
|
21
|
+
|
|
22
|
+
[project.optional-dependencies]
|
|
23
|
+
# The MCP server (buildingactivity-mcp); the CLI needs only requests.
|
|
24
|
+
mcp = ["mcp>=2.3,<3", "uvicorn>=0.30"]
|
|
25
|
+
dev = ["pytest>=8", "jsonschema>=4", "httpx>=0.27", "ruff>=0.6", "build>=1.2"]
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Homepage = "https://buildingactivity.com"
|
|
29
|
+
Documentation = "https://buildingactivity.com/api"
|
|
30
|
+
Source = "https://github.com/Recursive-Capital-Inc/buildingactivity-python"
|
|
31
|
+
|
|
32
|
+
[project.scripts]
|
|
33
|
+
buildingactivity = "buildingactivity.cli.main:main"
|
|
34
|
+
buildingactivity-mcp = "buildingactivity.mcp.server:main"
|
|
35
|
+
|
|
36
|
+
[build-system]
|
|
37
|
+
requires = ["setuptools>=77"]
|
|
38
|
+
build-backend = "setuptools.build_meta"
|
|
39
|
+
|
|
40
|
+
[tool.setuptools.packages.find]
|
|
41
|
+
where = ["src"]
|
|
42
|
+
|
|
43
|
+
[tool.setuptools.package-data]
|
|
44
|
+
"buildingactivity.cli" = ["spec.json"]
|
|
45
|
+
|
|
46
|
+
[tool.pytest.ini_options]
|
|
47
|
+
testpaths = ["tests"]
|
|
48
|
+
|
|
49
|
+
[tool.ruff]
|
|
50
|
+
line-length = 100
|
|
51
|
+
src = ["src", "tests"]
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"""buildingactivity: a command line client for the BuildingActivity API v1.
|
|
2
|
+
|
|
3
|
+
Commands are generated at run time from the OpenAPI snapshot bundled with this package
|
|
4
|
+
(`spec.json`, the /v1 part of the API's /openapi.json, refreshed by `specsync`), so the
|
|
5
|
+
CLI never drifts from the API. Stdlib plus requests only. See docs/cli.md.
|
|
6
|
+
"""
|