.. This file is part of Ulra Light Weight Qtils. Ulra Light Weight Qtils is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. Ulra Light Weight Qtils is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Ulra Light Weight Qtils. If not, see . .. _index: Welcome to Qtils 0.11.0 documentation! ======================================= .. image:: _static/qtils-logo.png Overview ---------- Qtils - pronounced as cutieels - is a syntactic sugar library to make sweet Python coding even sweeter. Dedication ------------- This library is dedicated to **Pál Hubai, Surfy**, my programming Master who spent countless hours answering my questions, providing code examples, and guiding me towards the right approach when I was learning programming as a child. Quick links ------------- - :ref:`tut_index` - :ref:`apidoc_index` - :ref:`Full Contents ` - :ref:`migration_from_sutils` Features ---------- - Convenient collections :class:`qdict `, :class:`qlist ` and :class:`QEnum ` - Self-formatting object in :class:`PrettyObject ` - Two-way formatter/parser for file sizes, for example '5.4 GB' in :class:`DataSize ` - Weak reference property decorator :func:`weakproperty ` - Cached property decorator :func:`cachedproperty ` - Class logger decorator :func:`logged ` - Common string transformations in :mod:`qtils.string_utils` Installation -------------- .. code-block:: bash $ pip install qtils Examples --------- .. code-block:: python >>> from qtils import * >>> d = qdict() >>> d.hello = "world" >>> d.hello 'world' >>> class MyObject(PrettyObject): ... __pretty_fields__ = [ ... 'hello', ... 'answer', ... ] ... def __init__(self, hello, answer): ... self.hello = hello ... self.answer = answer >>> obj = MyObject('world', 42) >>> print(obj) <__main__.MyObject object at ... hello='world', answer=42> >>> print(DataSize(123000)) 123 k >>> DataSize('1.45 megabytes') 1450000 See more examples and usage in :ref:`examples and tutorials `. Contribution ------------------- - Pull requests are always welcome! - Please have a look at the :ref:`developer guide ` to get started. Full Contents -------------------------- .. _toc: .. toctree:: :maxdepth: 2 tutorial/index devguide apidoc/index migration Indices and tables -------------------- * :ref:`genindex` * :ref:`modindex` * :ref:`search`