struai 1.0.1__tar.gz → 1.0.4__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.
- {struai-1.0.1 → struai-1.0.4}/.github/workflows/release.yml +4 -0
- struai-1.0.4/CHANGELOG.md +47 -0
- {struai-1.0.1 → struai-1.0.4}/PKG-INFO +55 -4
- {struai-1.0.1 → struai-1.0.4}/README.md +54 -3
- {struai-1.0.1 → struai-1.0.4}/js/README.md +30 -2
- {struai-1.0.1 → struai-1.0.4}/js/package.json +1 -1
- {struai-1.0.1 → struai-1.0.4}/js/src/index.ts +1 -1
- {struai-1.0.1 → struai-1.0.4}/pyproject.toml +1 -1
- {struai-1.0.1 → struai-1.0.4}/src/struai/__init__.py +2 -1
- {struai-1.0.1 → struai-1.0.4}/src/struai/_client.py +4 -2
- {struai-1.0.1 → struai-1.0.4}/src/struai/_version.py +1 -1
- struai-1.0.1/CHANGELOG.md +0 -15
- {struai-1.0.1 → struai-1.0.4}/.github/workflows/ci.yml +0 -0
- {struai-1.0.1 → struai-1.0.4}/.gitignore +0 -0
- {struai-1.0.1 → struai-1.0.4}/.pre-commit-config.yaml +0 -0
- {struai-1.0.1 → struai-1.0.4}/js/.gitignore +0 -0
- {struai-1.0.1 → struai-1.0.4}/js/tsconfig.json +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/_base.py +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/_exceptions.py +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/models/__init__.py +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/models/common.py +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/models/drawings.py +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/models/entities.py +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/models/projects.py +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/models/search.py +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/py.typed +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/resources/__init__.py +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/resources/drawings.py +0 -0
- {struai-1.0.1 → struai-1.0.4}/src/struai/resources/projects.py +0 -0
|
@@ -93,6 +93,8 @@ jobs:
|
|
|
93
93
|
|
|
94
94
|
steps:
|
|
95
95
|
- uses: actions/checkout@v4
|
|
96
|
+
with:
|
|
97
|
+
ref: ${{ needs.release.outputs.released == 'true' && format('v{0}', needs.release.outputs.version) || github.ref }}
|
|
96
98
|
|
|
97
99
|
- name: Set up Python
|
|
98
100
|
uses: actions/setup-python@v5
|
|
@@ -120,6 +122,8 @@ jobs:
|
|
|
120
122
|
|
|
121
123
|
steps:
|
|
122
124
|
- uses: actions/checkout@v4
|
|
125
|
+
with:
|
|
126
|
+
ref: ${{ needs.release.outputs.released == 'true' && format('v{0}', needs.release.outputs.version) || github.ref }}
|
|
123
127
|
|
|
124
128
|
- name: Set up Node.js
|
|
125
129
|
uses: actions/setup-node@v4
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
|
|
3
|
+
<!-- version list -->
|
|
4
|
+
|
|
5
|
+
## v1.0.4 (2026-02-04)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **ci**: Checkout release tag for publish jobs
|
|
10
|
+
([`6b78004`](https://github.com/bhoshaga/struai/commit/6b78004629cee3dff309836f7879da417dd69ac9))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## v1.0.3 (2026-02-04)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
- Trigger release v1.0.3
|
|
18
|
+
([`a611906`](https://github.com/bhoshaga/struai/commit/a611906590f693d9222b2b95aa2c42830e92c156))
|
|
19
|
+
|
|
20
|
+
### Documentation
|
|
21
|
+
|
|
22
|
+
- Clarify auth and endpoints
|
|
23
|
+
([`9703efe`](https://github.com/bhoshaga/struai/commit/9703efe1354168cb32d3ed6eacea642e22bea593))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## v1.0.2 (2026-02-04)
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
- **ci**: Add publish_only option for re-publishing
|
|
31
|
+
([`0806b1e`](https://github.com/bhoshaga/struai/commit/0806b1eb6dba6d518df9f43a199b9255d1776d6a))
|
|
32
|
+
|
|
33
|
+
- **ci**: Consolidate to single release workflow
|
|
34
|
+
([`91e94b0`](https://github.com/bhoshaga/struai/commit/91e94b00f5eb6e123adb2cfae01a473ed4cd5cbd))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## v1.0.1 (2026-02-04)
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
- **ci**: Include publish jobs directly in release workflow
|
|
42
|
+
([`02436eb`](https://github.com/bhoshaga/struai/commit/02436eb55c63cbaa54eac8ca456a54d30125fada))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## v1.0.0 (2026-02-04)
|
|
46
|
+
|
|
47
|
+
- Initial Release
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: struai
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: StruAI Drawing Analysis SDK - AI-powered construction drawing analysis
|
|
5
5
|
Project-URL: Homepage, https://struai.com
|
|
6
6
|
Project-URL: Documentation, https://docs.struai.com/python
|
|
@@ -42,13 +42,20 @@ pip install struai
|
|
|
42
42
|
|
|
43
43
|
## Quick Start
|
|
44
44
|
|
|
45
|
+
Get an API key from `stru.ai` and set it as an environment variable:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
export STRUAI_API_KEY="YOUR_API_KEY"
|
|
49
|
+
```
|
|
50
|
+
|
|
45
51
|
```python
|
|
52
|
+
import os
|
|
46
53
|
from struai import StruAI
|
|
47
54
|
|
|
48
|
-
client = StruAI(api_key="
|
|
55
|
+
client = StruAI(api_key=os.environ["STRUAI_API_KEY"])
|
|
49
56
|
|
|
50
57
|
# Optional: override base URL (http://localhost:8000 or http://localhost:8000/v1)
|
|
51
|
-
client = StruAI(api_key="
|
|
58
|
+
client = StruAI(api_key=os.environ["STRUAI_API_KEY"], base_url="http://localhost:8000")
|
|
52
59
|
```
|
|
53
60
|
|
|
54
61
|
## Tier 1: Raw Detection ($0.02/page)
|
|
@@ -76,6 +83,49 @@ drawing = client.drawings.get("drw_7f8a9b2c")
|
|
|
76
83
|
client.drawings.delete("drw_7f8a9b2c")
|
|
77
84
|
```
|
|
78
85
|
|
|
86
|
+
## HTTP Endpoints (Reference)
|
|
87
|
+
|
|
88
|
+
All endpoints are under `/v1`. Use `Authorization: Bearer <API_KEY>`.
|
|
89
|
+
|
|
90
|
+
Tier 1 (raw detection):
|
|
91
|
+
- `POST /v1/drawings` — multipart form with `file` (PDF) and `page` (1-indexed)
|
|
92
|
+
- `GET /v1/drawings/{id}`
|
|
93
|
+
- `DELETE /v1/drawings/{id}`
|
|
94
|
+
|
|
95
|
+
Tier 2 (graph + search):
|
|
96
|
+
- `POST /v1/projects`
|
|
97
|
+
- `GET /v1/projects`
|
|
98
|
+
- `GET /v1/projects/{id}`
|
|
99
|
+
- `DELETE /v1/projects/{id}`
|
|
100
|
+
- `POST /v1/projects/{project_id}/sheets` — multipart form with `file` + `page`
|
|
101
|
+
- `GET /v1/projects/{project_id}/jobs/{job_id}`
|
|
102
|
+
- `GET /v1/projects/{project_id}/sheets`
|
|
103
|
+
- `GET /v1/projects/{project_id}/sheets/{sheet_id}`
|
|
104
|
+
- `DELETE /v1/projects/{project_id}/sheets/{sheet_id}`
|
|
105
|
+
- `POST /v1/projects/{project_id}/search`
|
|
106
|
+
- `POST /v1/projects/{project_id}/query`
|
|
107
|
+
- `GET /v1/projects/{project_id}/entities`
|
|
108
|
+
- `GET /v1/projects/{project_id}/entities/{entity_id}`
|
|
109
|
+
- `GET /v1/projects/{project_id}/relationships`
|
|
110
|
+
|
|
111
|
+
Example (raw detection):
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
curl -X POST "https://api.stru.ai/v1/drawings" \
|
|
115
|
+
-H "Authorization: Bearer YOUR_API_KEY" \
|
|
116
|
+
-F "file=@structural.pdf" \
|
|
117
|
+
-F "page=4"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Example (project sheet ingestion):
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
curl -X POST "https://api.stru.ai/v1/projects/{project_id}/sheets" \
|
|
124
|
+
-H "Authorization: Bearer YOUR_API_KEY" \
|
|
125
|
+
-F "file=@structural.pdf" \
|
|
126
|
+
-F "page=4"
|
|
127
|
+
```
|
|
128
|
+
|
|
79
129
|
## Tier 2: Graph + Search ($0.15/page)
|
|
80
130
|
|
|
81
131
|
Full pipeline: detection → LLM enrichment → knowledge graph → semantic search.
|
|
@@ -118,9 +168,10 @@ entity = project.entities.get("ent_abc123")
|
|
|
118
168
|
## Async Support
|
|
119
169
|
|
|
120
170
|
```python
|
|
171
|
+
import os
|
|
121
172
|
from struai import AsyncStruAI
|
|
122
173
|
|
|
123
|
-
async with AsyncStruAI(api_key="
|
|
174
|
+
async with AsyncStruAI(api_key=os.environ["STRUAI_API_KEY"]) as client:
|
|
124
175
|
# Tier 1
|
|
125
176
|
result = await client.drawings.analyze("structural.pdf", page=4)
|
|
126
177
|
|
|
@@ -10,13 +10,20 @@ pip install struai
|
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
|
+
Get an API key from `stru.ai` and set it as an environment variable:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
export STRUAI_API_KEY="YOUR_API_KEY"
|
|
17
|
+
```
|
|
18
|
+
|
|
13
19
|
```python
|
|
20
|
+
import os
|
|
14
21
|
from struai import StruAI
|
|
15
22
|
|
|
16
|
-
client = StruAI(api_key="
|
|
23
|
+
client = StruAI(api_key=os.environ["STRUAI_API_KEY"])
|
|
17
24
|
|
|
18
25
|
# Optional: override base URL (http://localhost:8000 or http://localhost:8000/v1)
|
|
19
|
-
client = StruAI(api_key="
|
|
26
|
+
client = StruAI(api_key=os.environ["STRUAI_API_KEY"], base_url="http://localhost:8000")
|
|
20
27
|
```
|
|
21
28
|
|
|
22
29
|
## Tier 1: Raw Detection ($0.02/page)
|
|
@@ -44,6 +51,49 @@ drawing = client.drawings.get("drw_7f8a9b2c")
|
|
|
44
51
|
client.drawings.delete("drw_7f8a9b2c")
|
|
45
52
|
```
|
|
46
53
|
|
|
54
|
+
## HTTP Endpoints (Reference)
|
|
55
|
+
|
|
56
|
+
All endpoints are under `/v1`. Use `Authorization: Bearer <API_KEY>`.
|
|
57
|
+
|
|
58
|
+
Tier 1 (raw detection):
|
|
59
|
+
- `POST /v1/drawings` — multipart form with `file` (PDF) and `page` (1-indexed)
|
|
60
|
+
- `GET /v1/drawings/{id}`
|
|
61
|
+
- `DELETE /v1/drawings/{id}`
|
|
62
|
+
|
|
63
|
+
Tier 2 (graph + search):
|
|
64
|
+
- `POST /v1/projects`
|
|
65
|
+
- `GET /v1/projects`
|
|
66
|
+
- `GET /v1/projects/{id}`
|
|
67
|
+
- `DELETE /v1/projects/{id}`
|
|
68
|
+
- `POST /v1/projects/{project_id}/sheets` — multipart form with `file` + `page`
|
|
69
|
+
- `GET /v1/projects/{project_id}/jobs/{job_id}`
|
|
70
|
+
- `GET /v1/projects/{project_id}/sheets`
|
|
71
|
+
- `GET /v1/projects/{project_id}/sheets/{sheet_id}`
|
|
72
|
+
- `DELETE /v1/projects/{project_id}/sheets/{sheet_id}`
|
|
73
|
+
- `POST /v1/projects/{project_id}/search`
|
|
74
|
+
- `POST /v1/projects/{project_id}/query`
|
|
75
|
+
- `GET /v1/projects/{project_id}/entities`
|
|
76
|
+
- `GET /v1/projects/{project_id}/entities/{entity_id}`
|
|
77
|
+
- `GET /v1/projects/{project_id}/relationships`
|
|
78
|
+
|
|
79
|
+
Example (raw detection):
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
curl -X POST "https://api.stru.ai/v1/drawings" \
|
|
83
|
+
-H "Authorization: Bearer YOUR_API_KEY" \
|
|
84
|
+
-F "file=@structural.pdf" \
|
|
85
|
+
-F "page=4"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Example (project sheet ingestion):
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
curl -X POST "https://api.stru.ai/v1/projects/{project_id}/sheets" \
|
|
92
|
+
-H "Authorization: Bearer YOUR_API_KEY" \
|
|
93
|
+
-F "file=@structural.pdf" \
|
|
94
|
+
-F "page=4"
|
|
95
|
+
```
|
|
96
|
+
|
|
47
97
|
## Tier 2: Graph + Search ($0.15/page)
|
|
48
98
|
|
|
49
99
|
Full pipeline: detection → LLM enrichment → knowledge graph → semantic search.
|
|
@@ -86,9 +136,10 @@ entity = project.entities.get("ent_abc123")
|
|
|
86
136
|
## Async Support
|
|
87
137
|
|
|
88
138
|
```python
|
|
139
|
+
import os
|
|
89
140
|
from struai import AsyncStruAI
|
|
90
141
|
|
|
91
|
-
async with AsyncStruAI(api_key="
|
|
142
|
+
async with AsyncStruAI(api_key=os.environ["STRUAI_API_KEY"]) as client:
|
|
92
143
|
# Tier 1
|
|
93
144
|
result = await client.drawings.analyze("structural.pdf", page=4)
|
|
94
145
|
|
|
@@ -12,13 +12,16 @@ npm install struai
|
|
|
12
12
|
|
|
13
13
|
## Quick Start
|
|
14
14
|
|
|
15
|
+
Get an API key from `stru.ai` and set `STRUAI_API_KEY`.
|
|
16
|
+
|
|
15
17
|
```typescript
|
|
16
18
|
import { StruAI } from 'struai';
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
// Get an API key from stru.ai and set STRUAI_API_KEY
|
|
21
|
+
const client = new StruAI({ apiKey: process.env.STRUAI_API_KEY! });
|
|
19
22
|
|
|
20
23
|
// Optional: override base URL (http://localhost:8000 or http://localhost:8000/v1)
|
|
21
|
-
const local = new StruAI({ apiKey:
|
|
24
|
+
const local = new StruAI({ apiKey: process.env.STRUAI_API_KEY!, baseUrl: 'http://localhost:8000' });
|
|
22
25
|
```
|
|
23
26
|
|
|
24
27
|
## Tier 1: Raw Detection ($0.02/page)
|
|
@@ -68,6 +71,31 @@ const entities = await project.entities.list({ type: 'Component', limit: 50 });
|
|
|
68
71
|
const entity = await project.entities.get('ent_abc123');
|
|
69
72
|
```
|
|
70
73
|
|
|
74
|
+
## HTTP Endpoints (Reference)
|
|
75
|
+
|
|
76
|
+
All endpoints are under `/v1`. Use `Authorization: Bearer <API_KEY>`.
|
|
77
|
+
|
|
78
|
+
Tier 1 (raw detection):
|
|
79
|
+
- `POST /v1/drawings` — multipart form with `file` (PDF) and `page` (1-indexed)
|
|
80
|
+
- `GET /v1/drawings/{id}`
|
|
81
|
+
- `DELETE /v1/drawings/{id}`
|
|
82
|
+
|
|
83
|
+
Tier 2 (graph + search):
|
|
84
|
+
- `POST /v1/projects`
|
|
85
|
+
- `GET /v1/projects`
|
|
86
|
+
- `GET /v1/projects/{id}`
|
|
87
|
+
- `DELETE /v1/projects/{id}`
|
|
88
|
+
- `POST /v1/projects/{project_id}/sheets` — multipart form with `file` + `page`
|
|
89
|
+
- `GET /v1/projects/{project_id}/jobs/{job_id}`
|
|
90
|
+
- `GET /v1/projects/{project_id}/sheets`
|
|
91
|
+
- `GET /v1/projects/{project_id}/sheets/{sheet_id}`
|
|
92
|
+
- `DELETE /v1/projects/{project_id}/sheets/{sheet_id}`
|
|
93
|
+
- `POST /v1/projects/{project_id}/search`
|
|
94
|
+
- `POST /v1/projects/{project_id}/query`
|
|
95
|
+
- `GET /v1/projects/{project_id}/entities`
|
|
96
|
+
- `GET /v1/projects/{project_id}/entities/{entity_id}`
|
|
97
|
+
- `GET /v1/projects/{project_id}/relationships`
|
|
98
|
+
|
|
71
99
|
## License
|
|
72
100
|
|
|
73
101
|
MIT
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ```typescript
|
|
6
6
|
* import { StruAI } from 'struai';
|
|
7
7
|
*
|
|
8
|
-
* const client = new StruAI({ apiKey:
|
|
8
|
+
* const client = new StruAI({ apiKey: process.env.STRUAI_API_KEY });
|
|
9
9
|
*
|
|
10
10
|
* // Tier 1: Raw detection
|
|
11
11
|
* const result = await client.drawings.analyze('structural.pdf', { page: 4 });
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"""StruAI Python SDK - Drawing Analysis API client.
|
|
2
2
|
|
|
3
3
|
Example:
|
|
4
|
+
>>> import os
|
|
4
5
|
>>> from struai import StruAI
|
|
5
6
|
>>>
|
|
6
|
-
>>> client = StruAI(api_key="
|
|
7
|
+
>>> client = StruAI(api_key=os.environ["STRUAI_API_KEY"])
|
|
7
8
|
>>>
|
|
8
9
|
>>> # Tier 1: Raw detection ($0.02/page)
|
|
9
10
|
>>> result = client.drawings.analyze("plans.pdf", page=4)
|
|
@@ -21,7 +21,8 @@ class StruAI(BaseClient):
|
|
|
21
21
|
max_retries: Max retry attempts for failed requests. Default 2.
|
|
22
22
|
|
|
23
23
|
Example:
|
|
24
|
-
>>>
|
|
24
|
+
>>> import os
|
|
25
|
+
>>> client = StruAI(api_key=os.environ["STRUAI_API_KEY"])
|
|
25
26
|
>>>
|
|
26
27
|
>>> # Tier 1: Raw detection
|
|
27
28
|
>>> result = client.drawings.analyze("structural.pdf", page=4)
|
|
@@ -72,7 +73,8 @@ class AsyncStruAI(AsyncBaseClient):
|
|
|
72
73
|
"""Async StruAI client for drawing analysis API.
|
|
73
74
|
|
|
74
75
|
Example:
|
|
75
|
-
>>>
|
|
76
|
+
>>> import os
|
|
77
|
+
>>> async with AsyncStruAI(api_key=os.environ["STRUAI_API_KEY"]) as client:
|
|
76
78
|
... result = await client.drawings.analyze("structural.pdf", page=4)
|
|
77
79
|
...
|
|
78
80
|
... project = await client.projects.create("Building A")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""Version information."""
|
|
2
|
-
__version__ = "1.0.
|
|
2
|
+
__version__ = "1.0.4"
|
struai-1.0.1/CHANGELOG.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# CHANGELOG
|
|
2
|
-
|
|
3
|
-
<!-- version list -->
|
|
4
|
-
|
|
5
|
-
## v1.0.1 (2026-02-04)
|
|
6
|
-
|
|
7
|
-
### Bug Fixes
|
|
8
|
-
|
|
9
|
-
- **ci**: Include publish jobs directly in release workflow
|
|
10
|
-
([`02436eb`](https://github.com/bhoshaga/struai/commit/02436eb55c63cbaa54eac8ca456a54d30125fada))
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## v1.0.0 (2026-02-04)
|
|
14
|
-
|
|
15
|
-
- Initial Release
|
|
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
|