Closed rbw closed 4 years ago
The Application constructor now expects address as first positional argument, followed by a set of keyword arguments.
Application
address
>>> import snow >>> app = snow.Application( ... "test.service-now.com", ... basic_auth=("test", "testtest"), ... verify_ssl=False) >>> print(app.config) <ConfigSegment {'address': 'test.service-now.com', 'session': <ConfigSegment {'use_ssl': True, 'basic_auth': ('test', 'testtest'), 'verify_ssl': False}>}>
Also, this PR adds support for passing a snow-compatible aiohttp.ClientSession object directly to snow.Application.
aiohttp.ClientSession
snow.Application
>>> app = snow.Application( ... "test.service-now.com", ... session=aiohttp.ClientSession(response_class=snow.request.Response))
Note:
ConfigurationException
snow.request.Response
The
Application
constructor now expectsaddress
as first positional argument, followed by a set of keyword arguments.Also, this PR adds support for passing a snow-compatible
aiohttp.ClientSession
object directly tosnow.Application
.Note:
Application
are mutually exclusive, if both are used aConfigurationException
is raised.aiohttp.ClientSession
objects must have response_class set tosnow.request.Response