Skip to content
4 changes: 2 additions & 2 deletions aerospike_helpers/cdt_ctx.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def cdt_ctx_list_index_create(index: int, order: int = 0, pad: bool = False) ->
Args:
index (int): The index to create the list at.
order (int): The :ref:`sort order <aerospike_list_order>` to create the List with.
(default: ``aerospike.LIST_UNORDERED``)
(default: :py:data:`aerospike.LIST_UNORDERED`)
pad (bool): If index is out of bounds and ``pad`` is :py:obj:`True`,
then the list will be created at the index with :py:obj:`None` elements inserted behind it.
``pad`` is only compatible with unordered lists.
Expand Down Expand Up @@ -309,7 +309,7 @@ def cdt_ctx_map_key_create(key: Any, order: int = 0) -> _cdt_ctx:
Args:
key (object): The key to create the map at.
order (int): The :ref:`sort order <aerospike_map_order>` to create the List with.
(default: ``aerospike.MAP_UNORDERED``)
(default: :py:data:`aerospike.MAP_UNORDERED`)

Returns:
:class:`~aerospike_helpers.cdt_ctx._cdt_ctx`
Expand Down
4 changes: 2 additions & 2 deletions aerospike_helpers/operations/bitwise_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ def bit_resize(bin_name: str, byte_size, policy=None, resize_flags: int = 0):
byte_size (int): The new size of the bytes.
policy (dict): The :ref:`bit_policy <aerospike_bit_policies>` dictionary. default: None.
resize_flags (int): :ref:`aerospike_bitwise_resize_flag` modifying the resize behavior
(default ``aerospike.BIT_RESIZE_DEFAULT``), such as ``aerospike.BIT_RESIZE_GROW_ONLY |
aerospike.BIT_RESIZE_FROM_FRONT``.
(default :py:data:`aerospike.BIT_RESIZE_DEFAULT`), such as :py:data:`aerospike.BIT_RESIZE_GROW_ONLY` |
:py:data:`aerospike.BIT_RESIZE_FROM_FRONT`.

