Imports and exports (impex)¶
Operations on energy imports and exports. Available on the client as client.impex.
impex.create¶
async def create(scenario_guid: str, request: ImportExportRequestDtoV2) -> ImportExportResponseDtoV2
Create a new import/export in a scenario.
REST operation: POST /sympheny-app/v2_1/scenario/{scenarioGuid}/impex
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
scenario_guid |
str |
yes | GUID of the scenario. |
request |
ImportExportRequestDtoV2 |
yes | Request body. |
Returns: ImportExportResponseDtoV2
async with AsyncSympheny(username, password) as client:
impex = await client.impex.create(scenario_guid, request)
with Sympheny(username, password) as client:
impex = client.impex.create(scenario_guid, request)
impex.list¶
async def list(scenario_guid: str) -> list[ImportExportResponseDtoV2]
List the imports/exports of a scenario.
REST operation: GET /sympheny-app/v2/scenarios/{scenarioGuid}/impexes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
scenario_guid |
str |
yes | GUID of the scenario. |
Returns: list of ImportExportResponseDtoV2
async with AsyncSympheny(username, password) as client:
impexes = await client.impex.list(scenario_guid)
with Sympheny(username, password) as client:
impexes = client.impex.list(scenario_guid)
impex.get¶
async def get(
impex_type: Type1,
impex_guid: str,
*,
scenario_variant_guid: str | None = None,
) -> ImportExportResponseDtoV2
Get import/export details.
REST operation: GET /sympheny-app/v2/impex/{type}/{guid}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
impex_type |
Type1 |
yes | Whether the record is an import or an export. |
impex_guid |
str |
yes | GUID of the impex. |
scenario_variant_guid |
str, optional |
no | GUID of the scenario variant to read from. |
Returns: ImportExportResponseDtoV2
async with AsyncSympheny(username, password) as client:
impex = await client.impex.get(impex_type, impex_guid)
with Sympheny(username, password) as client:
impex = client.impex.get(impex_type, impex_guid)
impex.update¶
async def update(impex_guid: str, request: ImportExportResponseDtoV2) -> ImportExportResponseDtoV2
Update an import/export.
REST operation: PUT /sympheny-app/v2_1/scenarios/impex/{guid}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
impex_guid |
str |
yes | GUID of the impex. |
request |
ImportExportResponseDtoV2 |
yes | Request body. |
Returns: ImportExportResponseDtoV2
async with AsyncSympheny(username, password) as client:
impex = await client.impex.update(impex_guid, request)
with Sympheny(username, password) as client:
impex = client.impex.update(impex_guid, request)
impex.delete¶
async def delete(impex_type: Type1, impex_guid: str) -> Status
Delete an import/export.
REST operation: DELETE /sympheny-app/impex/{type}/{guid}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
impex_type |
Type1 |
yes | Whether the record is an import or an export. |
impex_guid |
str |
yes | GUID of the impex. |
Returns: Status
async with AsyncSympheny(username, password) as client:
status = await client.impex.delete(impex_type, impex_guid)
with Sympheny(username, password) as client:
status = client.impex.delete(impex_type, impex_guid)