{
"info": {
"author": "Engie",
"author_email": "colin.bounouar@engie.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: Microsoft :: Windows :: Windows 7",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7"
],
"description": "# Access REST APIs from Microsoft Excel using User Defined Functions (UDF) #\n\nPyxelRest allow you to query [Swagger 2.0/OpenAPI](https://www.openapis.org) REST APIs using Microsoft Excel User Defined Functions.\n\n1. [Usage](#Usage)\n2. [Installation](#Installation)\n3. [Configuration](#Configuration)\n\n## Usage ##\n\nOnce installed, open Microsoft Excel and UDFs from configured services will be available.\n\n\n\n\n\nUDFs are automatically updated on Microsoft Excel start and on Configuration update.\n\nUpdating UDFs without restarting Microsoft Excel or updating configuration can be done thanks to the ``Update Functions`` button within ``PyxelRest`` tab.\n\n\n\nPyxelRest itself can automatically stay up to date. \nThe updater make sure that the python module, the Microsoft Excel add-in and the services configuration stays up to date.\n\n\n\n## Installation ##\n\n### Pre requisites ###\n\n* [Python >= 2.7](https://www.python.org/downloads/) must be installed.\n* [Microsoft Excel >= 2010](https://products.office.com/en-us/excel) must be installed.\n* [Microsoft .NET Framework >= 4.5.2](http://go.microsoft.com/fwlink/?linkid=328856) must be installed.\n\n### User installation (using PIP) ###\n\n1. Within Microsoft Excel, `Trust access to the VBA project object model` should be enabled.\n> File > Options > Trust Center > Trust Center Settings > Macro Settings\n2. Microsoft Excel must be closed while executing the following command:\n\n```bash\npip install pyxelrest\n```\n\n#### User add-in installation ####\n\nOne python module is installed, a script is available to install the Microsoft Excel add-in.\n\nThe add-in is not installed at the same time as the module because:\n * It may prompt the user for installation.\n * pyxelrest can be used as a python module without the need for the add-in.\n\nConsidering %scripts_dir% as the directory containing python scripts (Scripts folder within your virtual environment).\n\nInstall Microsoft Excel add-in by executing the following command:\n\n```bash\npython %scripts_dir%\\pyxelrest_install_addin.py\n```\n\nThe following options are available when launching this script:\n\n
\n | \n | Description | \n Mandatory | \n Possible values | \n \n \n | open_api | \n Dictionary describing the OpenAPI definition. Refer to OpenAPI section for more information. | \n Mandatory | \n | \n
\n \n | description | \n A small description of this service. To be displayed within Microsoft Excel add-in services configuration screen. | \n Optional | \n | \n
\n \n | proxies | \n Proxies that should be used to reach service. This is a dictionary where keys are the scheme (http or https) and/or no_proxy. If the key is a scheme then the value should be the proxy URL. Otherwise the value should be the URL for which proxies should be ignored. For more details refer to http://docs.python-requests.org/en/master/user/advanced/#proxies | \n Optional | \n | \n
\n \n | methods | \n List of services methods to be exposed as UDFs. Retrieve all standards HTTP methods by default (get, post, put, delete, patch, options, head). | \n Optional | \n get, post, put, delete, patch, options, head | \n
\n \n | oauth2 | \n Dictionary containing OAuth2 related settings. Refer to OAuth 2 section for more information. | \n Optional | \n | \n
\n \n | api_key | \n User API Key. | \n Optional | \n | \n
\n \n | basic | \n Dictionary containing Basic authentication related settings. Refer to Basic section for more information. | \n Optional | \n | \n
\n \n | ntlm | \n Dictionary containing NTLM related settings. Refer to NTLM section for more information. | \n Optional | \n | \n
\n \n | udf | \n Dictionary containing user defined function related settings. Refer to User Defined Function section for more information. | \n Optional | \n | \n
\n \n | max_retries | \n Maximum number of time a request should be retried before considered as failed. 5 by default. | \n Optional | \n Any positive integer value | \n
\n \n | headers | \n Dictionary containing headers were key is the name of the header that should be sent with every request sent to this service. | \n Optional | \n | \n
\n \n | connect_timeout | \n Maximum amount of time, in seconds, to wait when trying to reach the service. Wait for 1 second by default. For more details refer to http://docs.python-requests.org/en/master/user/advanced/#timeouts | \n Optional | \n any float value | \n
\n \n | read_timeout | \n Maximum amount of time, in seconds, to wait when requesting a service. Infinite wait by default. For more details refer to http://docs.python-requests.org/en/master/user/advanced/#timeouts | \n Optional | \n any float value | \n
\n \n | skip_update_for | \n List of section names that should not be auto-updated. | \n Optional | \n | \n
\n \n | python_modules | \n List of extra python module names that should be installed. | \n Optional | \n | \n
\n \n | caching | \n Dictionary containing caching related settings. Refer to Caching section for more information. | \n Optional | \n | \n
\n \n | result | \n Dictionary containing result related settings. Refer to Result section for more information. | \n Optional | \n | \n
\n \n | udf_name_prefix | \n Prefix to be used in front of UDf name. | \n Optional | \n {service_name}_ | \n
\n
\n\n#### OpenAPI ####\n\n\n | \n | Description | \n Mandatory | \n Possible values | \n \n \n | definition | \n URL to the OpenAPI definition. http, https and file scheme are supported. For more details on what is a URL, please refer to https://en.wikipedia.org/wiki/URL. If you would like to point to a static file such as C:\\swagger.json, the value should be file://C:/swagger.json | \n Mandatory | \n | \n
\n \n | definition_read_timeout | \n Maximum amount of time, in seconds, to wait when requesting an OpenAPI definition. Wait for 5 seconds by default. For more details refer to http://docs.python-requests.org/en/master/user/advanced/#timeouts | \n Optional | \n any float value | \n
\n \n | definition_retrieval_auths | \n List all authentication that should be used when retrieving the OpenAPI definition. Use no authentication by default. | \n Optional | \n oauth2_implicit, oauth2_access_code, oauth2_password, oauth2_application, api_key, basic, ntlm | \n
\n \n | excluded_tags | \n List of tags within OpenAPI definition that should not be retrieved. If not specified, no filtering is applied. For more details refer to https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md | \n Optional | \n | \n
\n \n | selected_tags | \n List of tags within OpenAPI definition that should be retrieved (if not within excluded tags already). If not specified, no filtering is applied. For more details refer to https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md | \n Optional | \n | \n
\n \n | excluded_operation_ids | \n List of operation_id (or regular expressions) within OpenAPI definition that should not be retrieved. If not specified, no filtering is applied. For more details refer to https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md | \n Optional | \n | \n
\n \n | selected_operation_ids | \n List of operation_id (or regular expressions) within OpenAPI definition that should be retrieved (if not within excluded operation_ids already). If not specified, no filtering is applied. For more details refer to https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md | \n Optional | \n | \n
\n \n | excluded_parameters | \n List of parameter names (or regular expressions) within OpenAPI definition that should not be exposed. If not specified, no filtering is applied. For more details refer to https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md | \n Optional | \n | \n
\n \n | selected_parameters | \n List of parameter names (or regular expressions) within OpenAPI definition that should be exposed (if not within excluded parameters already). If not specified, no filtering is applied. For more details refer to https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md | \n Optional | \n | \n
\n \n | rely_on_definitions | \n Rely on OpenAPI definitions to re-order fields received in JSON response. Deactivated by default. | \n Optional | \n true or false | \n
\n \n | service_host | \n Service host in case your service is behind a reverse proxy. | \n Optional | \n | \n
\n
\n\n#### User Defined Function ####\n\n\n | \n | Description | \n Mandatory | \n Possible values | \n \n \n | PathToPython | \n Path to the python.exe (including) executable that should be used to launch the update script. | \n Mandatory | \n Installation script is already setting this value properly. | \n
\n \n | PathToUpdateScript | \n Path to the Python script used to update PyxelRest. | \n Mandatory | \n Installation script is already setting this value properly. | \n
\n \n | AutoCheckForUpdates | \n Activate or Deactivate automatic check for PyxelRest update on Microsoft Excel closing. | \n Optional | \n True (default), False | \n
\n \n | GenerateUDFAtStartup | \n Activate or Deactivate generation of user defined functions at Microsoft Excel startup. | \n Optional | \n True (default), False | \n
\n \n | PathToXlWingsConfiguration | \n Path to the XlWings configuration file used to configure XlWings for PyxelRest. | \n Mandatory | \n Installation script is already setting this value properly. | \n
\n \n | PathToUpToDateConfigurations | \n Path to the file or directory containing up to date services configuration. | \n Optional | \n Installation script is already setting this value properly. | \n
\n
\n\n## Using as a module ##\n\nYou can use pyxelrest as a python module as well.\n\n```python\nimport pyxelrest\n\nconfiguration = {'petstore': {'open_api': {'definition': 'http://petstore.swagger.io/v2/swagger.json'}}}\npyxelrest.load(configuration)\n\nimport pyxelrest.user_defined_functions as udfs\n\n# UDFs are available as python functions within user_defined_functions and can be used as such\n```\n\n### Generating user defined functions ###\n\nWhen `pyxelrest.GENERATE_UDF_ON_IMPORT` is set to `True` (default behavior), \nUDFs are generated based on a configuration file by loading (e.g. on first import) pyxelrest.pyxelrestgenerator.py.\n\nYou can manually regenerate UDFs by calling `pyxelrest.load()` and providing your custom configuration.\n\nAll UDFs can be found within pyxelrest.user_defined_functions.py.\n\n## Frequently Asked Question ##\n\n### Microsoft Excel Wizard does not show any parameter ###\n\n\n\nMicrosoft Excel function wizard is not able to handle functions with a long definition.\n\nThe total length of parameter names (and commas to separate them) should not exceed 253 characters,\n\nIn case it does (your UDF has a lot of parameters or parameters with long names), then Microsoft Excel is unable to display them all in the function wizard.\n\nTo overcome this Microsoft Excel limitation you can try the following:\n * Exclude some parameters (refer to Open API configuration section for more information).\n * Remove some parameters in your service.\n * Reduce the length of your service parameter names.\n\n### Microsoft Excel Wizard only list some functions ###\n\nMicrosoft Excel function wizard is not able to list more than a certain amount of functions per category.\n\nHowever all functions can be directly accessed in cells.\n\nTo overcome this Microsoft Excel limitation you can try the following:\n * Exclude some functions in your service (refer to Open API configuration section for more information).\n\n### No command specified in the configuration, cannot autostart server ###\n\nThis error will happen in case you manually specified in your xlwings.bas file to use debug server but did not uncomment the main function starting the server on pyxelrest module side.\n\n### Microsoft Excel Add-In cannot be installed ###\n\nCheck that all requirements are met:\n * [Microsoft .NET Framework >= 4.5.2](http://go.microsoft.com/fwlink/?linkid=328856) must be installed.\n * [Microsoft Visual Studio 2010 Tools for Office Runtime](https://www.microsoft.com/en-us/download/details.aspx?id=48217) must be installed.\n\nIn case you encounter an issue like `Could not load file or assembly 'Microsoft.Office.BusinessApplications.Fba...` anyway, you then need to remove `C:\\Program Files\\Common Files\\Microsoft Shared\\VSTO\\10.0\\VSTOInstaller.exe.config` file.\n\nIn case you encounter an issue like `...An application with the same identity is already installed...`, you then need to manually remove all folders within `%USERPROFILE%\\AppData\\Local\\Apps\\2.0` and restart your computer.\n\n### Dates with a year higher than 3000 are not converted to local timezone ###\n\nDue to timestamp limitation, dates after 3000-12-31 and date time after 3001-01-01T07:59:59+00:00 cannot be converted to local timezone.\n\n### Python process exited before it was possible to create the interface object ###\n\nYou need to check log files to identify the underlying issue.\n\n### pyxelrest.xlam is not available ###\n\nThe add-in might be disabled. Check File/Option/addin/Manage: Disabled Items",
"description_content_type": "",
"docs_url": null,
"download_url": "http://www.engie.com",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://guru.trading.gdfsuez.net/bitbucket/projects/GEMS/repos/pyxelrest",
"keywords": "excel,openapi,swagger,rest,udf,service",
"license": "",
"maintainer": "Engie",
"maintainer_email": "colin.bounouar@engie.com",
"name": "pyxelrest",
"package_url": "https://pypi.org/project/pyxelrest/",
"platform": "Windows",
"project_url": "https://pypi.org/project/pyxelrest/",
"project_urls": {
"Download": "http://www.engie.com",
"Homepage": "http://guru.trading.gdfsuez.net/bitbucket/projects/GEMS/repos/pyxelrest"
},
"release_url": "https://pypi.org/project/pyxelrest/0.69.0/",
"requires_dist": null,
"requires_python": ">=2.7",
"summary": "Access REST APIs from Excel using User Defined Functions (UDF)",
"version": "0.69.0"
},
"last_serial": 4571451,
"releases": {
"0.69.0": [
{
"comment_text": "",
"digests": {
"md5": "985ffcb25b6a4766583dc78ef3aa9754",
"sha256": "a1276e9eca1c1e23ad169044ed59218f8fd137ab04ab3217411933c27fe97207"
},
"downloads": -1,
"filename": "pyxelrest-0.69.0.tar.gz",
"has_sig": false,
"md5_digest": "985ffcb25b6a4766583dc78ef3aa9754",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=2.7",
"size": 776748,
"upload_time": "2018-12-07T10:45:24",
"url": "https://files.pythonhosted.org/packages/33/8d/05126117472c2eb016752d06e3cbf16f4aa30ed2812ad9045ccf49cff9cf/pyxelrest-0.69.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "985ffcb25b6a4766583dc78ef3aa9754",
"sha256": "a1276e9eca1c1e23ad169044ed59218f8fd137ab04ab3217411933c27fe97207"
},
"downloads": -1,
"filename": "pyxelrest-0.69.0.tar.gz",
"has_sig": false,
"md5_digest": "985ffcb25b6a4766583dc78ef3aa9754",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=2.7",
"size": 776748,
"upload_time": "2018-12-07T10:45:24",
"url": "https://files.pythonhosted.org/packages/33/8d/05126117472c2eb016752d06e3cbf16f4aa30ed2812ad9045ccf49cff9cf/pyxelrest-0.69.0.tar.gz"
}
]
}