Returns:
A dictionary usable in operate or operate_ordered. The format of the dictionary
Expand Down
8 changes: 5 additions & 3 deletions aerospike_helpers/operations/expression_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def expression_read(bin_name: str, expression: resources._BaseExpr, expression_r
bin_name (str): The name of the bin to read from. Even if no bin is being read from, the value will be returned
with this bin name.
expression: A compiled Aerospike expression, see :ref:`aerospike_operation_helpers.expressions`.
expression_read_flags (int): :ref:`aerospike_expression_read_flags` (default ``aerospike.EXP_READ_DEFAULT``)
expression_read_flags (int): :ref:`aerospike_expression_read_flags`
(default :py:data:`aerospike.EXP_READ_DEFAULT`)
Returns:
A dictionary to be passed to operate or operate_ordered.

Expand Down Expand Up @@ -84,8 +85,9 @@ def expression_write(bin_name: str, expression: resources._BaseExpr, expression_
Args:
bin_name (str): The name of the bin to write to.
expression: A compiled Aerospike expression, see :ref:`aerospike_operation_helpers.expressions`.
expression_write_flags (int): :ref:`aerospike_expression_write_flags` such as ``aerospike.EXP_WRITE_UPDATE_ONLY
| aerospike.EXP_WRITE_POLICY_NO_FAIL`` (default ``aerospike.EXP_WRITE_DEFAULT``).
expression_write_flags (int): :ref:`aerospike_expression_write_flags` such as
:py:data:`aerospike.EXP_WRITE_UPDATE_ONLY` | :py:data:`aerospike.EXP_WRITE_POLICY_NO_FAIL`
(default :py:data:`aerospike.EXP_WRITE_DEFAULT`).
Returns:
A dictionary to be passed to operate or operate_ordered.

Expand Down
2 changes: 1 addition & 1 deletion aerospike_helpers/operations/list_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ def list_sort(bin_name: str, sort_flags: int = 0, ctx: Optional[list] = None):
Args:
bin_name (str): The name of the bin to sort.
sort_flags (int): :ref:`aerospike_list_sort_flag` modifying the sorting behavior
(default ``aerospike.DEFAULT_LIST_SORT``).
(default :py:data:`aerospike.LIST_SORT_DEFAULT`).
ctx (list): An optional list of nested CDT :class:`cdt_ctx <aerospike_helpers.cdt_ctx>` context operation
objects.
Returns:
Expand Down
9 changes: 5 additions & 4 deletions aerospike_helpers/operations/map_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,8 @@ def map_remove_by_value_rank_range_relative(
Note:
This operation requires server version 4.3.0 or greater.

Examples for a key ordered map ``{0: 6, 6: 12, 10: 18, 15: 24}`` and return type of ``aerospike.MAP_RETURN_KEY``:
Examples for a key ordered map ``{0: 6, 6: 12, 10: 18, 15: 24}`` and return type of
:py:data:`aerospike.MAP_RETURN_KEY`:

::

Expand Down Expand Up @@ -1041,7 +1042,7 @@ def map_get_by_value_rank_range_relative(
Note:
This operation requires server version 4.3.0 or greater.

Examples for map ``{0: 6, 10: 18, 6: 12, 15: 24}`` and return type of ``aerospike.MAP_RETURN_KEY``.
Examples for map ``{0: 6, 10: 18, 6: 12, 15: 24}`` and return type of :py:data:`aerospike.MAP_RETURN_KEY`.
See :meth:`map_remove_by_value_rank_range_relative` for in-depth explanation.

::
Expand Down Expand Up @@ -1101,7 +1102,7 @@ def map_remove_by_key_index_range_relative(
should be considered an internal detail, and subject to change.

Examples for a key ordered map ``{0: 6, 6: 12, 10: 18, 15: 24}``
and return type of ``aerospike.MAP_RETURN_KEY``
and return type of :py:data:`aerospike.MAP_RETURN_KEY`

::

Expand Down Expand Up @@ -1175,7 +1176,7 @@ def map_get_by_key_index_range_relative(
This operation requires server version 4.3.0 or greater.

Examples for a key ordered map ``{0: 6, 6: 12, 10: 18, 15: 24}``
and return type of ``aerospike.MAP_RETURN_KEY``.
and return type of :py:data:`aerospike.MAP_RETURN_KEY`.
See :meth:`map_remove_by_key_index_range_relative` for in-depth explanation.

::
Expand Down
6 changes: 3 additions & 3 deletions doc/aerospike.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Overview
:platform: 64-bit Linux and OS X
:synopsis: Aerospike client for Python.

``aerospike`` is a package which provides a Python client for Aerospike database clusters.
:py:mod:`aerospike` is a package which provides a Python client for Aerospike database clusters.

The Aerospike client enables you to build an application in Python with an
Aerospike cluster as its database. The client manages the connections to the
Expand Down Expand Up @@ -1250,11 +1250,11 @@ List Sort Flags

Flags used by list sort.

.. data:: aerospike.LIST_SORT_DEFAULT
.. data:: LIST_SORT_DEFAULT

Default. Preserve duplicates when sorting the list.

.. data:: aerospike.LIST_SORT_DROP_DUPLICATES
.. data:: LIST_SORT_DROP_DUPLICATES

Drop duplicate values when sorting the list.

Expand Down
16 changes: 8 additions & 8 deletions doc/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ Numeric Operations
:param int offset: the value by which to increment the value in *bin*.
:type offset: :py:class:`int` or :py:class:`float`
:param dict meta: record metadata to be set. See :ref:`metadata_dict`.
:param dict policy: optional :ref:`aerospike_operate_policies`. Note: the ``exists`` policy option may not be: ``aerospike.POLICY_EXISTS_CREATE_OR_REPLACE`` nor ``aerospike.POLICY_EXISTS_REPLACE``
:param dict policy: optional :ref:`aerospike_operate_policies`. Note: the ``exists`` policy option may not be: :py:data:`aerospike.POLICY_EXISTS_CREATE_OR_REPLACE` nor :py:data:`aerospike.POLICY_EXISTS_REPLACE`
:raises: a subclass of :exc:`~aerospike.exception.AerospikeError`.

.. code-block:: python
Expand Down Expand Up @@ -666,7 +666,7 @@ User Defined Functions
:param dict policy: optional dictionary that takes in both :ref:`aerospike_scan_policies` and :ref:`aerospike_info_policies`.
:param dict options: the :ref:`aerospike_scan_options` that will apply to the scan.
:rtype: :class:`int`
:return: a job ID that can be used with :meth:`job_info` to check the status of the ``aerospike.JOB_SCAN``.
:return: a job ID that can be used with :meth:`job_info` to check the status of the :py:data:`aerospike.JOB_SCAN`.
:raises: a subclass of :exc:`~aerospike.exception.AerospikeError`.

.. method:: query_apply(ns, set, predicate, module, function[, args[, policy: dict]]) -> int
Expand All @@ -683,7 +683,7 @@ User Defined Functions
:param list args: the arguments to the UDF.
:param dict policy: optional dictionary that takes in both :ref:`aerospike_write_policies` and :ref:`aerospike_info_policies`.
:rtype: :class:`int`
:return: a job ID that can be used with :meth:`job_info` to check the status of the ``aerospike.JOB_QUERY``.
:return: a job ID that can be used with :meth:`job_info` to check the status of the :py:data:`aerospike.JOB_QUERY`.
:raises: a subclass of :exc:`~aerospike.exception.AerospikeError`.

.. method:: job_info(job_id, module[, policy: dict]) -> dict
Expand Down Expand Up @@ -1802,7 +1802,7 @@ Read Policies
* **replica**
| One of the :ref:`POLICY_REPLICA` values such as :data:`aerospike.POLICY_REPLICA_MASTER`
|
| Default: ``aerospike.POLICY_REPLICA_SEQUENCE``
| Default: :py:data:`aerospike.POLICY_REPLICA_SEQUENCE`

.. _aerospike_operate_policies:

Expand Down Expand Up @@ -1966,7 +1966,7 @@ Remove Policies
* **replica**
| One of the :ref:`POLICY_REPLICA` values such as :data:`aerospike.POLICY_REPLICA_MASTER`
|
| Default: ``aerospike.POLICY_REPLICA_SEQUENCE``
| Default: :py:data:`aerospike.POLICY_REPLICA_SEQUENCE`

.. _aerospike_batch_policies:

Expand Down Expand Up @@ -2285,12 +2285,12 @@ List Policies

* **write_flags**
| Write flags for the operation.
| One of the :ref:`aerospike_list_write_flag` values such as :data:`aerospike.LIST_WRITE_DEFAULT`
| One of the :ref:`aerospike_list_write_flag` values.
|
| Default: :data:`aerospike.LIST_WRITE_DEFAULT`
|
| Values should be or'd together:
| ``aerospike.LIST_WRITE_ADD_UNIQUE | aerospike.LIST_WRITE_INSERT_BOUNDED``
| :py:data:`aerospike.LIST_WRITE_ADD_UNIQUE` | :py:data:`aerospike.LIST_WRITE_INSERT_BOUNDED`

* **list_order**
| Ordering to maintain for the list.
Expand Down Expand Up @@ -2326,7 +2326,7 @@ Map Policies
| Default: :data:`aerospike.MAP_WRITE_FLAGS_DEFAULT`
|
| Values should be or'd together:
| ``aerospike.LIST_WRITE_ADD_UNIQUE | aerospike.LIST_WRITE_INSERT_BOUNDED``
| :data:`aerospike.LIST_WRITE_ADD_UNIQUE` | :data:`aerospike.LIST_WRITE_INSERT_BOUNDED`

.. note:: This is only valid for Aerospike Server versions >= 4.3.0.

Expand Down
4 changes: 2 additions & 2 deletions doc/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Assume this boilerplate code is run before all examples below:

:param dict policy: optional :ref:`aerospike_write_policies`.

:return: a job ID that can be used with :meth:`~aerospike.Client.job_info` to track the status of the ``aerospike.JOB_QUERY`` , as it runs in the background.
:return: a job ID that can be used with :meth:`~aerospike.Client.job_info` to track the status of the :py:data:`aerospike.JOB_QUERY` , as it runs in the background.

.. code-block:: python

Expand Down Expand Up @@ -532,7 +532,7 @@ Policies
* **replica**
| One of the :ref:`POLICY_REPLICA` values such as :data:`aerospike.POLICY_REPLICA_MASTER`
|
| Default: ``aerospike.POLICY_REPLICA_SEQUENCE``
| Default: :py:data:`aerospike.POLICY_REPLICA_SEQUENCE`

.. _aerospike_query_options:

Expand Down
4 changes: 2 additions & 2 deletions doc/scan.rst
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ Methods

:param dict policy: optional :ref:`aerospike_write_policies`.

:return: a job ID that can be used with :meth:`~aerospike.Client.job_info` to track the status of the ``aerospike.JOB_SCAN``, as it runs in the background.
:return: a job ID that can be used with :meth:`~aerospike.Client.job_info` to track the status of the :py:data:`aerospike.JOB_SCAN`, as it runs in the background.

.. note::
Python client version 3.10.0 implemented scan execute_background.
Expand Down Expand Up @@ -481,7 +481,7 @@ Policies
* **replica**
| One of the :ref:`POLICY_REPLICA` values such as :data:`aerospike.POLICY_REPLICA_MASTER`
|
| Default: ``aerospike.POLICY_REPLICA_SEQUENCE``
| Default: :py:data:`aerospike.POLICY_REPLICA_SEQUENCE`
* **ttl** (:class:`int`)
The default time-to-live (expiration) of the record in seconds. This field will only be used on
background scan writes if :py:attr:`aerospike.Scan.ttl` is set to
Expand Down
Loading