These examples demonstrate authentication, data uploads, and Reality Capture job submission with the Python SDK.
- Python 3.10 or later.
- An iTwin where input and output data can be stored.
- A Bentley service application with access to the iTwin.
Input or output data are stored in iTwins. If you don't have one yet, go here and select "Register new project".
To run the examples, you will also need a client application. To create one, go here and select "Register new". Select "Service" application type and register the application.
After creating the iTwin and the application, change to the python_sdk/examples directory and configure the environment for the examples.
Copy template.env to .env, then provide values for ITWIN_ID, CLIENT_ID, and CLIENT_SECRET.
-
From the
python_sdkdirectory, create a new virtual environment.python -m venv .venv
-
Activate the environment.
Windows Command Prompt:
.venv\Scripts\activate.bat
Windows PowerShell:
.venv\Scripts\Activate.ps1
Linux or macOS:
source .venv/bin/activate -
From the
python_sdkdirectory, install the SDK and the dependencies required by the examples.python -m pip install -e ".[dev]" -
Alternatively, install a wheel from the GitHub releases page together with the dependency required by the examples.
python -m pip install <path-to-reality_capture_sdk.whl> python-dotenv
From the python_sdk/examples directory, run one of the following commands:
-
Upload & download reality data example
python example_upload_reality_data.py
-
Upload & download bucket data example
python example_upload_bucket_data.py
-
Modeling Reconstruction example
python example_modeling.py