T2D2 SDK
Project description
T2D2 SDK
A Python SDK for seamless integration with the T2D2 platform.
Easily manage projects, assets, and AI-powered inspections for structural health monitoring.
Description
T2D2 SDK is a Python wrapper for the T2D2 API, enabling seamless integration with T2D2 projects and related assets for structural inspection data management.
- Manage projects, images, annotations, drawings, videos, reports, and more
- Upload, download, and organize assets
- Run AI inference and summarize inspection data
- Integrate with T2D2's web platform
Documentation
Full documentation is available at: https://t2d2-ai.github.io/t2d2-sdk/
Table of Contents
Features
- Authentication: API key or email/password
- Project Management: Set, get, and summarize projects
- Asset Management: Upload/download images, drawings, videos, 3D models, and reports
- Annotations: Add, retrieve, and manage annotation classes and annotations
- Regions & Tags: Organize assets by regions and tags
- AI Integration: Run AI inference on images using project models
- Summarization: Summarize images and annotation conditions
- Notifications: Send notifications to users or Slack
Installation
Install the latest version from PyPI:
pip install --upgrade t2d2-sdk
Quickstart
- Sign up for a T2D2 account: Register here
- Get your API key from the T2D2 web app
- Initialize the client:
from t2d2_sdk import T2D2
credentials = {'api_key': '<YOUR_API_KEY>'}
t2d2 = T2D2(credentials)
Usage
Set Project
t2d2.set_project('<PROJECT_ID>')
project_info = t2d2.get_project_info()
print(project_info)
Upload Images
image_paths = ['./images/img1.jpg', './images/img2.jpg']
response = t2d2.upload_images(image_paths)
print(response)
Get Images
images = t2d2.get_images()
for img in images:
print(img['filename'], img['id'])
Add Annotation Class
result = t2d2.add_annotation_class('Crack', color='#FF0000', materials=['Concrete'])
print(result)
Add Annotations to an Image
annotations = [
{
'annotation_class_id': 'class_id',
'coordinates': [[100, 100], [200, 100], [200, 200], [100, 200]],
'attributes': {'severity': 'high'}
}
]
result = t2d2.add_annotations('image_id', annotations)
print(result)
Run AI Inference
result = t2d2.run_ai_inferencer(
image_ids=['image_id1', 'image_id2'],
model_id='model_id',
confidence_threshold=0.6
)
print(result)
For more advanced usage, see the full documentation.
Contributing
Contributions are welcome! Please contact bhiriyur@t2d2.ai for more information.
License
See the LICENSE file for details.
Support
- Documentation: https://t2d2-ai.github.io/t2d2-sdk/
- Email: bhiriyur@t2d2.ai
- T2D2 Web: https://t2d2.ai
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file t2d2_sdk-2.4.6.tar.gz.
File metadata
- Download URL: t2d2_sdk-2.4.6.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70c63265caa47cd15ed0735245bd51fd88207afdd10f15e5a1cfa99b5bd30a20
|
|
| MD5 |
52733a231621a55d7cdf47fe298dd0fd
|
|
| BLAKE2b-256 |
09b159260c053bfa8a02da0cf48ee41417502e318e2a05456a07b6d3d57ba5c7
|
Provenance
The following attestation bundles were made for t2d2_sdk-2.4.6.tar.gz:
Publisher:
publish_pypi.yaml on t2d2-ai/t2d2-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
t2d2_sdk-2.4.6.tar.gz -
Subject digest:
70c63265caa47cd15ed0735245bd51fd88207afdd10f15e5a1cfa99b5bd30a20 - Sigstore transparency entry: 757793623
- Sigstore integration time:
-
Permalink:
t2d2-ai/t2d2-sdk@ffe8385da09f54298a7bacba8cf33e230b436c9a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/t2d2-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yaml@ffe8385da09f54298a7bacba8cf33e230b436c9a -
Trigger Event:
push
-
Statement type:
File details
Details for the file t2d2_sdk-2.4.6-py3-none-any.whl.
File metadata
- Download URL: t2d2_sdk-2.4.6-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
653f3d1dbe77a378ec8da30dc0a70af03b39b15fe6c61ffa44148bb6ed35c163
|
|
| MD5 |
753508c732922728dd69ff6066d9ae8a
|
|
| BLAKE2b-256 |
31fce16a6d48f1a804a13d0cef99cc8808775445ea54c326b26204d40a42953e
|
Provenance
The following attestation bundles were made for t2d2_sdk-2.4.6-py3-none-any.whl:
Publisher:
publish_pypi.yaml on t2d2-ai/t2d2-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
t2d2_sdk-2.4.6-py3-none-any.whl -
Subject digest:
653f3d1dbe77a378ec8da30dc0a70af03b39b15fe6c61ffa44148bb6ed35c163 - Sigstore transparency entry: 757793624
- Sigstore integration time:
-
Permalink:
t2d2-ai/t2d2-sdk@ffe8385da09f54298a7bacba8cf33e230b436c9a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/t2d2-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yaml@ffe8385da09f54298a7bacba8cf33e230b436c9a -
Trigger Event:
push
-
Statement type: