Introduction
Quickly export the content of a Plone registry configuration (defined by an interface) in a Python structure compatible with JSON format:
import json
from collective.regjsonify.interfaces import IJSONifier
from plone.registry.interfaces import IRegistry
from zope.component import queryUtility
registry = queryUtility(IRegistry)
settings = registry.forInterface(IYouInterfaceSettings)
python_data = IJSONifier(settings).json()
json_data = json.dumps(python_data)
Extending
The package came with a default set of know data types that cover common fields used in Plone registry. However this set can be not complete if you are using a not supported field type.
During export operation unknown data are ignored.
If you want to export other types you must manually provide the proper IJSONFieldDumper adapter:
<adapter
factory="your.package.YouExportAdapter"
provides="collective.regjsonify.interfaces.IJSONFieldDumper"
for="3rd.party.field.interfaces.INewFieldType"
/>
Changelog
0.3.0 (2020-03-13)
Fix compatibility with zope.schema < 4 [mamico]
Python 3 compatibility [cekk]
0.2.0 (2015-08-25)
Recusively traverse all of the interface’s parents attributes [keul]
Added an IObject field adapter. There’s no more need that the persistent field implements another interface (see changes in tests). Also: custom IObject derived fields are now automatically supported. [keul]
0.1.0 (2014-05-02)
Initial release
Metadata
Release files for collective.regjsonify 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| collective.regjsonify-0.3.0.tar.gz | 14.0 kB | Without provenance | Details for collective.regjsonify-0.3.0.tar.gz |
Release files / collective.regjsonify-0.3.0.tar.gz
| Download URL | collective.regjsonify-0.3.0.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c885e32b2f7a760244ffe87772542e7c620766600e3a2d43f57549ed86915524
|
|
BLAKE2b-256 checksum How to use checksums |
83aeba4a4dd678a23ff9f876dfd7037259cb65d079681be59bd87c4c0e2799ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.17
|
Security for collective.regjsonify 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.