https://github.com/qupath/extension-catalog-model
https://github.com/qupath/extension-catalog-model
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/qupath/extension-catalog-model
- Owner: qupath
- License: apache-2.0
- Created: 2024-11-07T14:46:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-07T11:26:04.000Z (over 1 year ago)
- Last Synced: 2025-02-07T11:34:14.894Z (over 1 year ago)
- Language: Python
- Size: 50.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Extension catalog model
[](https://qupath.github.io/badges/extension-catalog-model/reports/coverage/index.html?dummy=1234)
[](https://qupath.github.io/badges/extension-catalog-model/reports/junit/report.html?dummy=1234)

This is a [pydantic](https://docs.pydantic.dev/latest/) package for creating, validating and writing JSON files for the QuPath [extension manager](https://github.com/qupath/extension-manager) project.
Check out the [documentation](https://qupath.github.io/extension-catalog-model/) for guidance on creating a catalog.
To create a catalog:
```python
from extension_catalog_model.model import *
version_range = VersionRange(min="v0.5.1")
release = Release(
name="v0.1.0-rc5",
main_url="https://github.com/qupath/qupath-extension-omero/releases/download/v0.1.0-rc5/qupath-extension-omero-0.1.0-rc5.jar",
optional_dependency_urls=["https://github.com/ome/openmicroscopy/releases/download/v5.6.14/OMERO.java-5.6.14-ice36.zip"],
version_range=version_range
)
extension = Extension(
name="QuPath OMERO extension",
description="QuPath extension to work with images through OMERO's APIs",
author="QuPath",
homepage="https://github.com/qupath/qupath-extension-omero",
releases=[release]
)
catalog = Catalog(
name="QuPath catalog",
description="Extensions maintained by the QuPath team",
extensions=[extension]
)
```
To read a catalog from a JSON file:
```python
from extension_catalog_model.model import Catalog
Catalog.parse_file("catalog.json")
```
An example can be found on the [QuPath catalog repository](https://github.com/qupath/qupath-catalog).