Python Package Index in rust
🦀
To run the server locally, first run postgres
instance with docker-compose up db -d
.
Then you can initialize the database by running sqlx migrations.
sqlx database create -D postgres://nest-user:nest-secret@localhost:5432/nest
sqlx migrate run -D postgres://nest-user:nest-secret@localhost:5432/nest
Then run the server with cargo run
.
You can install Bunyan
to get human readable logs cargo run | bunyan
You can test the server with the python's test module in the folder
my-module
.
To upload a package, you will first need an account. You can create one by filling the sign up form at http://localhost:5037
(default value).
Then you should be able to upload a package with the current command:
twine upload package.whl --repository-url http://127.0.0.1:5037/simple
and install the package with pip
pip install --index-url http://localhost:5037/simple package
- Simple Index Interface
- Server configuration:
-
config.toml
-
- Manage users:
- Admin page
- User basic auth
- User sign up
- User login / User session
- User Roles (Contributor & admin)
- Embed package readme to website (
markdown
file only.) - Add Mirrors (and cache?) to others python indexes.
- Search package
- Rely on uv for PEP implementations such as
project
,metadata
, etc.
Here is a list of the resources I heavily relied on to develop this project.