pjkm.core.registry.index

Registry index — fetch, cache, search, and install group packs.

Attributes

Classes

PackEntry

A group pack in the registry.

RegistryIndex

Fetches, caches, and searches the group pack registry.

Module Contents

pjkm.core.registry.index.CACHE_DIR[source]
pjkm.core.registry.index.INDEX_CACHE[source]
pjkm.core.registry.index.INDEX_TTL = 3600[source]
pjkm.core.registry.index.DEFAULT_REGISTRY_URL = 'https://raw.githubusercontent.com/pr1m8/pjkm-registry/main/index.json'[source]
class pjkm.core.registry.index.PackEntry[source]

A group pack in the registry.

name: str[source]
description: str[source]
url: str[source]
author: str = ''[source]
tags: list[str] = [][source]
groups: list[str] = [][source]
stars: int = 0[source]
path: str = ''[source]
ref: str = ''[source]
matches(query)[source]

Check if this pack matches a search query.

Parameters:

query (str)

Return type:

bool

class pjkm.core.registry.index.RegistryIndex(registry_url=DEFAULT_REGISTRY_URL)[source]

Fetches, caches, and searches the group pack registry.

Parameters:

registry_url (str)

registry_url = 'https://raw.githubusercontent.com/pr1m8/pjkm-registry/main/index.json'[source]
load(force_refresh=False)[source]

Load the index from cache or network.

Parameters:

force_refresh (bool)

Return type:

None

search(query)[source]

Search packs by name, description, tags, or group names.

Parameters:

query (str)

Return type:

list[PackEntry]

get(name)[source]

Get a pack by exact name.

Parameters:

name (str)

Return type:

PackEntry | None

property packs: list[PackEntry][source]
Return type:

list[PackEntry]