Skip to content

Commit 61e9b24

Browse files
committed
Update README
1 parent 1957332 commit 61e9b24

File tree

1 file changed

+90
-1
lines changed

1 file changed

+90
-1
lines changed

README.md

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,91 @@
1-
pypi-browser
1+
PyPI Browser
22
============
3+
4+
**PyPI Browser** is a web application for browsing the contents of packages on
5+
[the Python Package Index](https://pypi.org/).
6+
7+
You can view a live version which provides information about packages from pypi.org:
8+
9+
* [Search page](https://pypi-browser.ckuehl.me/)
10+
* [Package page for the `django` package](https://pypi-browser.ckuehl.me/package/django)
11+
* [Archive browse page for the `Django-4.1.1-py3-none-any.whl` file](https://pypi-browser.ckuehl.me/package/django/Django-4.1.1-py3-none-any.whl)
12+
* [File viewing page for a random file from the same archive](https://pypi-browser.ckuehl.me/package/django/Django-4.1.1-py3-none-any.whl/django/forms/boundfield.py)
13+
14+
It can also be deployed with a private PyPI registry as its target in order to
15+
be used for a company's internal registry.
16+
17+
18+
## Features
19+
20+
![Search page](https://i.fluffy.cc/0lzgf46zcHZs90BZfMKp7cvspnk7QrZk.png)
21+
22+
23+
### Browse uploaded package archives
24+
25+
![Browse uploaded archives](https://i.fluffy.cc/MnRscjgHrVw7DfnsrM3DV2rVQBB3SGNw.png)
26+
27+
You can see all uploaded package archives for a given package.
28+
29+
30+
### Inspect package archive metadata and contents
31+
32+
![Inspect package archives](https://i.fluffy.cc/skXvnlvvhP8NwSN7RrjHBKrV1xMxKzqv.png)
33+
34+
You can inspect a package archive's metadata and its contents.
35+
36+
Note that this is currently only supported for `.zip` and `.whl` files, but
37+
support for tarballs is planned.
38+
39+
40+
### Easily view files from package archives
41+
42+
![View file](https://i.fluffy.cc/6hp4VQmDF4pF6l54QWMfwjXdTpVGk27m.png)
43+
44+
You can display text files directly in your browser, with syntax highlighting
45+
and other features like line selection provided by
46+
[fluffy-code](https://github.com/chriskuehl/fluffy-code).
47+
48+
Binary files can also be downloaded.
49+
50+
51+
## Deploying PyPI Browser
52+
53+
To run your own copy, install
54+
[`pypi-browser-webapp`](https://pypi.org/project/pypi-browser-webapp/) using
55+
pip, then run the `pypi_browser.app:app` ASGI application using any ASGI web
56+
server (e.g. uvicorn).
57+
58+
You can set these environment variables to configure the server:
59+
60+
* `PYPI_BROWSER_PYPI_URL`: URL for the PyPI server to use (defaults to
61+
`https://pypi.org`)
62+
* `PYPI_BROWSER_PACKAGE_CACHE_PATH`: Filesystem path to use for caching
63+
downloaded files. This will grow forever (the app does not clean it up) so
64+
you may want to use `tmpreaper` or similar to manage its size.
65+
66+
pypi-browser is an ASGI app, and while it performs a lot of I/O (downloading and
67+
extracting packages on-demand), some effort has been made to keep all blocking
68+
operations off of the main thread. It should be fairly performant.
69+
70+
71+
## Contributing
72+
73+
To build this project locally, you'll need to [install
74+
Poetry](https://python-poetry.org/docs/) and run `poetry install`.
75+
76+
Once installed, you can run
77+
78+
```bash
79+
$ make start-dev
80+
```
81+
82+
to run a copy of the application locally with hot reloading enabled.
83+
84+
85+
## Roadmap
86+
87+
* Add support for non-ZIP files (e.g. `.tar.gz` source distributions).
88+
89+
This shouldn't be too hard, but it may be slow at runtime since unlike zip,
90+
tarballs don't contain an index or support extracting individual files
91+
without reading the entire tarball.

0 commit comments

Comments
 (0)