Package: ztfy.utils
ContentsWhat is ztfy.utils ?How to use ztfy.utils ?Changelog0.4.160.4.15.10.4.150.4.140.4.130.4.120.4.110.4.100.4.90.4.80.4.70.4.60.4.50.4.40.4.30.4.20.4.10.4.00.3.140.3.130.3.120.3.110.3.100.3.90.3.80.3.70.3.60.3.50.3.40.3.30.3.20.3.10.30.2.10.20.1What is ztfy.utils ?ztfy.utils is a set of classes and functions which can be used to handle many small operations.Internal sub-packages include :date : convert dates to unicode ISO format, parse ISO datetime, convert date to datetimerequest : get current request, get request annotations, get and set request data via annotationssecurity : get unproxied value of a given object ; can be applied to lists or dictstimezone : convert datetime to a given timezone ; provides a server default timezone utilitytraversing : get object parents until a given interface is implementedunicode : convert any text to unicode for easy storageprotocol : utility functions and modules for several nerwork protocolscatalog : TextIndexNG index for Zope catalog and hurry.query “Text” query itemtext : simple text operations and text to HTML conversionhtml : HTML parser and HTML to text converterfile : file upload data convertertal : text and HTML conversions for use from within TALHow to use ztfy.utils ?A set of ztfy.utils usage are given as doctests in ztfy/utils/doctests/README.txtChangelog0.4.16added HTTP client option to disable SSL certificate verification0.4.15.1packaging mismatch!  :-/0.4.15modified request property decorator0.4.14modified cookies management in XML-RPC cookie authenticated transport0.4.13added check in dates management functions to handle years prior to 19000.4.12added “getClientFromURL()” function to HTTP client module to build an HTTP client from a simple URL0.4.11added “encode” and “decode” functions in “ztfy.utils.unicode” module (with updated doctests)0.4.10added configuration directives to remove static dependencies with “ztfy.skin” and “zopyx.txng3.core”updated Buildout’s bootstrap0.4.9added “ztfy.utils.decorator” module with “@deprecated” decorator0.4.8remove security proxy in ITransactionManager adapter0.4.7added new “component” registry utility moduleadded date and datetime display formatsadded “keep_chars” argument in translateString function0.4.6added ISet interface with permissions on zc.set.Set class0.4.5make current participation request optional in “indexObject()” function0.4.4added “allow_none” and “headers” arguments in XML-RPC “getClient()” methods0.4.3change test for date types in tztime/gmtime functions (because datetime
inherits from date!)0.4.2small correction in getHumanSize() functionadded dates formatting functionsadded check between date and datetime types in timezone module0.4.1use request locale formatter in getHumanSize function0.4.0move custom schema fields widgets to ZTFY.skin package0.3.14added legend on ZEO connection properties edit formforce usage of “escapeSlashes” argument when checking new content name0.3.13added ZEO connection interface, utility and toolsadded “ztfy.utils.container” utility moduleadded a persistent utility to store ZEO connection settingsadded “TextLine list” schema field and widgetadded request and session cached propertiesadded Python 2.7 compatibility code and timeout parameter to XML-RPC
protocol helperchanged request “data:” TAL namespace to basic HTTP request so it can be used
in views called via JSON-RPC or XML-RPC0.3.12updated package source layout0.3.11added dotted decimal schema field, not handling locales :-/0.3.10upgraded for ztfy.jqueryui 0.6.0added Color schema field and widgetadded StringLine schema fieldadded “text:translate” TAL adaptermoved ITransactionManager adapter from ztfy.scheduler package0.3.9added HTTP client based on httplib2, handling authentication and proxies0.3.8corrected encodings vocabulary0.3.7added encodings vocabulary0.3.6corrected code and translations in MissingPrincipal classadded permissions on TextIndexNG index0.3.5re-add IList and IDict interfaces forgotten from bad merge :-(0.3.4better check for missing requests0.3.3Added “fanstatic:” TALES expression0.3.2Mark ztfy.utils.security functions and classes as deprecated0.3.1Updated signature in ztfy.utils.catalog.index to match last hurry.query release0.3Switched to ZTK-1.1.2 and Python 2.6Added “getAge” function in date moduleAdded session module and TALES adapter to get/set session valuesCheck None value in catalog.getObjectId(…) and catalog.getObject(…) methods0.2.1Added ‘site.locateAndRegister’ facility functionUpdate ServerTimezoneUtility parent classes0.2Added ‘data’ namespace to access request data0.1Initial release