Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
c8babc1
kt_http.py crashes when we are getting an empty key value
Sep 20, 2013
e4c7cbd
if we are setting a string, do not pack it as an object
danifbento Dec 10, 2013
f7467b0
Merge branch 'master' of https://github.com/upverter/python-kyototycoon
danifbento Dec 10, 2013
a6482c6
fix EOFError
danifbento Dec 17, 2013
10a68ca
add support for json packer/unpacker
danifbento Dec 19, 2013
fdcc4bf
fix multidb handling
May 6, 2013
854ee04
Minimal binary protocol support (get/get_bulk/set/set_bulk only).
carlosefr Dec 28, 2013
5cfccd8
Support remove/remove_bulk with the binary protocol, making the minim…
carlosefr Dec 28, 2013
bd66771
Updated README with binary protocol support information.
carlosefr Dec 28, 2013
75cb2e7
Removed two not implemented methods that were only actually used by t…
carlosefr Dec 29, 2013
ad659ca
Removed a useless time import, also left over from the HTTP transport…
carlosefr Dec 29, 2013
286df07
Merge pull request #1 from carlosefr/master
danifbento Dec 29, 2013
69ba2d6
Fixed exception with unicode keys in the binary protocol.
carlosefr Dec 30, 2013
fab50cc
Proper handling of closed sockets. (Fixes CPU hogging on socket close…
carlosefr Dec 30, 2013
1c4a471
Merge pull request #2 from carlosefr/master
danifbento Jan 2, 2014
a7e8824
Small performance improvements. Use 'python-cjson' for extra performa…
carlosefr Jan 12, 2014
db53412
Added a script to benchmark the library with several parameters.
carlosefr Jan 12, 2014
666df25
Altered the README for markdown syntax, plus a few content changes.
carlosefr Jan 12, 2014
a3de64c
Bump version.
carlosefr Jan 12, 2014
77b0abe
Merge pull request #6 from carlosefr/master
danifbento Jan 12, 2014
7a6bc26
Reverted README to reStructuredText, needed for PyPI.
carlosefr Jan 14, 2014
cfdbf1f
Modify shebang line in the performance script to support virtualenv.
carlosefr Jan 14, 2014
aef497e
Merge pull request #7 from carlosefr/master
danifbento Jan 15, 2014
bf72f66
Replace json for simplejson, it is better supported and seemingly as …
carlosefr Jan 16, 2014
a5b25c4
Merge pull request #8 from carlosefr/master
danifbento Jan 17, 2014
85dd288
Python 3 support. Better handling of unicode keys and values with non…
carlosefr Jan 18, 2014
13af102
Updated README with Python 3 support.
carlosefr Jan 18, 2014
88aecea
Updated information for PyPI
carlosefr Jan 18, 2014
c809268
Drop percentcoding requirement (no measurable performance improvement…
carlosefr Jan 18, 2014
73568a9
Make cursors work for Python 3.x. Add test suite for cursors.
carlosefr Jan 18, 2014
707e032
Ignore Python 3's cache directory.
carlosefr Jan 18, 2014
d5c71b8
Test suite for the binary protocol. Fixed inconsistencies with error …
carlosefr Jan 18, 2014
638f1ff
Added Makefile to clean the tree.
carlosefr Jan 18, 2014
2ee63ec
Fixed cursor tests.
carlosefr Jan 18, 2014
9961062
Handle integer database IDs correctly over HTTP.
carlosefr Jan 19, 2014
9f54034
Merge pull request #9 from carlosefr/master
danifbento Jan 21, 2014
36c7752
Docstrings for public methods. Fix append behavior (support all packe…
carlosefr Feb 1, 2014
eaa92c6
Better message for not-implemented methods. Use compact JSON on set.
carlosefr Feb 1, 2014
0e2bac9
Added play_script method to both protocols.
carlosefr Feb 1, 2014
9ef48b1
More issues with encoding fixed.
carlosefr Feb 1, 2014
3014041
Fix more encoding errors. Remove useless error checks (let it throw e…
carlosefr Feb 1, 2014
008dd76
Match expires behavior in the binary protocol with HTTP. Cleanups.
carlosefr Feb 2, 2014
60b1240
Fixed expiration with the binary protocol. Fixed cas with multiple da…
carlosefr Feb 2, 2014
4ac8b5f
Update README for play_script. Bump version.
carlosefr Feb 2, 2014
e88dc28
Fixed two more elusive HTTP key quoting issues.
carlosefr Feb 2, 2014
2054458
Pass DB in path for match_prefix, for consistency.
carlosefr Feb 2, 2014
b53a6fb
Exclude the play script test case from the default test suite.
carlosefr Feb 3, 2014
3deb168
Merge pull request #10 from carlosefr/master
danifbento Feb 3, 2014
bca3a23
Support for bytes (raw) and custom packers.
carlosefr Feb 5, 2014
1885019
Improved README.
carlosefr Feb 5, 2014
06c884e
Merge pull request #11 from carlosefr/master
danifbento Feb 5, 2014
9f8dca3
Removed "#!" line from the top of non-executable files and replace vim
carlosefr Feb 9, 2014
93c8e81
Update README. Bump version.
carlosefr Feb 9, 2014
b3844ad
Merge pull request #12 from carlosefr/master
danifbento Feb 10, 2014
c0f6c30
Add 'ok()' method to KyotoTycoonError make checking for errors cleaner.
carlosefr Feb 11, 2014
22303c3
Optionally raise exceptions in addition to silently setting an error …
carlosefr Feb 12, 2014
3892f71
Raise an exception if 'atomic=True' is used with the binary protocol.
carlosefr Feb 13, 2014
fd532f2
Don't flag an error for empty keys, doing nothing is just fine.
carlosefr Feb 13, 2014
f687217
Set proper atomic default depending on protocol used.
carlosefr Feb 14, 2014
d7a23c4
Make compare-and-swap atomic.
carlosefr Feb 14, 2014
94d7b3b
Make the KyotoTycoon object usable in 'with' statements.
carlosefr Feb 16, 2014
4eb1aa8
Added 'connect()' method to make 'with' statements more explicit.
carlosefr Feb 17, 2014
5afdce4
Merge pull request #13 from carlosefr/master
danifbento Feb 18, 2014
5e60879
Rename README to reflect format.
carlosefr Feb 22, 2014
8b23be1
Do not depend on simplejson anymore. Proper benchmarks with recent Py…
carlosefr Mar 6, 2014
80105de
Default database to 0. Do not clobber python keywords.
carlosefr Mar 7, 2014
e89f2ec
Always include DB in path.
carlosefr Mar 7, 2014
9410d03
Remove redundant database checks.
carlosefr Mar 7, 2014
b037926
Bump version.
carlosefr Mar 7, 2014
9d3faff
Merge pull request #14 from carlosefr/master
danifbento Mar 17, 2014
f373e76
Updated README to make clear that this is a compatibility-breaking fork.
carlosefr Mar 19, 2014
3393ee3
All errors are reported through exceptions now. Adapted unit tests to…
carlosefr Mar 19, 2014
58acf69
Bump version to reflect exception changes.
carlosefr Mar 19, 2014
2866de0
Remove now dangling error method.
carlosefr Mar 20, 2014
4131d48
Merge pull request #15 from carlosefr/master
danifbento May 7, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.pyc
/build
__pycache__
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
clean:
find . -name '*~' | xargs rm -f
find . -name '*.pyc' | xargs rm -f
rm -rf build/
rm -rf tests/__pycache__
rm -rf kyototycoon/__pycache__
35 changes: 0 additions & 35 deletions README

This file was deleted.

83 changes: 83 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
ABOUT
-----
This is a native Python client library for the Kyoto Tycoon server,
supporting both Python 2 and 3. It includes significant performance
improvements and bug fixes over the (now seemingly unmaintained)
original library by Toru Maesaka and Stephen Hamer.

For more information on Kyoto Tycoon server, please refer to:

http://fallabs.com/kyototycoon/


FEATURES
--------
The more efficient binary protocol is also supported along with
the HTTP protocol. It provides a performance improvement of up
to 6x, but only the following operations are available:

* ``get()`` and ``get_bulk()``
* ``set()`` and ``set_bulk()``
* ``remove()`` and ``remove_bulk()``
* ``play_script()``

Atomic operations aren't supported with the binary protocol,
the use of "atomic=False" is mandatory when using it. Operations
besides these will raise a ``NotImplementedError`` exception.

It's possible to have two KyotoTycoon objects open to the same
server in the same application, one using HTTP and the other
using the binary protocol, if necessary.

The library does automatic packing and unpacking (marshalling)
of values coming from/to the database. The following data
storage formats are available by default:

* ``KT_PACKER_PICKLE`` - Python "pickle" format.
* ``KT_PACKER_JSON`` - JSON format (compact representation).
* ``KT_PACKER_STRING`` - Strings (UTF-8).
* ``KT_PACKER_BYTES`` - Binary data.

There is also a ``KT_PACKER_CUSTOM`` format available where you
can specify your own object to do the marshalling. This object
needs to provide the following two methods:

* ``.pack(self, data)`` - convert "data" to ``bytes()``
* ``.unpack(self, data)`` - convert "data" from ``bytes()``

Marshalling is done for all methods except ``play_script()``,
because the server can return data in more than one format at
once. The caller will most likely know the type of data that
the called script returns and must do the marshalling itself.


COMPATIBILITY
-------------
This library is still not at version 1.0, which means the API and
behavior are not guaranteed to remain consistent between versions.

Support for using an error object has been removed. If you need
the old behavior for compatibility reasons, use a version up to
(and including) v0.5.9. Versions later than this raise exceptions
on all Kyoto Tycoon errors.



INSTALLATION
------------
You can install the latest version of this library from source::

python setup.py build
python setup.py install

AUTHORS
-------
* Toru Maesaka <dev@torum.net>
* Stephen Hamer <stephen.hamer@upverter.com>
* Carlos Rodrigues <cefrodrigues@gmail.com>

Binary protocol support was added based on Ulrich Mierendorff's
code with only minimal changes to make it fit this library.
You can find the original library at the following URL:

http://www.ulrichmierendorff.com/software/kyoto_tycoon/python_library.html
14 changes: 13 additions & 1 deletion kyototycoon/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
from kyototycoon import *
# -*- coding: utf-8 -*-

from .kyototycoon import KyotoTycoon

from .kt_common import KT_PACKER_CUSTOM, \
KT_PACKER_PICKLE, \
KT_PACKER_JSON, \
KT_PACKER_STRING, \
KT_PACKER_BYTES

from .kt_error import KyotoTycoonException

# EOF - __init__.py
Loading