Metadata-Version: 2.4
Name: simple-repository-browser
Version: 0.12.0
Summary: A web interface to browse and search packages in any simple package repository (PEP-503), inspired by PyPI / warehouse
Author: Phil Elson, Francesco Iannaccone, Ivan Sinkarenko
Project-URL: Homepage, https://github.com/simple-repository/simple-repository-browser
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx
Requires-Dist: aiosqlite
Requires-Dist: diskcache
Requires-Dist: docutils
Requires-Dist: fastapi
Requires-Dist: importlib_metadata>=6.0
Requires-Dist: jinja2
Requires-Dist: markdown
Requires-Dist: markupsafe
Requires-Dist: packaging
Requires-Dist: parsley
Requires-Dist: pkginfo>=1.12
Requires-Dist: readme-renderer[md]
Requires-Dist: simple-repository~=0.10
Requires-Dist: typing-extensions
Requires-Dist: uvicorn
Requires-Dist: authlib
Requires-Dist: starlette[full]
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Provides-Extra: dev
Requires-Dist: simple-repository-browser[test]; extra == "dev"
Dynamic: license-file

# simple-repository-browser

A web interface to browse and search packages in **any** simple package repository (PEP-503), inspired by PyPI / warehouse.

Built using FastAPI and the [simple-repository](https://github.com/simple-repository/simple-repository) core library.

## Demo

A tech-preview demo is available at <https://simple-repository.app.cern.ch/>.

## Usage

Install from PyPI:

```bash
python -m pip install simple-repository-browser
```

And run:

```bash
simple-repository-browser
```

(or alternatively ``python -m simple_repository_browser``)

By default, this will use the repository at PyPI (<https://pypi.org/simple/>). You can point it to a custom
repository by passing the URL to the project list endpoint (the base URL according to PEP-503):

```bash
simple-repository-browser https://my-custom-repository.example.com/foo/simple/
```

## Screenshots

Homepage:

![homepage screenshot](https://raw.githubusercontent.com/simple-repository/simple-repository-browser/main/screenshots/home.png)

Search:

![search result](https://raw.githubusercontent.com/simple-repository/simple-repository-browser/main/screenshots/search.png)

Project page:

![example project page](https://raw.githubusercontent.com/simple-repository/simple-repository-browser/main/screenshots/project.png)

## Runtime details

```simple-repository-browser``` exposes a FastAPI application, and it runs the application in a single ``uvicorn`` worker.
Metadata that is computed will be cached in the ``$XDG_CACHE_DIR/simple-repository-browser`` directory. This cache is not
intended to be shared among different repository URLs, and is unlikely to work for multiple ``simple-repository-browser``
versions. There is currently no intelligent cache invalidation for those cases.

## Development

In order to build the ``simple-repository-browser`` you will need access to npm. If not available on the development host,
you can do it in a docker container first:

```bash
docker run --rm -v $PWD:/workdir -it node bash
cd /workdir
```

Bundle the web app:

```bash
cd web
npm install --include=dev
npm run build
cd ..
```

And then the normal installation procedure applies:

```bash
python -m pip install -e .
```

You may want to disable the indexing to avoid long-running tasks during the development:

```bash
export DISABLE_REPOSITORY_INDEXING=1
```

The browser can be run with:

```bash
python -m simple_repository_browser
```
