Metadata-Version: 2.4
Name: jetbrains-plugin-server
Version: 0.2.1
Summary: A server to serve jetbrains plugins
Author-email: azro352 <35503478+azro352@users.noreply.github.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/azro352/jetbrains-plugin-server
Project-URL: Documentation, https://github.com/azro352/jetbrains-plugin-server/blob/master/README.md
Project-URL: Repository, https://github.com/azro352/jetbrains-plugin-server.git
Project-URL: Bug Tracker, https://github.com/azro352/jetbrains-plugin-server/issues
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: apscheduler~=3.11.2
Requires-Dist: fastapi~=0.115.12
Requires-Dist: markdown~=3.8
Requires-Dist: parameterized~=0.9.0
Requires-Dist: pydantic~=2.11.3
Requires-Dist: pydantic-extra-types[semver]~=2.10.3
Requires-Dist: requests~=2.32.3
Requires-Dist: semver~=3.0.4
Requires-Dist: uvicorn
Provides-Extra: offline
Requires-Dist: fastapi_offline; extra == "offline"
Dynamic: license-file

<!--

THIS README FILE IS RENDERED ON '/' ENDPOINT WHEN NO "build" ARG IS GIVEN

-->

Creates a jetbrains-compatible plugin server with a given list of plugins

## How-to use

### Download the data

Use the script `dl_data.py` to fetch plugins metadata and data from jetbrains server, and save them where you want

### Create the server

```python
from fastapi import FastAPI

from jetbrains_plugin_server import create_plugin_server
from jetbrains_plugin_server.model.data_listing import FSDataListing

app: FastAPI = create_plugin_server(
    FSDataListing("/data/myfolder"),
    "https://myendpoint/plugins/{plugin_version_id}"
)
```

Then deploy it like you want

### Use the server

Register the server [in your IDE][jb-custom-repo]

## Tools

To fetch plugins specifications, versions and content from jetbrains to a local filesystem

```bash
cat myfile.txt

jb_plugin_download myfile.txt
```

To build a JSON cache to answer faster, using either a filesystem storage, an artifactory or an apache server

```python
from jetbrains_plugin_server.model.catalog import CatalogSchema

catalog = CatalogSchema(data_listing=dl)
catalog.build()
```

## Paths

- `/` to get the readme OR the compliant xml content if url param `build` is provided
- `/cache` to get the full JSON cache of the server
- `/packages` to get a nicer view of the available packages
- `/docs` the openapi spec of the app, provided by FastAPI

[jb-custom-repo]: https://www.jetbrains.com/help/idea/managing-plugins.html#add_plugin_repos
