Package: pyams-utils
ContentsWhat is PyAMS?What is PyAMS_utils?Changelog2.3.12.3.02.2.02.1.02.0.32.0.22.0.12.0.01.17.01.16.21.16.11.16.01.15.11.15.01.14.01.13.11.13.01.12.31.12.21.12.11.12.01.11.61.11.51.11.41.11.31.11.21.11.11.11.01.10.01.9.21.9.11.9.01.8.11.8.01.7.11.7.01.6.11.6.01.5.21.5.11.5.01.4.31.4.21.4.11.4.01.3.81.3.71.3.61.3.51.3.41.3.31.3.21.3.11.3.01.2.81.2.71.2.61.2.51.2.41.2.31.2.21.2.11.2.01.1.41.1.31.1.21.1.11.1.01.0.0What is PyAMS?PyAMS (Pyramid Application Management Suite) is a small suite of packages written for applications
and content management with the Pyramid framework.PyAMSis actually mainly used to manage web sites through content management applications (CMS,
see PyAMS_content package), but many features are generic and can be used inside any kind of web
application.All PyAMS documentation is available onReadTheDocs; source code
is available onGitlaband pushed toGithub.What is PyAMS_utils?PyAMS_utils is a large set of small generic modules used to handle PyAMS applications.These modules provide several decorators used to declare object factories, adapters, utilities
and vocabularies; they also provide a large set of adapters, utilities and predicates related to
many common operations like caching, dates management, data API, text conversions, request
properties…, as well as custom schema fields.When included into Pyramid’s configuration, this package also register several Zope packages
through ZCML, typically to automatically inclure DublinCore extensions or IntIDs management.Most PyAMS_utils modules are documented using doctests in the /doctests/ sub-directory.Changelog2.3.1added helper to get next item from any iterable2.3.0added helper to get interface base nameupdated parent getter, and added new getter to get parents from context until a given interface
is found2.2.0updated base container mixin classmoved finding helpers to new module2.1.0added text function to get sub-parts from input stringadded helper to load object from ZODB from it’s OID2.0.3added helper to IUniqueID interface getter2.0.2updated local utilities title getter2.0.1updated Buildout configuration2.0.0migrated to Pyramid 2.01.17.0added TALES extensions for date formattingadded ISO countries mapping and vocabularyadded support for HTTP proxy schema fieldadded Colander “StringArraySchema” type to handle inputs which can be provided as strings using a
given separator, or as arraysadded support for parameters in absolute and canonical URL adaptersupdated base CORS requests handleradd result to current connection when creating annotation adapterupdated local utilities vocabulary terms title factoryconverted cache key adapters to use hexadecimal values1.16.2added REST API helpers, types converters and base responsesmoved Swagger/OpenAPI specifications toPyAMS_zmipackage1.16.1added constant for “missing” stringupdated date and datetime range schema fields interfaces1.16.0added new “isodate” formatter totimestampTALES extension, to only get date instead of
datetime in ISO formatadded “boolean_dict” helper to check that a mapping has at least one key which doesn’t
have an empty value1.15.1added support for Python 3.11added a few types hints1.15.0added new text renderers interfaces and support; the goal of these interfaces is to be able
to include dynamic fragments into a static string which will be evaluated at runtime; this
string can be, for example, an SQL query or a JSON object which could be used to provide
arguments to a REST service, and is actually usable by PyAMS tasks scheduler1.14.0added RPC protocols helper moduleadded object factory helper function1.13.1updated CORS request handler interface to be able to specify supported HTTP methods when
REST service is not based on Cornice1.13.0added custom interface and default adapter to handle CORS requests1.12.3updated CORS headers support1.12.2updated Gitlab-CI configuration1.12.1added support helpers for CORS preflight OPTIONS verb used by REST services1.12.0removed Pypy3 support from Gitlab-CI because of build issues with Twine and Cryptographyadded small “is not None” filter helperadded text renderers for vocabulary-based propertiesremoved unused Pygments resource1.11.6updated Pypy 3 support1.11.5updated Pypy 3 support1.11.4added support for Python 3.10 and Pypy 31.11.3check if provided argument is an interface in object factory getteradded volatile property setter1.11.2added helper function infactorymodule to get all registered factories
for a given interfacecatch RuntimeError in boolean iterator checker to handle Python 3.7+ use case where
a StopIteration raised from inside a generator is transformed into a RuntimeError
(see PEP 479)catch NotYet exception in IIntIds object remove subscriberupdated class properties managementupdated local utilities vocabularyupdated Gitlab-CI configuration1.11.1updated imports1.11.0added arguments to container module to be able to get depth of found objects inside a
container1.10.0added ‘transaction’ modulehandler sets in dicts mergingPylint improvements1.9.2updated path getter of external Fanstatic resources1.9.1locales and translations updates1.9.0added simple container class to handle internal sequenceadded mappings marging functionupdated unique ID adapterupdated Pygments resources management1.8.1updated custom Fanstatic resource manager to handle resources with data correctly in
production mode1.8.0updated Venusian decorator callbacks category to “pyramid” for compatibility
with Pyramid 2.0added registry helper to do adapters lookups1.7.1added missing interface translation1.7.0remove support for Python < 3.7added global OpenAPI specification viewadded simple Cornice schema fields and convertersadded custom handling of newlines character in “br” TALES extension1.6.1updated Gitlab-CI configuration1.6.0added ILocation copy hook (copied from “zope.location” package)added base class for local utilities vocabulary1.5.2removed Travis-CI configuration1.5.1translation update1.5.0updated “get_duration” function to directly accept a timedelta objectadded dict formatter function (mainly used for tests)use keywords arguments in “request.has_permission” call to use request cache1.4.3updated doctests for last Pygments release1.4.2package version mismatch1.4.1make “object_data” TALES extension return None instead of an empty string when no
data is available1.4.0added Beaker’s cache management functions and vocabularyalways make a registered utility class to provide it’s registered interfaceadded HTTPMethodField schema field, a tuple used to combine an HTTP method and an URL in
a single property1.3.8updated Gitlab-CI settings to remove Travis-CI1.3.7updated Travis configuration1.3.6updated WSGI environment decorator to prevent storing null values into request environment1.3.5updated request’s WSGI property decorator to be able to handle caching functions with
argumentsextracted object data renderer into a dedicated functionupdated adapter_config decorator arguments names1.3.4always add “context” attribute to request when creating a new request1.3.3changed format of “capture*” context managers to also get result of initial function call1.3.2renamed testing decorator caller argument1.3.1added testing requirement for Pyramid ZCML1.3.0updated PyAMS registry management to only use Pyramid registry (using “hook_zca”)local registry should only be used to handle local utilities, and not any kind of
components!updated doctests to use hooked ZCA1.2.8updated doctests1.2.7updated doctests1.2.6updated doctests1.2.5updated doctests1.2.4added distribution check1.2.3small refactoring to add “get_timestamp” function to “pyams_utils.date” modulesmall updates in “url” and “zodb” modulesadded venusian decorators testing helperscompleted doctests1.2.2Pylint upgrade1.2.1updated doctest1.2.0added Fanstatic resource type to define link “data” attributes, with new doctestsadded new “data” function to format data attributesPylint code cleanup1.1.4updated doctestswhen registering a class adapter, automatically make this class implement the adapter
“provided” interfaceadded testing helpers1.1.3added doctests1.1.2renamed arguments and variables to avoid shadowing arguments namesupdated private Gitlab integration1.1.1added synonyms to “adapter_config” arguments names (‘required’ and ‘adapts’ for ‘context’, and
‘provided’ for ‘provides’)1.1.0corrected “timestamp” TALES extensionadded genericIDataManagerinterface definition to PyAMS_utils, so it can be used in any
package without using PyAMS_form1.0.0initial release