Package: requests-mv-integrations
requests-mv-integrationsExtension of Python HTTPrequestswith verbose
logging usinglogging-mv-integrations.BadgesdocsinfotestspackageotherInstallpipinstallrequests_mv_integrationsArchitecturerequests-mv-integrationsis an extension of thePython package requestsand it is used for TUNE Multiverse Integrations for handling all HTTP requests including APIs in REST and SOAP,
screen scrapping, and handling response downloads in JSON, XML, and CSV.UsageURL_TUNE_MAT_API_COUNTRIES=\'https://api.mobileapptracking.com/v2/countries/find.json'fromrequests_mv_integrationsimport(RequestMvIntegrationDownload,)request_download=RequestMvIntegrationDownload(logger_level=logging.DEBUG)result=\request_download.request(request_method='GET',request_url=URL_TUNE_MAT_API_COUNTRIES,request_params=None,request_retry=None,request_headers=HEADER_CONTENT_TYPE_APP_JSON,request_label="TMC Countries")json_tune_mat_countries=result.json()pprint(json_tune_mat_countries)Example$python3examples/example_request.py{"asctime":"2017-10-13 12:02:53 -0700","levelname":"INFO","name":"__main__","version":"00.05.04","message":"Start"}{"asctime":"2017-10-13 12:02:53 -0700","levelname":"DEBUG","name":"requests_mv_integrations","version":"00.05.04","message":"TMC Countries: Start"}...{"asctime":"2017-10-13 12:02:53 -0700","levelname":"DEBUG","name":"requests_mv_integrations","version":"00.05.04","message":"TMC Countries: Details","request_data":"","request_headers":{"Content-Type":"application/json","User-Agent":"(requests-mv-integrations/00.05.04, Python/3.6.2)"},"request_label":"TMC Countries","request_method":"GET","request_params":{},"request_url":"https://api.mobileapptracking.com/v2/countries/find.json","timeout":60}{"asctime":"2017-10-13 12:02:53 -0700","levelname":"DEBUG","name":"requests_mv_integrations","version":"00.05.04","message":"TMC Countries: Curl","request_curl":"curl --verbose
        -X GET
        -H 'Content-Type: application/json'
        -H 'User-Agent: (requests-mv-integrations/00.05.04, Python/3.6.2)'
        --connect-timeout 60
        -L 'https://api.mobileapptracking.com/v2/countries/find.json'","request_label":"TMC Countries","request_method":"GET"}...{'data':[{'id':0,'name':'International (Generic)'},{'id':4,'name':'Afghanistan'},{'id':8,'name':'Albania'},{'id':10,'name':'Antarctica'},{'id':12,'name':'Algeria'},{'id':16,'name':'American Samoa'},{'id':20,'name':'Andorra'},{'id':24,'name':'Angola'},{'id':28,'name':'Antigua And Barbuda'},{'id':31,'name':'Azerbaijan'},],'response_size':'845','status_code':200,}Classesclass RequestMvIntegration– Base class usingrequestswith retry functionality and verbose logging.class RequestMvIntegrationDownload– Download file handling.class RequestMvIntegrationUpload– Upload file handling.Requirementsrequests-mv-integrationsmodule is built upon Python 3 and has dependencies upon
several Python modules available withinPython Package Index PyPI.makeinstallorpython3-mpipuninstall--yes--no-input-rrequirements.txtpython3-mpipinstall--upgrade-rrequirements.txtPackagesbeautifulsoup4:https://pypi.python.org/pypi/beautifulsoup4deepdiff:https://pypi.python.org/pypi/deepdifflogging-mv-integrations:https://pypi.python.org/pypi/logging-mv-integrationspyhttpstatus-utils:https://pypi.python.org/pypi/pyhttpstatus-utilsrequests:https://pypi.python.org/pypi/requestssafe-cast:https://pypi.python.org/pypi/safe-castRelease History0.7.7 (2018-02-16)migrate to github/TuneLab0.7.6 (2018-02-07)Updated requirements.txt0.7.5 (2018-01-28)Upgraded to use pyhttpstatus-utils 0.2.2.0.7.4 (2018-01-25)migrate to github/tuneinc0.7.2 (2017-12-10)readthedocs.org0.6.0 (2017-11-24)README0.5.7 (2017-10-31)README0.5.6 (2017-10-26)Using formatted string literals0.5.5 (2017-09-12)logger_output: STDOUT, STDOUT_COLOR, FILElogger_filter: NOTE0.5.4 (2017-09-12)Support logging-mv-integrations refactor0.5.3 (2017-08-13)Fix Retry exception functions0.5.2 (2017-06-15)Requirements.txt - update python packages to latest0.5.1 (2017-06-15)Collect metrics for MvRequest calls0.5.0 (2017-04-07)support client side certificate0.4.9 (2017-04-01)qRequirements.0.4.8 (2017-03-30)Retry exception function.0.4.6 (2017-03-28)logger-mv-integrations version 0.1.2validate_response() and validate_json_response()0.4.5 (2017-03-14)smart-cast0.4.4 (2017-03-12)use sessions cookies as request_auth0.4.3 (2017-03-02)replace ‘json’ with ‘ujson’0.4.2 (2017-02-27)psutilBack to Python 3.50.4.1 (2017-02-09)cUrl request params0.4.0 (2017-02-09)Requirements.RetryError0.3.9 (2017-02-06)TuneRequest is not a Singleton.0.3.8 (2017-02-03)Upgrade to Python 3.60.3.5 (2017-01-27)Reduce loggingDisc usageIron.io Partition0.3.3 (2017-01-26)Cleanup using pyflakes, pep8, pylint, and yapfRequirements0.3.2 (2017-01-24)Curl fix0.3.1 (2017-01-18)Log reduction0.2.9 (2017-01-17)psutil: disc and mem usageCleanup0.2.8 (2017-01-16)Cleanup yapf0.2.7 (2017-01-16)Build CurlCleanup0.2.6 (2017-01-14)Requirements0.2.5 (2017-01-04)Cleanup0.2.4 (2017-01-04)request timeout0.2.3 (2016-12-31)test_curlparse_curl0.2.2 (2016-12-30)Makefile0.2.1 (2016-12-29)README.rstHISTORY.rst0.2.0 (2016-12-19)Expose response url0.1.8 (2016-12-09)Base Exception cleanup0.1.6 (2016-12-08)Error Origin0.1.5 (2016-12-07)Log Exit Code0.1.1 (2016-12-03)Include request_auth in curl0.1.0 (2016-11-25)Initial Release0..1 (2016-11-18)ConceptionCode pulled from TuneLab/tune-mv-integration-python