Migration guide
For a list of enhancements and bugfixes, refer to changelog.
From version 0.69.0 to version 1.*
Breaking changes
Python module usage
If you were using pyxelrest as a python module, you will now have to import your functions via the submodule corresponding to your REST API configuration.
The name of the function is not prefixed by the REST API configuration name anymore, requiring to remove the prefix from your function calls in your code.
Previous (0.69.0)
import pyxelrest
configuration = {'petstore': {'open_api': {'definition': 'https://petstore.swagger.io/v2/swagger.json'}}}
pyxelrest.load(configuration)
import pyxelrest.user_defined_functions
user = pyxelrest.user_defined_functions.petstore_getUserByName("test")
New (1.0.0)
import pyxelrest
configuration = {'petstore': {'open_api': {'definition': 'https://petstore.swagger.io/v2/swagger.json'}}}
pyxelrest.load(configuration)
from pyxelrest.generated import petstore
user = petstore.getUserByName("test")
Services configuration changes
REST API configuration will most likely not be compatible anymore due to the changes in the following section:
udf
udf section has been replaced by a formulas section.
We strongly advise to check out the new dynamic_array formulas if your Microsoft Excel version supports it.
Otherwise:
-
sync_auto_expandreturn_typecorresponds tolegacy_arraysub-section withlock_excelset totrueand prefix set to{name}_Previous (0.69.0)
yaml udf: return_types: - sync_auto_expandNew (1.0.0)
yaml formulas: legacy_array: lock_excel: true prefix: "{name}_" -
async_auto_expandreturn_typecorresponds tolegacy_arraysub-section withlock_excelset tofalseand prefix set to{name}_Previous (0.69.0)
yaml udf: return_types: - async_auto_expandNew (1.0.0)
yaml formulas: legacy_array: lock_excel: false prefix: "{name}_" -
vba_compatiblereturn_type(in case there was anotherreturn_typeas well) corresponds tovba_compatiblesub-section withlock_excelset totruePrevious (0.69.0)
yaml udf: return_types: - ... - vba_compatibleNew (1.0.0)
yaml formulas: vba_compatible: lock_excel: true -
vba_compatiblereturn_type(in case it was the onlyreturn_type) corresponds tovba_compatiblesub-section withlock_excelset totrueand prefix set to{name}_Previous (0.69.0)
yaml udf: return_types: - vba_compatibleNew (1.0.0)
yaml formulas: vba_compatible: lock_excel: true prefix: "{name}_"
shift_result
shift_result is not an option anymore.
As a result, formulas results will start from the first cell (results will not be shifted from one column to the right).
If you were using shift_result: true, this change will impact your existing Microsoft Excel workbooks
methods
methods option is now selected_methods option within open_api section.
Previous (0.69.0)
methods:
- get
New (1.0.0)
open_api:
selected_methods:
- get
headers
headers section is now expected as a sub-section within network section.
Previous (0.69.0)
headers:
X-Custom: "This is a value"
New (1.0.0)
network:
headers:
X-Custom: "This is a value"
service_host
service_host option within open_api section is now host option within network section.
Previous (0.69.0)
open_api:
service_host: "my_reverse_proxy/api"
New (1.0.0)
network:
host: "my_reverse_proxy/api"
udf_name_prefix
udf_name_prefix option was replaced by prefix option per formula type.
Previous (0.69.0)
udf_name_prefix: "my_prefix"
New (1.0.0)
formulas:
dynamic_array:
prefix: "my_prefix"
caching
caching option was replaced by cache option per formula type.
max_nb_results has been renamed to size and result_caching_time to duration.
Previous (0.69.0)
caching:
max_nb_results: 100
result_caching_time: 1
New (1.0.0)
formulas:
dynamic_array:
cache:
size: 100
duration: 1
definition_retrieval_auths
-
oauth2_implicitoauth2_auth_urlis nowauthorization_urlwithinoauth2implicitsectionPrevious (0.69.0)
yaml open_api: definition_retrieval_auths: oauth2_implicit: oauth2_auth_url: "https://authorization_url"New (1.0.0)
yaml open_api: definition_retrieval_auths: oauth2: implicit: authorization_url: "https://authorization_url" -
oauth2_access_codeoauth2_auth_urlis nowauthorization_urlandoauth2_token_urlis nowtoken_urlwithinoauth2access_codesectionPrevious (0.69.0)
yaml open_api: definition_retrieval_auths: oauth2_access_code: oauth2_auth_url: "https://authorization_url" oauth2_token_url: "https://token_url"New (1.0.0)
yaml open_api: definition_retrieval_auths: oauth2: access_code: authorization_url: "https://authorization_url" token_url: "https://token_url" -
oauth2_passwordoauth2_token_urlis nowtoken_urlwithinoauth2passwordsectionPrevious (0.69.0)
yaml open_api: definition_retrieval_auths: oauth2_password: oauth2_token_url: "https://token_url"New (1.0.0)
yaml open_api: definition_retrieval_auths: oauth2: password: token_url: "https://token_url" -
oauth2_applicationoauth2_token_urlis nowtoken_urlwithinoauth2applicationsectionPrevious (0.69.0)
yaml open_api: definition_retrieval_auths: oauth2_application: oauth2_token_url: "https://token_url"New (1.0.0)
yaml open_api: definition_retrieval_auths: oauth2: application: token_url: "https://token_url" -
api_keynameis nowquery_parameter_nameifinwasqueryPrevious (0.69.0)
yaml open_api: definition_retrieval_auths: api_key: in: "query" name: "param_name"New (1.0.0)
yaml open_api: definition_retrieval_auths: api_key: query_parameter_name: "param_name" -
api_keynameis nowheader_nameifinwasheaderPrevious (0.69.0)
yaml open_api: definition_retrieval_auths: api_key: in: "header" name: "x-api-key"New (1.0.0)
yaml open_api: definition_retrieval_auths: api_key: header_name: "x-api-key"
Add-in installation script
--path_to_up_to_date_configurationparameter does not exists anymore. Use the registry key to provide it instead.--scripts_directoryparameter does not exist anymore.
Previous (0.69.0)
python pyxelrest_install_addin.py --add_in_directory ADD_IN_DIR --scripts_directory SCRIPTS_DIR --path_to_up_to_date_configuration PATH_TO_CONFS
New (1.0.0)
pyxelrest_install_addin.exe --source ADD_IN_DIR
For more information on what the new script has to offer, refer to the custom installation documentation