Minimal Chocolatey-compatible NuGet server in a Django app.
pip install minchoc
In settings.py
, add 'minchoc'
to INSTALLED_APPS
. Set ALLOW_PACKAGE_DELETION
to True
if you
want to enable this API.
INSTALLED_APPS = ['minchoc']
ALLOW_PACKAGE_DELETION = True
A DELETE
call to /api/v2/package/<id>/<version>
will be denied even with authentication unless
ALLOW_PACKAGE_DELETION
is set to True
.
Add path('', include('minchoc.urls'))
to your root urls.py
. Example:
from django.urls import include, path
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('minchoc.urls')),
]
Run ./manage.py migrate
or similar to install the database schema.
When a user is created, a NugetUser
is also made. This will contain the API key for pushing.
It can be viewed in admin.
As administrator:
choco source add -s 'https://your-host/url-prefix'
choco apikey add -s 'https://your-host/url-prefix' -k 'your-key'
On non-Windows platforms, you can use my pychoco package, which also supports the above commands.
choco install
choco push
choco search