BoaviztAPI SDK for Python applications.
Project description
boaviztapi-sdk
🎯 Retrieving the impacts of digital elements.
This is a quick demo, to see full documentation click here
Features
Bellow a list of all available features.
👄 Verbose
Verbose is an HTTP parameter. If set at true :
- Shows the impacts of each component
- Shows the value used for each attribute
\"attribute\": {\"value\": \"value\", \"unit\": \"unit\", \"status\": \"Status\", \"source\": \"Source\", \"min\":\"min\", \"max\":\"max\", \"significant_figures\":\"significant_figures\"}
🔨 Embedded
- Embedded impacts are the impacts occurring during raw material extraction, manufacture, distribution and end of life
- When end of life is not taken into account, we specified it in the
warnings
🔌 Usage
Usage impacts are assessed by multiplying :
-
a duration
-
an impact factor
-
an electrical consumption
⏲ Duration
Usage impacts can be given as a router parameter, in hours.
If no duration is given, the impact is assess for the all life duration of the asset.
✖️ Impact factors
- Impact factors can be given : \"usage\":{\"elec_factors\":{[criteria]: 0.38}}
-
Impact factors can be retrieved from : \"usage\":{\"usage_location\": \"FRA\"}.
-
See the list of locations : /v1/utils/country_code*
⚡ Electrical consumption
⏺️ Given
- Electrical consumption can be given for one hour (average) \"usage\":{\"avg_power\": 1}.
📈 Modeled
- Electrical consumption can be retrieved from consumption profile using usage:{time_workload: 50}.
📋 Archetype
- In some cases, default electrical consumption can be taken from the archetype
🔃 Auto-complete & 📋 Archetype
The API will complete the missing attributes in a request with a completion function or with values
taken from the archetype specified in the route parameter.
⏬ Allocation
- Usage impacts are assessed on the duration given in route parameter
- Embedded impacts are allocated linearly on the duration given in parameter
embedded_impact = impact * (duration/life_duration)
If no duration is given, the life_duration (`hours_life_time) of the asset is used.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 2.2.0
- Package version: 2.2.0
- Generator version: 7.23.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python 3.10+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/boavizta/boaviztapi.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/boavizta/boaviztapi.git)
Then import the package:
import boaviztapi_sdk
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import boaviztapi_sdk
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import boaviztapi_sdk
from boaviztapi_sdk.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = boaviztapi_sdk.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with boaviztapi_sdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = boaviztapi_sdk.CloudApi(api_client)
provider = 'aws' # str | (optional) (default to 'aws')
instance_type = 'a1.4xlarge' # str | (optional) (default to 'a1.4xlarge')
try:
# Get Archetype Config
api_response = api_instance.get_archetype_config_v1_cloud_instance_instance_config_get(provider=provider, instance_type=instance_type)
print("The response of CloudApi->get_archetype_config_v1_cloud_instance_instance_config_get:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling CloudApi->get_archetype_config_v1_cloud_instance_instance_config_get: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description |
|---|---|---|---|
| CloudApi | get_archetype_config_v1_cloud_instance_instance_config_get | GET /v1/cloud/instance/instance_config | Get Archetype Config |
| CloudApi | instance_cloud_impact_from_configuration_v1_cloud_instance_post | POST /v1/cloud/instance | Instance Cloud Impact From Configuration |
| CloudApi | instance_cloud_impact_from_model_v1_cloud_instance_get | GET /v1/cloud/instance | Instance Cloud Impact From Model |
| CloudApi | server_get_all_archetype_name_v1_cloud_instance_all_instances_get | GET /v1/cloud/instance/all_instances | Server Get All Archetype Name |
| CloudApi | server_get_all_provider_name_v1_cloud_instance_all_providers_get | GET /v1/cloud/instance/all_providers | Server Get All Provider Name |
| ComponentApi | all_routes_v1_component_all_get | GET /v1/component/all | All Routes |
| ComponentApi | case_all_archetype_name_v1_component_case_archetype_get | GET /v1/component/case/archetype | Case All Archetype Name |
| ComponentApi | case_archetype_config_v1_component_case_archetype_config_get | GET /v1/component/case/archetype_config | Case Archetype Config |
| ComponentApi | case_impact_bottom_up_from_configuration_v1_component_case_post | POST /v1/component/case | Case Impact Bottom Up From Configuration |
| ComponentApi | case_impact_bottom_up_from_model_v1_component_case_get | GET /v1/component/case | Case Impact Bottom Up From Model |
| ComponentApi | cpu_all_archetype_name_v1_component_cpu_archetype_get | GET /v1/component/cpu/archetype | Cpu All Archetype Name |
| ComponentApi | cpu_archetype_config_v1_component_cpu_archetype_config_get | GET /v1/component/cpu/archetype_config | Cpu Archetype Config |
| ComponentApi | cpu_impact_bottom_up_from_configuration_v1_component_cpu_post | POST /v1/component/cpu | Cpu Impact Bottom Up From Configuration |
| ComponentApi | cpu_impact_bottom_up_from_model_v1_component_cpu_get | GET /v1/component/cpu | Cpu Impact Bottom Up From Model |
| ComponentApi | gpu_all_archetype_name_v1_component_gpu_archetype_get | GET /v1/component/gpu/archetype | Gpu All Archetype Name |
| ComponentApi | gpu_archetype_config_v1_component_gpu_archetype_config_get | GET /v1/component/gpu/archetype_config | Gpu Archetype Config |
| ComponentApi | gpu_impact_bottom_up_from_configuration_v1_component_gpu_post | POST /v1/component/gpu | Gpu Impact Bottom Up From Configuration |
| ComponentApi | gpu_impact_bottom_up_from_model_v1_component_gpu_get | GET /v1/component/gpu | Gpu Impact Bottom Up From Model |
| ComponentApi | hdd_all_archetype_name_v1_component_hdd_archetype_get | GET /v1/component/hdd/archetype | Hdd All Archetype Name |
| ComponentApi | hdd_archetype_config_v1_component_hdd_archetype_config_get | GET /v1/component/hdd/archetype_config | Hdd Archetype Config |
| ComponentApi | hdd_disk_impact_bottom_up_from_configuration_v1_component_hdd_post | POST /v1/component/hdd | Hdd Disk Impact Bottom Up From Configuration |
| ComponentApi | hdd_disk_impact_bottom_up_from_model_v1_component_hdd_get | GET /v1/component/hdd | Hdd Disk Impact Bottom Up From Model |
| ComponentApi | motherboard_all_archetype_name_v1_component_motherboard_archetype_get | GET /v1/component/motherboard/archetype | Motherboard All Archetype Name |
| ComponentApi | motherboard_archetype_config_v1_component_motherboard_archetype_config_get | GET /v1/component/motherboard/archetype_config | Motherboard Archetype Config |
| ComponentApi | motherboard_impact_bottom_up_from_configuration_v1_component_motherboard_post | POST /v1/component/motherboard | Motherboard Impact Bottom Up From Configuration |
| ComponentApi | motherboard_impact_bottom_up_from_model_v1_component_motherboard_get | GET /v1/component/motherboard | Motherboard Impact Bottom Up From Model |
| ComponentApi | power_supply_all_archetype_name_v1_component_power_supply_archetype_get | GET /v1/component/power_supply/archetype | Power Supply All Archetype Name |
| ComponentApi | power_supply_archetype_config_v1_component_power_supply_archetype_config_get | GET /v1/component/power_supply/archetype_config | Power Supply Archetype Config |
| ComponentApi | power_supply_impact_bottom_up_from_configuration_v1_component_power_supply_post | POST /v1/component/power_supply | Power Supply Impact Bottom Up From Configuration |
| ComponentApi | power_supply_impact_bottom_up_from_model_v1_component_power_supply_get | GET /v1/component/power_supply | Power Supply Impact Bottom Up From Model |
| ComponentApi | ram_all_archetype_name_v1_component_ram_archetype_get | GET /v1/component/ram/archetype | Ram All Archetype Name |
| ComponentApi | ram_archetype_config_v1_component_ram_archetype_config_get | GET /v1/component/ram/archetype_config | Ram Archetype Config |
| ComponentApi | ram_impact_bottom_up_from_configuration_v1_component_ram_post | POST /v1/component/ram | Ram Impact Bottom Up From Configuration |
| ComponentApi | ram_impact_bottom_up_from_model_v1_component_ram_get | GET /v1/component/ram | Ram Impact Bottom Up From Model |
| ComponentApi | ssd_all_archetype_name_v1_component_ssd_archetype_get | GET /v1/component/ssd/archetype | Ssd All Archetype Name |
| ComponentApi | ssd_archetype_config_v1_component_ssd_archetype_config_get | GET /v1/component/ssd/archetype_config | Ssd Archetype Config |
| ComponentApi | ssd_disk_impact_bottom_up_from_configuration_v1_component_ssd_post | POST /v1/component/ssd | Ssd Disk Impact Bottom Up From Configuration |
| ComponentApi | ssd_disk_impact_bottom_up_from_model_v1_component_ssd_get | GET /v1/component/ssd | Ssd Disk Impact Bottom Up From Model |
| ConsumptionProfileApi | cpu_consumption_profile_v1_consumption_profile_cpu_post | POST /v1/consumption_profile/cpu | Cpu Consumption Profile |
| DefaultApi | welcome_page_get | GET / | Welcome Page |
| IotApi | get_archetype_config_v1_iot_iot_device_archetype_config_get | GET /v1/iot/iot_device/archetype_config | Get Archetype Config |
| IotApi | iot_device_get_all_archetype_name_v1_iot_iot_device_archetypes_get | GET /v1/iot/iot_device/archetypes | Iot Device Get All Archetype Name |
| IotApi | iot_device_impact_from_configuration_v1_iot_iot_device_post | POST /v1/iot/iot_device | Iot Device Impact From Configuration |
| IotApi | iot_device_impact_from_model_v1_iot_iot_device_get | GET /v1/iot/iot_device | Iot Device Impact From Model |
| PeripheralApi | external_hdd_get_all_archetype_name_v1_peripheral_external_hdd_archetypes_get | GET /v1/peripheral/external_hdd/archetypes | External Hdd Get All Archetype Name |
| PeripheralApi | external_hdd_get_archetype_config_v1_peripheral_external_hdd_archetype_config_get | GET /v1/peripheral/external_hdd/archetype_config | External Hdd Get Archetype Config |
| PeripheralApi | external_hdd_impact_from_configuration_v1_peripheral_external_hdd_post | POST /v1/peripheral/external_hdd | External Hdd Impact From Configuration |
| PeripheralApi | external_hdd_impact_from_model_v1_peripheral_external_hdd_get | GET /v1/peripheral/external_hdd | External Hdd Impact From Model |
| PeripheralApi | external_ssd_get_all_archetype_name_v1_peripheral_external_ssd_archetypes_get | GET /v1/peripheral/external_ssd/archetypes | External Ssd Get All Archetype Name |
| PeripheralApi | external_ssd_get_archetype_config_v1_peripheral_external_ssd_archetype_config_get | GET /v1/peripheral/external_ssd/archetype_config | External Ssd Get Archetype Config |
| PeripheralApi | external_ssd_impact_from_configuration_v1_peripheral_external_ssd_post | POST /v1/peripheral/external_ssd | External Ssd Impact From Configuration |
| PeripheralApi | external_ssd_impact_from_model_v1_peripheral_external_ssd_get | GET /v1/peripheral/external_ssd | External Ssd Impact From Model |
| PeripheralApi | monitor_get_all_archetype_name_v1_peripheral_monitor_archetypes_get | GET /v1/peripheral/monitor/archetypes | Monitor Get All Archetype Name |
| PeripheralApi | monitor_get_archetype_config_v1_peripheral_monitor_archetype_config_get | GET /v1/peripheral/monitor/archetype_config | Monitor Get Archetype Config |
| PeripheralApi | monitor_impact_from_configuration_v1_peripheral_monitor_post | POST /v1/peripheral/monitor | Monitor Impact From Configuration |
| PeripheralApi | monitor_impact_from_model_v1_peripheral_monitor_get | GET /v1/peripheral/monitor | Monitor Impact From Model |
| PeripheralApi | peripheral_get_all_categories_v1_peripheral_all_get | GET /v1/peripheral/all | Peripheral Get All Categories |
| PeripheralApi | usb_stick_get_all_archetype_name_v1_peripheral_usb_stick_archetypes_get | GET /v1/peripheral/usb_stick/archetypes | Usb Stick Get All Archetype Name |
| PeripheralApi | usb_stick_get_archetype_config_v1_peripheral_usb_stick_archetype_config_get | GET /v1/peripheral/usb_stick/archetype_config | Usb Stick Get Archetype Config |
| PeripheralApi | usb_stick_impact_from_configuration_v1_peripheral_usb_stick_post | POST /v1/peripheral/usb_stick | Usb Stick Impact From Configuration |
| PeripheralApi | usb_stick_impact_from_model_v1_peripheral_usb_stick_get | GET /v1/peripheral/usb_stick | Usb Stick Impact From Model |
| PeripheralApi | vr_controller_get_all_archetype_name_v1_peripheral_vr_controller_archetypes_get | GET /v1/peripheral/vr_controller/archetypes | Vr Controller Get All Archetype Name |
| PeripheralApi | vr_controller_get_archetype_config_v1_peripheral_vr_controller_archetype_config_get | GET /v1/peripheral/vr_controller/archetype_config | Vr Controller Get Archetype Config |
| PeripheralApi | vr_controller_impact_from_configuration_v1_peripheral_vr_controller_post | POST /v1/peripheral/vr_controller | Vr Controller Impact From Configuration |
| PeripheralApi | vr_controller_impact_from_model_v1_peripheral_vr_controller_get | GET /v1/peripheral/vr_controller | Vr Controller Impact From Model |
| ServerApi | get_archetype_config_v1_server_archetype_config_get | GET /v1/server/archetype_config | Get Archetype Config |
| ServerApi | server_get_all_archetype_name_v1_server_archetypes_get | GET /v1/server/archetypes | Server Get All Archetype Name |
| ServerApi | server_impact_from_configuration_v1_server_post | POST /v1/server/ | Server Impact From Configuration |
| ServerApi | server_impact_from_model_v1_server_get | GET /v1/server/ | Server Impact From Model |
| TerminalApi | box_get_all_archetype_name_v1_terminal_box_archetypes_get | GET /v1/terminal/box/archetypes | Box Get All Archetype Name |
| TerminalApi | box_get_archetype_config_v1_terminal_box_archetype_config_get | GET /v1/terminal/box/archetype_config | Box Get Archetype Config |
| TerminalApi | box_impact_from_configuration_v1_terminal_box_post | POST /v1/terminal/box | Box Impact From Configuration |
| TerminalApi | box_impact_from_model_v1_terminal_box_get | GET /v1/terminal/box | Box Impact From Model |
| TerminalApi | desktop_get_all_archetype_name_v1_terminal_desktop_archetypes_get | GET /v1/terminal/desktop/archetypes | Desktop Get All Archetype Name |
| TerminalApi | desktop_get_archetype_config_v1_terminal_desktop_archetype_config_get | GET /v1/terminal/desktop/archetype_config | Desktop Get Archetype Config |
| TerminalApi | desktop_impact_from_configuration_v1_terminal_desktop_post | POST /v1/terminal/desktop | Desktop Impact From Configuration |
| TerminalApi | desktop_impact_from_model_v1_terminal_desktop_get | GET /v1/terminal/desktop | Desktop Impact From Model |
| TerminalApi | laptop_get_all_archetype_name_v1_terminal_laptop_archetypes_get | GET /v1/terminal/laptop/archetypes | Laptop Get All Archetype Name |
| TerminalApi | laptop_get_archetype_config_v1_terminal_laptop_archetype_config_get | GET /v1/terminal/laptop/archetype_config | Laptop Get Archetype Config |
| TerminalApi | laptop_impact_from_configuration_v1_terminal_laptop_post | POST /v1/terminal/laptop | Laptop Impact From Configuration |
| TerminalApi | laptop_impact_from_model_v1_terminal_laptop_get | GET /v1/terminal/laptop | Laptop Impact From Model |
| TerminalApi | smartphone_get_all_archetype_name_v1_terminal_smartphone_archetypes_get | GET /v1/terminal/smartphone/archetypes | Smartphone Get All Archetype Name |
| TerminalApi | smartphone_get_archetype_config_v1_terminal_smartphone_archetype_config_get | GET /v1/terminal/smartphone/archetype_config | Smartphone Get Archetype Config |
| TerminalApi | smartphone_impact_from_configuration_v1_terminal_smartphone_post | POST /v1/terminal/smartphone | Smartphone Impact From Configuration |
| TerminalApi | smartphone_impact_from_model_v1_terminal_smartphone_get | GET /v1/terminal/smartphone | Smartphone Impact From Model |
| TerminalApi | tablet_get_all_archetype_name_v1_terminal_tablet_archetypes_get | GET /v1/terminal/tablet/archetypes | Tablet Get All Archetype Name |
| TerminalApi | tablet_get_archetype_config_v1_terminal_tablet_archetype_config_get | GET /v1/terminal/tablet/archetype_config | Tablet Get Archetype Config |
| TerminalApi | tablet_impact_from_configuration_v1_terminal_tablet_post | POST /v1/terminal/tablet | Tablet Impact From Configuration |
| TerminalApi | tablet_impact_from_model_v1_terminal_tablet_get | GET /v1/terminal/tablet | Tablet Impact From Model |
| TerminalApi | television_get_all_archetype_name_v1_terminal_television_archetypes_get | GET /v1/terminal/television/archetypes | Television Get All Archetype Name |
| TerminalApi | television_get_archetype_config_v1_terminal_television_archetype_config_get | GET /v1/terminal/television/archetype_config | Television Get Archetype Config |
| TerminalApi | television_impact_from_configuration_v1_terminal_television_post | POST /v1/terminal/television | Television Impact From Configuration |
| TerminalApi | television_impact_from_model_v1_terminal_television_get | GET /v1/terminal/television | Television Impact From Model |
| TerminalApi | terminal_get_all_categories_v1_terminal_all_get | GET /v1/terminal/all | Terminal Get All Categories |
| TerminalApi | vr_headset_get_all_archetype_name_v1_terminal_vr_headset_archetypes_get | GET /v1/terminal/vr_headset/archetypes | Vr Headset Get All Archetype Name |
| TerminalApi | vr_headset_get_archetype_config_v1_terminal_vr_headset_archetype_config_get | GET /v1/terminal/vr_headset/archetype_config | Vr Headset Get Archetype Config |
| TerminalApi | vr_headset_impact_from_configuration_v1_terminal_vr_headset_post | POST /v1/terminal/vr_headset | Vr Headset Impact From Configuration |
| TerminalApi | vr_headset_impact_from_model_v1_terminal_vr_headset_get | GET /v1/terminal/vr_headset | Vr Headset Impact From Model |
| UtilsApi | name_to_cpu_v1_utils_name_to_cpu_get | GET /v1/utils/name_to_cpu | Name To Cpu |
| UtilsApi | utils_get_all_case_type_v1_utils_case_type_get | GET /v1/utils/case_type | Utils Get All Case Type |
| UtilsApi | utils_get_all_countries_v1_utils_country_code_get | GET /v1/utils/country_code | Utils Get All Countries |
| UtilsApi | utils_get_all_cpu_family_v1_utils_cpu_family_get | GET /v1/utils/cpu_family | Utils Get All Cpu Family |
| UtilsApi | utils_get_all_cpu_model_range_v1_utils_cpu_model_range_get | GET /v1/utils/cpu_model_range | Utils Get All Cpu Model Range |
| UtilsApi | utils_get_all_cpu_name_v1_utils_cpu_name_get | GET /v1/utils/cpu_name | Utils Get All Cpu Name |
| UtilsApi | utils_get_all_impacts_criteria_v1_utils_impact_criteria_get | GET /v1/utils/impact_criteria | Utils Get All Impacts Criteria |
| UtilsApi | utils_get_all_ram_manufacturer_v1_utils_ram_manufacturer_get | GET /v1/utils/ram_manufacturer | Utils Get All Ram Manufacturer |
| UtilsApi | utils_get_all_ssd_manufacturer_v1_utils_ssd_manufacturer_get | GET /v1/utils/ssd_manufacturer | Utils Get All Ssd Manufacturer |
| UtilsApi | utils_get_cloud_regions_v1_utils_cloud_regions_get | GET /v1/utils/cloud_regions | Utils Get Cloud Regions |
| UtilsApi | version_v1_utils_version_get | GET /v1/utils/version | Version |
Documentation For Models
- Box
- CPU
- Case
- Cloud
- ConfigurationServer
- ConsumptionProfileCPU
- Desktop
- Disk
- ElecFactors
- ExternalHDD
- ExternalSSD
- FunctionalBlock
- GPU
- HTTPValidationError
- IoT
- Laptop
- LocationInner
- ModelServer
- Monitor
- Motherboard
- PowerSupply
- RAM
- Server
- Smartphone
- Tablet
- Television
- TimeWorkload
- Usage
- UsageCloud
- UsageServer
- UsbStick
- ValidationError
- VrController
- VrHeadset
- WorkloadPower
- WorkloadTime
Documentation For Authorization
Endpoints do not require authorization.
Author
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
File details
Details for the file boaviztapi_sdk-2.2.0.tar.gz.
File metadata
- Download URL: boaviztapi_sdk-2.2.0.tar.gz
- Upload date:
- Size: 96.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05daaa2d49500ad1a146a2dfeefcfcb910f92c0b07c9f501d36b3c61fc323bf0
|
|
| MD5 |
0997f693ad9c268573a964b246a13ba6
|
|
| BLAKE2b-256 |
f7cdca05ad159fa8cf8f426c4fa49b2ed1cfb6306124b83c6f3404ccd406b52b
|