Developer’s guide¶
Tarantool database basic concepts¶
To understand, what is “space”, “tuple” and what basic operations are, refer to Tarantool data model documentation.
Field types¶
Tarantool uses MessagePack as a format for receiving requests and sending responses. Refer to Lua versus MessagePack to see how types are encoded and decoded.
While working with Tarantool from Python with this connector, each request data is encoded to MessagePack and each response data is decoded from MessagePack with the Python MessagePack module. See its documentation to explore how basic types are encoded and decoded.
There are several cases when you may tune up the behavior.
Use tarantool.Connection
parameters to set Python MessagePack
module options.
Use encoding
to tune
behavior for string encoding.
encoding='utf-8'
(default):
encoding=None
(work with non-UTF8 strings):
Use use_list
to tune
behavior for mp_array (Lua table
) decoding.
use_list='True'
(default):
use_list='False'
:
Tarantool implements several extension types. In Python, they are represented with in-built and custom types:
Python
->
Tarantool
->
Python
->
->
->
->
->
->
->
->
->
->
Request response¶
Server requests (except for ping()
)
return Response
instance in case
of success.
Response
is inherited from
collections.abc.Sequence
, so you can index response data
and iterate through it as with any other serializable object.