part of snakepit | ||
---|---|---|
Package Manager mamba | Package Server quetz | Package Builder boa |
The quetz project is an open source server for conda packages. It is built upon FastAPI with an API-first approach. A quetz server can have many users, channels and packages. With quetz, fine-grained permissions on channel and package-name level will be possible.
Quetz also comes with the quetz-client
that can be used to upload packages to a quetz server instance.
You should have mamba or conda installed.
Then create an environment:
mamba create -n quetz -c conda-forge 'python>=3.7' fastapi authlib httpx=0.12.0 sqlalchemy sqlite \
python-multipart uvicorn zstandard conda-build appdirs toml quetz-client
conda activate quetz
Initialize environment variables:
source ./set_env_dev.sh
Initialize test database:
python init_db.py
Create a directory to store channels
mkdir channels
Run the fastapi server:
uvicorn quetz.main:app --reload
Links:
- http://localhost:8000/ - Login with your github account
- http://localhost:8000/api/dummylogin/[ alice | bob | carol | dave] - Login with test user
- http://localhost:8000/docs - Swagger UI for this REST service
Download xtensor
as test package:
./download-test-package.sh
Run test upload using quetz-client:
export QUETZ_API_KEY=E_KaBFstCKI9hTdPM7DQq56GglRHf2HW7tQtq6si370
quetz-client http://localhost:8000/api/channels/channel0 xtensor/linux-64/xtensor-0.16.1-0.tar.bz2 xtensor/osx-64/xtensor-0.16.1-0.tar.bz2
Install the test package with conda:
mamba install --strict-channel-priority -c http://localhost:8000/channels/channel0 -c conda-forge xtensor
Output:
...
Package Version Build Channel Size
─────────────────────────────────────────────────────────────────────────────────────────────────────
Install:
─────────────────────────────────────────────────────────────────────────────────────────────────────
xtensor 0.16.1 0 http://localhost:8000/channels/channel0/osx-64 109 KB
xtl 0.4.16 h04f5b5a_1000 conda-forge/osx-64 47 KB
Summary:
Install: 2 packages
Total download: 156 KB
─────────────────────────────────────────────────────────────────────────────────────────────────────
...
Browse channels:
http://localhost:8000/channels/channel0/
Quetz comes with a initial frontend implementation. It can be found in quetz_frontend. To build it, one needs to install:
mamba install nodejs>=14
cd quetz_frontend
npm install
npm run build
# for development
npm run watch
This will build the javascript files and place them in /quetz_frontend/dist/
from where they are automatically picked up by the quetz server.
We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.
This software is licensed under the BSD-3-Clause license. See the LICENSE file for details.