python-bidi API Reference

Full documentation for python-bidi (Standard Library / Native)

python-bidi.VERSION
Error rendering doc: No Python documentation found for '0.6.11'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.
python-bidi.VERSION_TUPLE
Python Library Documentation: tuple object

class tuple(object)
 |  tuple(iterable=(), /)
 |
 |  Built-in immutable sequence.
 |
 |  If no argument is given, the constructor returns an empty tuple.
 |  If iterable is specified the tuple is initialized from iterable's items.
 |
 |  If the argument is a tuple, the return value is the same object.
 |
 |  Built-in subclasses:
 |      asyncgen_hooks
 |      UnraisableHookArgs
 |
 |  Methods defined here:
 |
 |  __add__(self, value, /)
 |      Return self+value.
 |
 |  __contains__(self, key, /)
 |      Return bool(key in self).
 |
 |  __eq__(self, value, /)
 |      Return self==value.
 |
 |  __ge__(self, value, /)
 |      Return self>=value.
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __getitem__(self, key, /)
 |      Return self[key].
 |
 |  __getnewargs__(self, /)
 |
 |  __gt__(self, value, /)
 |      Return self>value.
 |
 |  __hash__(self, /)
 |      Return hash(self).
 |
 |  __iter__(self, /)
 |      Implement iter(self).
 |
 |  __le__(self, value, /)
 |      Return self<=value.
 |
 |  __len__(self, /)
 |      Return len(self).
 |
 |  __lt__(self, value, /)
 |      Return self<value.
 |
 |  __mul__(self, value, /)
 |      Return self*value.
 |
 |  __ne__(self, value, /)
 |      Return self!=value.
 |
 |  __repr__(self, /)
 |      Return repr(self).
 |
 |  __rmul__(self, value, /)
 |      Return value*self.
 |
 |  count(self, value, /)
 |      Return number of occurrences of value.
 |
 |  index(self, value, start=0, stop=9223372036854775807, /)
 |      Return first index of value.
 |
 |      Raises ValueError if the value is not present.
 |
 |  ----------------------------------------------------------------------
 |  Class methods defined here:
 |
 |  __class_getitem__(...)
 |      See PEP 585
 |
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 |
 |  __new__(*args, **kwargs)
 |      Create and return a new object.  See help(type) for accurate signature.
python-bidi.bidi
Python Library Documentation: module bidi.bidi in bidi

NAME
    bidi.bidi

FUNCTIONS
    get_base_level_inner(text)

    get_display_inner(text, base_dir=None, debug=False)

DATA
    __all__ = ['get_display_inner', 'get_base_level_inner']

FILE
    c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\bidi\bidi.cp312-win_amd64.pyd

python-bidi.get_base_level
Python Library Documentation: function get_base_level in module bidi.wrapper

get_base_level(text: str) -> int
    Returns the base unicode level of the 1st paragraph in `text`.

    Return value of 0 means LTR, while 1 means RTL.
python-bidi.get_display
Python Library Documentation: function get_display in module bidi.wrapper

get_display(str_or_bytes: Union[str, bytes], encoding: str = 'utf-8', base_dir: Optional[str] = None, debug: bool = False) -> Union[str, bytes]
    Accepts string or bytes. In case of bytes, `encoding`
    is needed as the inner function expects a valid string (default:"utf-8").

    Set `base_dir` to 'L' or 'R' to override the calculated base_level.

    Set `debug` to True to return the calculated levels.

    Returns the display layout, either as unicode or `encoding` encoded
    string.
python-bidi.main
Python Library Documentation: function main in module bidi

main()
    Will be used to create the console script
python-bidi.wrapper
Python Library Documentation: module bidi.wrapper in bidi

NAME
    bidi.wrapper - Provides a wrpper for the Rust based implementation.

FUNCTIONS
    get_base_level(text: str) -> int
        Returns the base unicode level of the 1st paragraph in `text`.

        Return value of 0 means LTR, while 1 means RTL.

    get_base_level_inner(text)

    get_display(str_or_bytes: Union[str, bytes], encoding: str = 'utf-8', base_dir: Optional[str] = None, debug: bool = False) -> Union[str, bytes]
        Accepts string or bytes. In case of bytes, `encoding`
        is needed as the inner function expects a valid string (default:"utf-8").

        Set `base_dir` to 'L' or 'R' to override the calculated base_level.

        Set `debug` to True to return the calculated levels.

        Returns the display layout, either as unicode or `encoding` encoded
        string.

    get_display_inner(text, base_dir=None, debug=False)

DATA
    Optional = typing.Optional
        Optional[X] is equivalent to Union[X, None].

    StrOrBytes = typing.Union[str, bytes]
    Union = typing.Union
        Union type; Union[X, Y] means either X or Y.

        On Python 3.10 and higher, the | operator
        can also be used to denote unions;
        X | Y means the same thing to the type checker as Union[X, Y].

        To define a union, use e.g. Union[int, str]. Details:
        - The arguments must be types and there must be at least one.
        - None as an argument is a special case and is replaced by
          type(None).
        - Unions of unions are flattened, e.g.::

            assert Union[Union[int, str], float] == Union[int, str, float]

        - Unions of a single argument vanish, e.g.::

            assert Union[int] == int  # The constructor actually returns int

        - Redundant arguments are skipped, e.g.::

            assert Union[int, str, int] == Union[int, str]

        - When comparing unions, the argument order is ignored, e.g.::

            assert Union[int, str] == Union[str, int]

        - You cannot subclass or instantiate a union.
        - You can use Optional[X] as a shorthand for Union[X, None].

FILE
    c:\users\youse\appdata\local\programs\python\python312\lib\site-packages\bidi\wrapper.py