Skip to main content

Multiprotocol Web Services for TurboGears 2

Project description

TurboGears gives you a plain HTTP with JSON return
values API for your application for free. This isn't always what you want,
though. Sometimes, you don't want to expose all of the data to the web
that you need to render your templates. Maybe you need to support a
protocol that names the function it's calling as part of what it POSTs
such as SOAP or XML-RPC.

TGWebServices provides a super simple API for creating web services that
are available via SOAP, HTTP->XML, and HTTP->JSON. The SOAP API generates
WSDL automatically for your Python and even generates enough type
information for statically typed languages (Java and C#, for example) to
generate good client code on their end.

How easy is it?

::

class Multiplier(WebServicesRoot):

@wsexpose(int)
@wsvalidate(int, int)
def multiply(self, num1, num2):
return num1 * num2

With this at the root, SOAP clients can find the WSDL file at /soap/api.wsdl
and POST SOAP requests to /soap/. HTTP requests to /multiply?num1=5&num2=20
will return an XML document with the result of 100. Add ?tg_format=json (or
an HTTP Accept: text/javascript header) and you'll get JSON back.

The great thing about this is that the code above looks like a '''normal
Python function''' and doesn't know a thing about web services.

Features
--------

* Easiest way to expose a web services API
* Supports SOAP, HTTP+XML, HTTP+JSON
* Outputs wrapped document/literal SOAP, which is the most widely
compatible format
* Provides enough type information for statically typed languages
to generate conveniently usable interfaces
* Can output instances of your own classes
* Can also accept instances of your classes as input
* Works with TurboGears 2.x
* MIT license allows for unrestricted use

Project details


Download files

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

Source Distribution

TGWebServices-2.0.0a1.tar.gz (18.9 kB view details)

Uploaded Source

Built Distributions

TGWebServices-2.0.0a1-py2.6.egg (60.8 kB view details)

Uploaded Source

TGWebServices-2.0.0a1-py2.5.egg (60.9 kB view details)

Uploaded Source

TGWebServices-2.0.0a1-py2.4.egg (61.8 kB view details)

Uploaded Source

File details

Details for the file TGWebServices-2.0.0a1.tar.gz.

File metadata

File hashes

Hashes for TGWebServices-2.0.0a1.tar.gz
Algorithm Hash digest
SHA256 b2f96d427b5688200755dc8a385f2083f780a2aa6dc50dc98a9621b52b362806
MD5 dedcc0b43f33d9389c8b0d2cbe9a3022
BLAKE2b-256 0acac3f7bf8ce908315385cab71a8a66a21a2897ea60c7ffbecd41d09331f1bb

See more details on using hashes here.

File details

Details for the file TGWebServices-2.0.0a1-py2.6.egg.

File metadata

File hashes

Hashes for TGWebServices-2.0.0a1-py2.6.egg
Algorithm Hash digest
SHA256 a5851027763ccc0a61ccb424146512eb5d49d9696cf5a021c551914824b3c411
MD5 877712fcfd38dc3ba85ed99d142e8508
BLAKE2b-256 a80c0c4aed754c3e9b75aeef6a43a61d7130b7db1ac178a6c0886f4fbf43ad99

See more details on using hashes here.

File details

Details for the file TGWebServices-2.0.0a1-py2.5.egg.

File metadata

File hashes

Hashes for TGWebServices-2.0.0a1-py2.5.egg
Algorithm Hash digest
SHA256 d6dea136fcb502961b9d1c64d796cda9e23028577ea0b1e13d4202d2bad2b564
MD5 cd229a2117e01d1b253ad03651757871
BLAKE2b-256 ba679577de0caf68693ef811119bedaa73aff77cb27067074a75f00c210484c8

See more details on using hashes here.

File details

Details for the file TGWebServices-2.0.0a1-py2.4.egg.

File metadata

File hashes

Hashes for TGWebServices-2.0.0a1-py2.4.egg
Algorithm Hash digest
SHA256 0c0ccde6d38e1a323c8a72dbbd9f82c205c2513601c85cb98d2b5f842ed14804
MD5 16e5029398bd8b99e2cfef6efe93204a
BLAKE2b-256 555c52ef120ebb552b8a08d5efe8c7a8f105aa5567489def71587b09f443ff20

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