Skip to main content

Zope3 component registry inspector

Project description

Introduction

The zope3 component registry inspector is used for inspecting adapters and utilities registered in the z3 component registry. It provides a view registred on the app level for searching and inspecting the registry.

Features

  • Searching for utilities

  • Searching for adapters

  • Searching interfaces and names using auto-complete widget

  • Open factory source file with your favourite editor (if the Zope is installed on localhost)

  • Customize file opening command

  • Access tabs with hotkeys (Ctrl+u, Ctrl+a, Ctrl+c)

Installation

Install it using buildout with Plone > 4.0:

[buildout]
...

[instance]
...
eggs +=
    collective.z3cinspector

Install it using buildout with Plone < 4.0:

[buildout]
...

[instance]
...
eggs +=
    collective.z3cinspector
zcml +=
    collective.z3cinspector

Usage

While being logged into the ZMI as a Manager user goto /@@inspect on your Zope application root via a browser. If your Zope is configured to listen on port 8080 on localhost this is:

http://localhost:8080/@@inspect

Configuration

The configuration is stored in the file ~/.collective.z3cinspector.config. The options are configurable through the @@inspect view. This way you only have to set your preferred configuration once - and it will be configured in every zope instance on your machine.

When clicking on the “open” button in the results listing, your Editor will be opened with the file containing the factory definition. You may wan’t to configure how the Editor is opened. There are some pre-configured Editors: Emacs, MacVim and TextMate, the default to open the file is using the open command. The path and the line number (option) is substituted (python).

Example command:

/path/to/your/editor %(path)s -l %(line)s

JSON-API

There is a JSON api for easy integration in editors. The view @@inspector-ajax has following (traversable) methods:

adapter_names

Returns a list of adapter names.

adapter_provided_names

Returns a list of adapter provided interface names as string.

utility_names

Returns a list of utility names.

utility_provided_names

Returns a list of utility provided interface names as string.

list_components

Returns a list of components matching the criterias passed as GET or POST to the request.

Criterias:

  • adapter_name

  • adapter_provided_name

  • utility_name

  • utility_provided_name

The format can be changed by passing format in the request. Possible formats: as_dict (json), as_text.

License

“THE BEER-WARE LICENSE” (Revision 42):

jone wrote this script. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.

Changelog

1.2.1 (2022-05-09)

  • Fix classifiers. [mathias.leimgruber]

1.2.0 (2022-05-09)

  • Python 3.9 compatibility [mathias.leimgruber]

1.1 (2012-10-15)

  • Add a JSON api. [jone]

  • Remove duplicate names. [jone]

  • Fix utility interface lookup bug. [jone]

1.0 (2010-12-31)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

collective.z3cinspector-1.2.1.tar.gz (69.6 kB view details)

Uploaded Source

File details

Details for the file collective.z3cinspector-1.2.1.tar.gz.

File metadata

  • Download URL: collective.z3cinspector-1.2.1.tar.gz
  • Upload date:
  • Size: 69.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for collective.z3cinspector-1.2.1.tar.gz
Algorithm Hash digest
SHA256 c8a7cf6713c033cc5d8fa75592e9e16a310db68ff9a0694107282a4a8bdbb901
MD5 e9594f4f9c9e0cad997465a8b57565cd
BLAKE2b-256 cbbdaa35c18eb998e5ad654250a8fa0f4117be9041b971ac4c2f3d0ab0c71316

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page