Skip to main content

Manages a pool of suds SOAP clients within the context of a Zope application

Project description

Introduction

z3c.suds manages a connection pool of suds client objects in the context of a ZODB-based application. (suds is a lightweight client library for consuming SOAP web services in Python.) Using it avoids the need for instantiating a new client for the same webservice in multiple requests (which may be expensive due to parsing WSDL, etc.)

Usage

A client may be obtained via the get_suds_client method:

client = get_suds_client(wsdl_uri, context=None)

This returns an existing suds client if one is found in the cache for the given WSDL; otherwise it returns a new client object and stores it in the cache.

wsdl_path is the URI of the WSDL (web service definition language) description of the web service. (Use a file:// URI for a locally stored WSDL.)

context is a persistent object (in the ZODB sense). If not provided, the getSite method of zope.site.hooks will be used to obtain an object (which is probably only sensible within the context of a Zopish framework). If the context object is associated with a ZODB connection, the client will be cached in the connection’s foreign_connections dictionary. If the context object is not yet associated with a ZODB connection, the client will be cached in a volatile attribute instead. This approach to piggybacking a pool of connections on the ZODB connection pool is based on alm.solrindex, and further documented there.

Changelog

1.0 (2010-09-17)

  • Initial release

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

z3c.suds-1.0.zip (10.3 kB view details)

Uploaded Source

File details

Details for the file z3c.suds-1.0.zip.

File metadata

  • Download URL: z3c.suds-1.0.zip
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for z3c.suds-1.0.zip
Algorithm Hash digest
SHA256 0a7872dfd2cbaf2eeedc722c2bbbc4209bcc67aae9f499240dd6be5e533a4926
MD5 49037e3afc5d174beed5161c0a2dc7bc
BLAKE2b-256 3cb0870da221189de775a1012f5a9df4509aef03bcd9bf23757e59792ef8401e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page