[Python-modules-commits] [txjsonrpc] 01/15: Initial import of txJSON-RPC-0.3.1.tar.gz.

Tristan Seligmann mithrandi at moszumanska.debian.org
Sat Oct 11 07:26:58 UTC 2014


This is an automated email from the git hooks/post-receive script.

mithrandi pushed a commit to branch debian/sid
in repository txjsonrpc.

commit b8dbbdfeeb119610f17ff79180ba4f8988a55fb0
Author: Tristan Seligmann <mithrandi at mithrandi.net>
Date:   Sat Oct 11 06:28:37 2014 +0200

    Initial import of txJSON-RPC-0.3.1.tar.gz.
---
 ChangeLog                                 | 238 +++++++++++++++++++++++++
 LICENSE                                   |  22 +++
 MANIFEST.in                               |   7 +
 PKG-INFO                                  | 224 ++++++++++++++++++++++++
 README.rst                                |  18 ++
 TODO                                      |  49 ++++++
 docs/DEPENDENCIES.txt                     |   7 +
 docs/HISTORY.txt                          |  68 ++++++++
 docs/INSTALL.txt                          |  48 +++++
 docs/PRELUDE.txt                          |   6 +
 docs/USAGE.txt                            |  21 +++
 docs/specs/pre-version-1.0.txt            |  88 ++++++++++
 docs/specs/version-1.0.txt                |  92 ++++++++++
 docs/specs/version-2.0-proposed.txt       |  61 +++++++
 examples/tcp/client.py                    |  23 +++
 examples/tcp/client_subhandled.py         |  45 +++++
 examples/tcp/server.tac                   |  22 +++
 examples/tcp/server_subhandled.tac        |  40 +++++
 examples/web/client.py                    |  32 ++++
 examples/web/server.tac                   |  33 ++++
 examples/web2/client.py                   |  16 ++
 examples/web2/server.tac                  |  25 +++
 examples/web2Auth/client.py               |  46 +++++
 examples/web2Auth/passwd.db               |   2 +
 examples/web2Auth/server.tac              |  41 +++++
 examples/webAuth/client.py                |  46 +++++
 examples/webAuth/passwd.db                |   2 +
 examples/webAuth/server.tac               |  47 +++++
 setup.cfg                                 |   5 +
 setup.py                                  |  31 ++++
 txJSON_RPC.egg-info/PKG-INFO              | 224 ++++++++++++++++++++++++
 txJSON_RPC.egg-info/SOURCES.txt           |  74 ++++++++
 txJSON_RPC.egg-info/dependency_links.txt  |   1 +
 txJSON_RPC.egg-info/top_level.txt         |   1 +
 txjsonrpc/__init__.py                     |   0
 txjsonrpc/__init__.pyc                    | Bin 0 -> 138 bytes
 txjsonrpc/auth.py                         |  44 +++++
 txjsonrpc/auth.pyc                        | Bin 0 -> 2179 bytes
 txjsonrpc/jsonrpc.py                      | 209 ++++++++++++++++++++++
 txjsonrpc/jsonrpc.pyc                     | Bin 0 -> 8829 bytes
 txjsonrpc/jsonrpclib.py                   | 191 ++++++++++++++++++++
 txjsonrpc/jsonrpclib.pyc                  | Bin 0 -> 7393 bytes
 txjsonrpc/meta.py                         |   8 +
 txjsonrpc/meta.pyc                        | Bin 0 -> 493 bytes
 txjsonrpc/netstring/__init__.py           |   1 +
 txjsonrpc/netstring/__init__.pyc          | Bin 0 -> 148 bytes
 txjsonrpc/netstring/jsonrpc.py            | 170 ++++++++++++++++++
 txjsonrpc/netstring/jsonrpc.pyc           | Bin 0 -> 7735 bytes
 txjsonrpc/netstring/test/__init__.py      |   0
 txjsonrpc/netstring/test/__init__.pyc     | Bin 0 -> 153 bytes
 txjsonrpc/netstring/test/test_jsonrpc.py  | 259 +++++++++++++++++++++++++++
 txjsonrpc/netstring/test/test_jsonrpc.pyc | Bin 0 -> 12837 bytes
 txjsonrpc/scripts/__init__.py             |   0
 txjsonrpc/scripts/getVersion.py           |   3 +
 txjsonrpc/test/__init__.py                |   0
 txjsonrpc/test/__init__.pyc               | Bin 0 -> 143 bytes
 txjsonrpc/test/test_auth.py               |  43 +++++
 txjsonrpc/test/test_auth.pyc              | Bin 0 -> 2736 bytes
 txjsonrpc/test/test_jsonrpc.py            | 104 +++++++++++
 txjsonrpc/test/test_jsonrpc.pyc           | Bin 0 -> 5683 bytes
 txjsonrpc/test/test_jsonrpclib.py         |  71 ++++++++
 txjsonrpc/test/test_jsonrpclib.pyc        | Bin 0 -> 3985 bytes
 txjsonrpc/testing/__init__.py             |   0
 txjsonrpc/testing/suite.py                |  72 ++++++++
 txjsonrpc/util/__init__.py                |   0
 txjsonrpc/util/__init__.pyc               | Bin 0 -> 143 bytes
 txjsonrpc/util/dist.py                    | 129 ++++++++++++++
 txjsonrpc/util/dist.pyc                   | Bin 0 -> 3894 bytes
 txjsonrpc/web/__init__.py                 |   0
 txjsonrpc/web/__init__.pyc                | Bin 0 -> 142 bytes
 txjsonrpc/web/jsonrpc.py                  | 251 ++++++++++++++++++++++++++
 txjsonrpc/web/jsonrpc.pyc                 | Bin 0 -> 10145 bytes
 txjsonrpc/web/test/__init__.py            |   0
 txjsonrpc/web/test/__init__.pyc           | Bin 0 -> 147 bytes
 txjsonrpc/web/test/test_jsonrpc.py        | 281 ++++++++++++++++++++++++++++++
 txjsonrpc/web/test/test_jsonrpc.pyc       | Bin 0 -> 14234 bytes
 76 files changed, 3541 insertions(+)

diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..aac793e
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,238 @@
+2012.01.06
+
+* Added a Makefile that will eventually replace the admin scripts.
+* Added *ignore files.
+* Updated Makefile with improved (and more) targets as well as support for both
+bzr and git.
+* Added a silly version script (used by the Makefile).
+* Fixed the MANIFEST.in file (this addresses a long-standing bug in this
+version of txJSON-RPC).
+* Incremented the version number due to the bug fix for the included docs in
+the source build.
+* Fixed the virtual-env build make target.
+* Fixed up the dist util module to account for the renamed README.
+* Fixed the json import for modern versions of Python.
+* Removed web2 support.
+* Updated HISTORY file.
+
+2009.11.09
+
+* Removed the version hack and determined version of the request made to the
+server by message format/spec support.
+
+2009.11.08
+
+* Added import checks in auth.py.
+* Added test case for auth imports.
+* Fixed up the import unit tests with reloads.
+* Added unit tests for realm test case.
+* Restructured the get* methods for the web and web2 modules.
+* Added unit tests for wrapped resource test case.
+* Removed version 1 test methods in JSONRPC test case.
+* Added unit tests for jsonrpclib.dumps.
+* Added unit tests for jsonrpc.BaseProxy.
+* Updated defs with svn branch.
+* Added unit tests for base query factory.
+* Started a test case for the jsonrpclib loads function.
+* Fixed the server's render callback where the version was being passed as
+unicode instead of an int.
+* Touched up a unit test.
+* Updated the spec docs with a change.
+
+2009.11.07
+
+* Added authentication support with cred for twisted.web2-based JSON-RPC
+reources.
+* Updated history file.
+* Added test case for auth imports.
+
+2009.11.06
+
+* Reverted trunk to pre-version-work point.
+* Cherry-picked the change that added missing deferred returns in two tests.
+* Cherry-picked the change that added the testing helper subpackage.
+* Cherry-picked the change that added the doctest runner.
+* Cherry-picked changes to the examples and updated the example-runner.
+* Added authentication infrasturcture so that twisted.web-based txJSON-RPC
+servers can be written to support twisted.cred.
+
+2009.10.22
+
+* Added support for version 1.0 of the JSON-RPC spec to jsonrpclib.
+* Finished the pre-version 1.0 spec.
+* Updated the version 1.0 spec with response examples.
+* Updated web and web2 JSON-RPC to extract and pass the id and version
+parameters.
+
+2009.10.21
+
+* Updated the QueryFactory to take a version parameter in the constructor.
+* Added a payload creator that uses the version to determine which payload to
+build.
+* Changed the constructor to use a new private method for creating the payload.
+* Changed the async Proxy classes in web and netstring to accept a version
+parameter in the constructor as well as in the callRemote method.
+* Updated license file with more recent copyright info.
+* Added an exmaple for web client.
+* Updated netstring JSON-RPC with support for version parameters in contructor
+and callRemote.
+* Added a jsonrpc module for abstracting base-classes and removing redundancy
+between the three JSON-RPC implementations.
+* Added a BaseProxy class.
+* Import cleanup.
+* Moved more common methods into the base query factory class.
+* Created a BaseSubhandler subclass for http and netstring RPC classes.
+* Removed session code from netstring RPC test.
+* Moved introspection into base module.
+* Changed introspection to behave like a mixin instead of a subclass.
+* Updated JSON-RPC web2 to use new base classes.
+* Updated JSON-RPC web2's Introspection class to use the base introspection
+class.
+
+2009.10.20
+
+* Added clean.sh admin script.
+* Cleaned up TODO file.
+* Updated meta file with more data and incremented the version to 0.3.
+* Added utils subpackage.
+* Updated setup.py to use the new utils subpackage.
+* Added docs.
+* Updated README.
+* Cleaned up lots of unused imports.
+* Formatting tweaks.
+* Added a call to strip for the help-string-returning methods.
+* Added a maxLength attribute to QueryFactory for custom settings by users.
+* Updated proxy to instantiate QueryFactory with an optional maxLength
+override.
+* Updated history file.
+* Cleaned up examples.
+* Added an admin script for testing examples.
+* Updated the commit script to run the exmaple tests.
+* Added missing error handling in commit script.
+* Added PYTHONPATH to example runner commands.
+* Removed PYTHONPATH from admin/defs.sh.
+* Removed debugging echo statement from commit.sh.
+* Removed manual PYTHONPATH setting in example runner.
+* Formatting tweaks.
+* Updated TODO and README.
+* Added admin upload script.
+* Added placeholders for version spec files.
+* Added missing deferred returns in two tests.
+* Added testing helper subpackage.
+* Added doctest runner.
+* Added manifest file.
+* Updated the commit script to run the doctest runner.
+* Added headings to the spec files.
+* Added request info to the specs.
+* Added versioned request functions to jsonrpclib.py and updated the
+ServerProxy with a version-sensitive dispatcher.
+* Removed non-pertinent sections from pre-version 1 spec.
+
+2008.11.10
+
+* Added a test for None/null.
+* Added a serializer for Python datetime -> JSON.
+* Updated the version.
+* Updated the commitAndPush script to pass the skip_tests parameter (and fixed
+its filename extention).
+* Added missing sudo to cleanup function.
+* Removed unused clean script (and made sure that the other scripts use the
+clean function).
+* Converted checkBuild to function and removed script.
+* Made the error function take a message parameter.
+* Updated the bzr push command for svn.
+* Fixed failing test for new "none" check.
+* Removed sudo calls from admin scripts.
+* Updated the ChangeLog with missing notes from earlier today.
+* Moved version info into meta package file.
+
+2008.07.18
+
+* Added more admin scripts.
+
+2008.07.16
+
+* Applied a patch from Moshe Zadka: "When getting a long reply, the client
+library, using code from xmlrpclib, will attempt to call feed multiple times
+with partial messages. The supplied parser assumes feed will only be called
+with a complete message."
+
+2008.06.15
+
+* Added Fault class.
+* Updated SimpleParser to properly return results when using jsonrpclib
+(synchronous, blocking code).
+* Added Transport and ServerProxy.
+* Added web example (in addition to the already-extant web2 example).
+* Removed extraneous print/debug code.
+* Incremented version number.
+* Added missing NOT_FOUND to web.jsonrpc.
+* Updated the version number.
+
+2008.06.14
+
+* Removed extraneous while space.
+* Added NoSuchFunction class.
+
+2008.06.11
+
+* Updated the commit script to work with bzr-svn.
+* Added a path hack to commit.sh for running trial.
+* Renamed adytum to txjsonrpc.
+* Moved web and web2 up and renamed twisted to netstring.
+* Removed .pyc files.
+* Tweaked the commit script.
+* Added license.
+* Removed ez_setup.py.
+* Updated TODO.
+* Renamed the main package from adytum to txjsonrpc.
+* Updated setup.py.
+* Removed ez_setup support.
+* Removed setuptools support.
+* Changed to the new way of flushing logs in twisted.trial.
+* Adjusted tests to use the new package and subpackage names.
+* Adjusted examples to use the new package and subpackage names.
+* Incremented the version number.
+* Removed trial path hack from commit.sh.
+* Test commit to svn and bzr from a freshly checked out branch.
+* Cool! It worked. Removed testfile.
+* Changed the commit script to point to 'main' on launchpad.
+* One more change to the launchpad destination in the commit script.
+* Updated the stat script to use bzr instead of svn.
+
+2006.05.07
+
+* Added a.t.jsonrpc.RPCFactory to __all__.
+* Renamed some of the variables in the examples to be more accurate.
+
+2006.05.06
+
+* Added a beginning sketch of JSON over TCP in protocols.json.
+* Some protocol tweaks.
+* Added test top-level directory as well as an adytum.twisted-level test
+directory.
+* Converted a.t.w2.jsonrpc and the client portion of a.t.w.jsonrpc to use the
+NetstringReceiver protocol for JSON-RPC over TCP.
+* Removed protocol code, since we don't need a custom protocol for JSON-RCP
+over TCP.
+* Commented out the support for returning a dict with keys "result" and
+"error" as it seems like unessary overhead for now. Someone convince me
+otherwise, and I'll put it back in.
+* Changed methodology for adding subhandlers.
+* Fixed introspection.
+
+2006.05.05
+
+* Added directory place holders and __init__.py files.
+* Added basic files.
+* Copied jsonrpc.py from the adytum library.
+* Moved proto-jsonrpclib code out of a.t.web.jsonrpc and into
+adytum.jsonrpclib.
+* Added copies of t.w2.xmlrpc and tests and renamed them to jsonrpc.
+* a.t.w2.jsonrpc has been ported and passes all tests.
+* Updated setup.py.
+* Added ez_setup.py.
+* Added client and server examples.
+* Made adytum and adytum.twisted setuptools namespaces.
+* Updated the example client.
+* Updated the TODO file.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..785a518
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2001-2004 Twisted Matrix Laboratories
+Copyright (c) 2006-2009 Duncan McGreggor
+Copyright (c) 2009 Canonical Ltd
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..f7d9d75
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,7 @@
+graft docs
+graft examples
+graft txjsonrpc
+include ChangeLog
+include README.rst
+include LICENSE
+include TODO
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..5f986d2
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,224 @@
+Metadata-Version: 1.0
+Name: txJSON-RPC
+Version: 0.3.1
+Summary: Code for creatig Twisted JSON-RPC servers and clients.
+Home-page: http://launchpad.net/txjsonrpc
+Author: Duncan McGreggor
+Author-email: oubiwann at adytum.us
+License: BSD, GPL
+Description: ~~~~~~~~~~
+        txJSON-RPC
+        ~~~~~~~~~~
+        
+        .. contents::
+           :depth: 1
+        
+        
+        README============
+        Dependencies
+        ============
+        
+        txJSON-RPC currently has the following dependencies:
+        
+        * Twisted - http://twistedmatrix.com/
+        
+        
+        ============
+        Installation
+        ============
+        
+        Development
+        -----------
+        
+        If you want to develop for txJSON-RPC or use the latest code we're working on,
+        you can install from the sources. You'll need bzr installed, and then just do
+        the following::
+        
+            $ bzr branch lp:txjsonrpc
+            $ cd txjsonrpc
+            $ sudo python setup.py install
+        
+        
+        Easy Install
+        ------------
+        
+        You can use the setuptools easy_install script to get txSpore on your system::
+        
+            $ sudo easy_install txJSON-RPC
+        
+        
+        Manual Download
+        ---------------
+        
+        You can manually download the source tarball from the Python Package Index by
+        visiting the following URL:
+        
+            http://pypi.python.org/pypi/txJSON-RPC/
+        
+        You'll need to untar and gunzip the source, cd into the source directory, and
+        then you can do the usual::
+        
+            $ sudo python setup.py install
+        
+        
+        Checking the Source
+        -------------------
+        
+        Once installed, you can test the source code by executing this from the
+        top-level source directory::
+        
+            $ trial txjsonrpc
+        
+        That will run the test suite and report on the success and failure of any unit
+        tests.
+        
+        
+        =====
+        Usage
+        =====
+        
+        
+        Examples
+        --------
+        
+        In the top-level source directory for txJSON-RPC, there is an examples
+        directory.  This contains the following:
+        
+        * Client and server examples for twiste.web-based JSON-RPC.
+        
+        * Client and server examples for twiste.web2-based JSON-RPC.
+        
+        * Client and server examples for Netstring TCP JSON-RPC as well as code shoing
+          how to use subhandlers for the TCP code, since this is different than the
+          XML-RPC/JSON-RPC HTTP-based subhandlers.
+        
+        Examining each of the Python files in the example directories is the best way
+        to get a sense of how to use txJSON-RPC.
+        
+        
+        ====
+        TODO
+        ====
+        
+        Known Issues
+        ------------
+        
+        * txJSON-RPC doesn't yet support the proposed v2.0 JSON-RPC protocol.
+        
+        JSON-RPC All
+        ------------
+        
+        JSON-RPC over TCP
+        -----------------
+        
+        * add version support in proxy constructor and callRemote method
+        
+        * add unit tests for proxy's use of version in constructor as well as
+          callRemote
+        
+        * pull out anything that has to do with setting the payload (e.g.,
+          method/params dict) and put it in jsonrpclib
+        
+        * clean up error checking, now that errors are going in the payload under the
+          "error" key.
+        
+        
+        JSON-RPC over HTTP (web2)
+        --------------------------
+        
+        * add a client example
+        
+        * update 
+        
+        
+        JSON-RPC over HTTP (web)
+        ------------------------
+        
+        * add unit tests for proxy's use of version in constructor as well as
+          callRemote
+        
+        
+        jsonrpclib
+        ----------
+        
+        * return results in simpljson dicts with possible keeys of "result" or "error"
+        
+        * use simplesjon's hook for creating appropriate JS objects from hints in the
+          results
+        
+        
+        =======
+        Changes
+        =======
+        
+        txJSON-RPC 0.3.1
+        ----------------
+        
+        * Fixed a setup.py bug in the source distribution.
+        
+        * Removed web2 support (which was breaking txJSON-RPC on modern Twisted
+          releases.)
+        
+        * Updated json support for modern Python versions.
+        
+        
+        txJSON-RPC 0.3.0
+        ----------------
+        
+        * Removed unneeded dependency upon twisted.web2 for the TCP/Netstring JSON-RPC
+          code.
+        
+        * Updated Netstring JSON-RPC code to allow for setting the MAX_LENGTH
+          attribute.
+        
+        * Improved documentation.
+        
+        
+        txJSON-RPC 0.2.0
+        ----------------
+        
+        * Added a datetime serializer.
+        
+        
+        txJSON-RPC 0.1.0
+        ----------------
+        
+        * Bug fix from Moshe Zadka for SimpleParser and long replies.
+        
+        
+        txJSON-RPC 0.0.5
+        ----------------
+        
+        * SimpleParser bug fix, improved code abstractions.
+        
+        
+        Twisted-JSONRPC 0.0.4
+        ---------------------
+        
+        * Changed name in accord with Twisted community projects recommendations.
+        
+        
+        Twisted-JSONRPC 0.0.3
+        ---------------------
+        
+        * Includes support for Twisted JSON-RPC servers/clients over TCP by means of
+          the Netstring protocol.
+        
+        
+        Twisted-JSONRPC 0.0.2
+        ---------------------
+        
+        * Includes support for twisted.web2 JSON-RPC servers over HTTP.
+        
+        
+        Twisted-JSONRPC 0.0.1
+        ---------------------
+        
+        * Includes support for twisted.web JSON-RPC servers/clients over HTTP.
+        
+        
+        
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Developers
+Classifier: Programming Language :: Python
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..e9bc584
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,18 @@
+============
+Introduction
+============
+
+txJSON-RPC allows you to create async Python JSON-RPC servers and clients
+either over HTTP or directly on TCP with the Netstring protocol. txJSON-RPC is
+written in Twisted.
+
+========
+Features
+========
+
+* Asynchronous JSON-RPC server and client code.
+
+* Support for HTTP and TCP (Netstring) JSON-RPC.
+
+* A jsonrpclib similar to the one for XLM-RPC offered by the Python standard
+  library.
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..428e351
--- /dev/null
+++ b/TODO
@@ -0,0 +1,49 @@
+====
+TODO
+====
+
+Known Issues
+------------
+
+* txJSON-RPC doesn't yet support the proposed v2.0 JSON-RPC protocol.
+
+JSON-RPC All
+------------
+
+JSON-RPC over TCP
+-----------------
+
+* add version support in proxy constructor and callRemote method
+
+* add unit tests for proxy's use of version in constructor as well as
+  callRemote
+
+* pull out anything that has to do with setting the payload (e.g.,
+  method/params dict) and put it in jsonrpclib
+
+* clean up error checking, now that errors are going in the payload under the
+  "error" key.
+
+
+JSON-RPC over HTTP (web2)
+--------------------------
+
+* add a client example
+
+* update 
+
+
+JSON-RPC over HTTP (web)
+------------------------
+
+* add unit tests for proxy's use of version in constructor as well as
+  callRemote
+
+
+jsonrpclib
+----------
+
+* return results in simpljson dicts with possible keeys of "result" or "error"
+
+* use simplesjon's hook for creating appropriate JS objects from hints in the
+  results
diff --git a/docs/DEPENDENCIES.txt b/docs/DEPENDENCIES.txt
new file mode 100644
index 0000000..e241eab
--- /dev/null
+++ b/docs/DEPENDENCIES.txt
@@ -0,0 +1,7 @@
+============
+Dependencies
+============
+
+txJSON-RPC currently has the following dependencies:
+
+* Twisted - http://twistedmatrix.com/
diff --git a/docs/HISTORY.txt b/docs/HISTORY.txt
new file mode 100644
index 0000000..f72de7f
--- /dev/null
+++ b/docs/HISTORY.txt
@@ -0,0 +1,68 @@
+=======
+Changes
+=======
+
+txJSON-RPC 0.3.1
+----------------
+
+* Fixed a setup.py bug in the source distribution.
+
+* Removed web2 support (which was breaking txJSON-RPC on modern Twisted
+  releases.)
+
+* Updated json support for modern Python versions.
+
+
+txJSON-RPC 0.3.0
+----------------
+
+* Removed unneeded dependency upon twisted.web2 for the TCP/Netstring JSON-RPC
+  code.
+
+* Updated Netstring JSON-RPC code to allow for setting the MAX_LENGTH
+  attribute.
+
+* Improved documentation.
+
+
+txJSON-RPC 0.2.0
+----------------
+
+* Added a datetime serializer.
+
+
+txJSON-RPC 0.1.0
+----------------
+
+* Bug fix from Moshe Zadka for SimpleParser and long replies.
+
+
+txJSON-RPC 0.0.5
+----------------
+
+* SimpleParser bug fix, improved code abstractions.
+
+
+Twisted-JSONRPC 0.0.4
+---------------------
+
+* Changed name in accord with Twisted community projects recommendations.
+
+
+Twisted-JSONRPC 0.0.3
+---------------------
+
+* Includes support for Twisted JSON-RPC servers/clients over TCP by means of
+  the Netstring protocol.
+
+
+Twisted-JSONRPC 0.0.2
+---------------------
+
+* Includes support for twisted.web2 JSON-RPC servers over HTTP.
+
+
+Twisted-JSONRPC 0.0.1
+---------------------
+
+* Includes support for twisted.web JSON-RPC servers/clients over HTTP.
diff --git a/docs/INSTALL.txt b/docs/INSTALL.txt
new file mode 100644
index 0000000..0cf23ad
--- /dev/null
+++ b/docs/INSTALL.txt
@@ -0,0 +1,48 @@
+============
+Installation
+============
+
+Development
+-----------
+
+If you want to develop for txJSON-RPC or use the latest code we're working on,
+you can install from the sources. You'll need bzr installed, and then just do
+the following::
+
+    $ bzr branch lp:txjsonrpc
+    $ cd txjsonrpc
+    $ sudo python setup.py install
+
+
+Easy Install
+------------
+
+You can use the setuptools easy_install script to get txSpore on your system::
+
+    $ sudo easy_install txJSON-RPC
+
+
+Manual Download
+---------------
+
+You can manually download the source tarball from the Python Package Index by
+visiting the following URL:
+
+    http://pypi.python.org/pypi/txJSON-RPC/
+
+You'll need to untar and gunzip the source, cd into the source directory, and
+then you can do the usual::
+
+    $ sudo python setup.py install
+
+
+Checking the Source
+-------------------
+
+Once installed, you can test the source code by executing this from the
+top-level source directory::
+
+    $ trial txjsonrpc
+
+That will run the test suite and report on the success and failure of any unit
+tests.
diff --git a/docs/PRELUDE.txt b/docs/PRELUDE.txt
new file mode 100644
index 0000000..75d87bf
--- /dev/null
+++ b/docs/PRELUDE.txt
@@ -0,0 +1,6 @@
+~~~~~~~~~~
+txJSON-RPC
+~~~~~~~~~~
+
+.. contents::
+   :depth: 1
diff --git a/docs/USAGE.txt b/docs/USAGE.txt
new file mode 100644
index 0000000..a0f4d57
--- /dev/null
+++ b/docs/USAGE.txt
@@ -0,0 +1,21 @@
+=====
+Usage
+=====
+
+
+Examples
+--------
+
+In the top-level source directory for txJSON-RPC, there is an examples
+directory.  This contains the following:
+
+* Client and server examples for twiste.web-based JSON-RPC.
+
+* Client and server examples for twiste.web2-based JSON-RPC.
+
+* Client and server examples for Netstring TCP JSON-RPC as well as code shoing
+  how to use subhandlers for the TCP code, since this is different than the
+  XML-RPC/JSON-RPC HTTP-based subhandlers.
+
+Examining each of the Python files in the example directories is the best way
+to get a sense of how to use txJSON-RPC.
diff --git a/docs/specs/pre-version-1.0.txt b/docs/specs/pre-version-1.0.txt
new file mode 100644
index 0000000..25365ba
--- /dev/null
+++ b/docs/specs/pre-version-1.0.txt
@@ -0,0 +1,88 @@
+===============
+Pre-version 1.0
+===============
+
+
+Request
+-------
+
+A remote method is invoked by sending a request to a remote service. The
+request is a single object serialized using JSON.
+
+It has two properties:
+
+* method - A String containing the name of the method to be invoked.
+
+* params - An Array of objects to pass as arguments to the method.
+
+The following imported function is not public and not intended for regular use
+as part of the API. Its use here is for spec-compliance demonstration only::
+
+    >>> from txjsonrpc.jsonrpclib import ServerProxy, VERSION_PRE1
+    >>>
+    >>> proxy = ServerProxy("http://some.url", version=VERSION_PRE1)
+    >>> proxy._getVersionedRequest("myfunc", ["arg1", "arg2", "arg3"])
+    '{"params": ["arg1", "arg2", "arg3"], "method": "myfunc"}'
+
+Note that this is the default behaviour as well: if we want to use the original
+txJSON-RPC version, we can just do this::
+
+    >>> from txjsonrpc.jsonrpclib import ServerProxy
+    >>>
+    >>> proxy = ServerProxy("http://some.url")
+    >>> proxy._getVersionedRequest("myfunc", ["arg1", "arg2", "arg3"])
+    '{"params": ["arg1", "arg2", "arg3"], "method": "myfunc"}'
+
+Note that all three txJSON-RPC subpackages make use of the same code for
+creating a payload to send to a JSON-RPC server. Here's an example for the
+twisted.web async request::
+
+    >>> from txjsonrpc.jsonrpclib import VERSION_PRE1
+    >>> from txjsonrpc.web.jsonrpc import QueryFactory
+    >>>
+    >>> factory = QueryFactory("path", "host", "myfunc", "user",
+    ...   "password", VERSION_PRE1, "arg1", "arg2", "arg3")
+    >>> factory.payload
+    '{"params": ["arg1", "arg2", "arg3"], "method": "myfunc"}'
+
+
+Response
+--------
+
+When the method invocation completes, the service must reply with a response.
+In the case of error-free method calls, the response sill simply be the JSON
+data for the result.
+
+In the case of an error, an object with the following attributes will be
+returned:
+
+* fault - The class name of the exception that was raised.
+
+* faultCode - The code that was passed when the exception was created.
+
+* faultString - The error messages that was passed when the exception was
+  created.
+
+Here's an example of a successful response::
+
+    >>> from txjsonrpc.jsonrpclib import dumps, VERSION_PRE1
+    >>>
+    >>> result = 8
+    >>> dumps(result, version=VERSION_PRE1)
+    '8'
+
+The default behaviour is to fall back to pre-Version 1.0 of the spec::
+
+    >>> from txjsonrpc.jsonrpclib import dumps
+    >>>
+    >>> result = 8
+    >>> dumps(result)
+    '8'
+
+Here's an example error response::
+
+    >>> from txjsonrpc.jsonrpclib import Fault, dumps
+    >>>
+    >>> error = Fault(86, "No more pasta")
+    >>> dumps(error)
+    '{"fault": "Fault", "faultCode": 86, "faultString": "No more pasta"}'
diff --git a/docs/specs/version-1.0.txt b/docs/specs/version-1.0.txt
new file mode 100644
index 0000000..a430c52
--- /dev/null
+++ b/docs/specs/version-1.0.txt
@@ -0,0 +1,92 @@
+===========
+Version 1.0
+===========
+
+
+Request
+-------
+
+A remote method is invoked by sending a request to a remote service. The
+request is a single object serialized using JSON.
+
+It has three properties:
+
+* method - A String containing the name of the method to be invoked.
+
+* params - An Array of objects to pass as arguments to the method.
+
+* id - The request id. This can be of any type. It is used to match the
+  response with the request that it is replying to. Due to the nature of
+  callbacks in Twisted, this property is not needed nor used by txJSON-RPC.
+  In the version 1.0 spec, it is provided for the sake of compatibility.
+
+The following imported function is not public and not intended for regular use
+as part of the API. Its use here is for spec-compliance demonstration only::
+
+    >>> from txjsonrpc.jsonrpclib import ServerProxy, VERSION_1
+    >>>
+    >>> proxy = ServerProxy("http://some.url", version=VERSION_1)
+    >>> proxy._getVersionedRequest("myfunc", ["arg1", "arg2", "arg3"], "anid")
+    '{"params": ["arg1", "arg2", "arg3"], "method": "myfunc", "id": "anid"}'
+
+Note that all three txJSON-RPC subpackages make use of the same code for
+creating a payload to send to a JSON-RPC server. Here's an example for the
+twisted.web async request::
+
+    >>> from txjsonrpc.jsonrpclib import VERSION_1
+    >>> from txjsonrpc.web.jsonrpc import QueryFactory
+    >>>
+    >>> factory = QueryFactory("path", "host", "myfunc", "user",
+    ...   "password", VERSION_1, "arg1", "arg2", "arg3")
+    >>> factory.payload
+    '{"params": ["arg1", "arg2", "arg3"], "method": "myfunc", "id": ""}'
... 3020 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/txjsonrpc.git



More information about the Python-modules-commits mailing list