Skip to content

Instantly share code, notes, and snippets.

@Iazzetta
Created November 24, 2016 20:41
Show Gist options
  • Save Iazzetta/6384645e450e3c336d638a335cae220e to your computer and use it in GitHub Desktop.
Save Iazzetta/6384645e450e3c336d638a335cae220e to your computer and use it in GitHub Desktop.
Zeep (wsdl/soap)
from zeep import Client
from requests.auth import HTTPBasicAuth
from zeep.transports import Transport
import logging.config
logging.config.dictConfig({
'version': 1,
'formatters': {
'verbose': {
'format': '%(name)s: %(message)s'
}
},
'handlers': {
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
'formatter': 'verbose',
},
},
'loggers': {
'zeep.transports': {
'level': 'DEBUG',
'propagate': True,
'handlers': ['console'],
},
}
})
client = Client('URL', transport=Transport(http_auth=HTTPBasicAuth("LOGIN", "SENHA")))
result = client.service.GETSESSAO("LOGIN", "SENHA")
@Iazzetta
Copy link
Author

pip install zeep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment