Skip to content

Update Python connectors page #3677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 10, 2023
Merged
Changes from all commits
Commits
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
57 changes: 9 additions & 48 deletions doc/book/connectors/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,197 +36,158 @@ all went well. If the tuple already exists, the program will throw
The example program only shows one request and does not show all that's
necessary for good practice. For that, please see
`tarantool-python <http://github.com/tarantool/tarantool-python>`__ project at GitHub.
For an example of using Python API with
`queue managers for Tarantool <https://github.com/tarantool/queue>`__, see
`queue-python <https://github.com/tarantool/queue-python>`__ project at GitHub.

Also there are several community-driven Python connectors:

* `asynctnt <https://github.com/igorcoding/asynctnt>`__ with asyncio support
* `aiotarantool <https://github.com/shveenkov/aiotarantool>`__ also with asyncio support
* `aiotarantool <https://github.com/shveenkov/aiotarantool>`__ also with asyncio support, **no active maintenance**
* `gtarantool <https://github.com/shveenkov/gtarantool>`__ with gevent support, **no active maintenance**

The table below contains a feature comparison for asynctnt, gtarantool and
tarantool-python. aiotarantool is absent there because it is quite outdated and
The table below contains a feature comparison for asynctnt and
tarantool-python. aiotarantool and gtarantool are absent there because they are quite outdated and
unmaintained.

.. _python-feature-comparison:

Feature comparison
------------------

Last update: November 2022
Last update: September 2023

.. list-table::
:header-rows: 1
:stub-columns: 1

* - Parameter
- `igorcoding/asynctnt <https://github.com/igorcoding/asynctnt>`__
- `shveenkov/gtarantool <https://github.com/shveenkov/gtarantool>`__
- `tarantool/tarantool-python <https://github.com/tarantool/tarantool-python>`__

* - License
- Apache License 2.0
- LGPL
- BSD-2

* - Is maintained
- Yes
- No (last updated in 2016)
- Yes

* - Known Issues
- None
- None
- None

* - Documentation
- Yes (`github.io <https://igorcoding.github.io/asynctnt/>`__)
- No
- Yes (`readthedocs
<https://tarantool-python.readthedocs.io/en/latest/quick-start.en.html>`__
and :ref:`tarantool.io <getting_started-python>`)

* - Testing / CI / CD
- GitHub Actions
- No (tests exist)
- GitHub Actions

* - GitHub Stars
- 68
- 17
- 85
- 73
- 92

* - Static Analysis
- Yes (Flake8)
- No
- No
- Yes (Flake8, Pylint)

* - Packaging
- `pip <https://pypi.org/project/asynctnt/>`__
- `pip <https://pypi.org/project/gtarantool/>`__
- `pip, deb, rpm <https://github.com/tarantool/tarantool-python#download-and-install>`__

* - Code coverage
- Yes
- No
- Yes

* - Support asynchronous mode
- Yes, `asyncio <https://docs.python.org/3/library/asyncio.html>`__
- Yes (`gevent
<https://www.gevent.org/api/gevent.event.html#gevent.event.AsyncResult>`__,
example: `test_gevent.py
<https://github.com/shveenkov/gtarantool/blob/master/tests/test_gevent.py>`__)
- No

* - Batching support
- No
- No
- No (`issue #55 <https://github.com/tarantool/tarantool-python/issues/55>`__)
- Yes (with CRUD API)

* - Schema reload
- Yes (automatically, see `auto_refetch_schema <https://igorcoding.github.io/asynctnt/api.html>`__)
- Yes (automatically)
- Yes (automatically)

* - Space / index names
- Yes
- Yes
- Yes

* - Access tuple fields by names
- Yes
- No
- No

* - :ref:`SQL support <reference_sql>`
- Yes
- No
- Yes

* - :ref:`Interactive transactions <txn_mode_stream-interactive-transactions>`
- Yes
- No
- No (`issue #163 <https://github.com/tarantool/tarantool-python/issues/163>`__)

* - :ref:`Varbinary support <index-box_data-types>`
- Yes (in ``MP_BIN`` fields)
- No
- Yes

* - :ref:`Decimal support <msgpack_ext-decimal>`
- Yes
- No
- Yes

* - :ref:`UUID support <msgpack_ext-uuid>`
- Yes
- No
- Yes

* - :ref:`EXT_ERROR support <msgpack_ext-error>`
- Yes
- No
- Yes

* - :ref:`Datetime support <msgpack_ext-datetime>`
- Yes
- No
- Yes

* - :ref:`Interval support <msgpack_ext-interval>`
- No (`issue #30 <https://github.com/igorcoding/asynctnt/issues/30>`__)
- No
- Yes

* - :ref:`box.session.push() responses <box_session-push>`
- Yes
- No
- Yes

* - :ref:`Session settings <box_space-session_settings>`
- No
- No
- No

* - `Graceful shutdown <https://github.com/tarantool/tarantool/issues/5924>`__
- No
- No
- No

* - `IPROTO_ID (feature discovery) <https://github.com/tarantool/doc/issues/2419>`__
- Yes
- No
- Yes

* - `CRUD support <https://github.com/tarantool/crud>`__
- No
- No
- No (`issue #205 <https://github.com/tarantool/tarantool-python/issues/205>`__)
- Yes

* - Transparent request retrying
- No
- No
- No

* - Transparent reconnecting
- Autoreconnect
- Yes (reconnect_max_attempts, reconnect_delay)
- Yes (reconnect_max_attempts, reconnect_delay), checking of connection liveness

* - Connection pool
- No
- No
- Yes (with master discovery)

* - Support of `PEP 249 -- Python Database API Specification v2.0 <https://www.python.org/dev/peps/pep-0249/>`__
- No
- No
- `Yes <https://github.com/tarantool/tarantool-python/wiki/PEP-249-Database-API>`__

* - `Encrypted connection (Tarantool Enterprise) <https://www.tarantool.io/en/enterprise_doc/security/#enterprise-iproto-encryption>`__
- No (`issue #22 <https://github.com/igorcoding/asynctnt/issues/22>`__)
- No
- Yes