Skip to content

Commit 8166b8b

Browse files
committed
Add Client.namespaces property to easily retrieve current namespaces
1 parent 19f1fe9 commit 8166b8b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/zeep/client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __getitem__(self, key):
7171
except ValueError:
7272
raise AttributeError('Service has no operation %r' % key)
7373
return OperationProxy(self, key)
74-
74+
7575
def __dir__(self):
7676
""" Return the names of the operations. """
7777
return list(dir(super(ServiceProxy, self))
@@ -145,6 +145,10 @@ def __init__(self, wsdl, wsse=None, transport=None,
145145
self._default_port_name = port_name
146146
self._default_soapheaders = None
147147

148+
@property
149+
def namespaces(self):
150+
return self.wsdl.types.prefix_map
151+
148152
@property
149153
def service(self):
150154
"""The default ServiceProxy instance

0 commit comments

Comments
 (0)