CivitAI Downloader
A Python package for downloading models from CivitAI via a command-line tool or programmatically. This package supports token-based authentication and allows users to save downloaded models to a specified directory.
Installation
Install the package via pip:
pip install civitai-downloader
Usage
Gradio webui Usage
to run with gradio webui you can just run by this command
civitai-downloader
Command-Line Usage
To download a model from CivitAI, use the civitai-downloader command with the following arguments:
civitai-downloader <url> <output_path> <token>
Programmatic Usage
You can also use the downloader in your own Python scripts.
from civitai_downloader import download_file, get_token, store_token
url = 'https://civitai.com/api/download/models/46846'
output_path = '/path/to/save'
token = 'your_api_token_here'
download_file(url, output_path, token)
Features
- Token-based authentication: Automatically stores your CivitAI API token for future use.
- Progress tracking: Shows download progress with speed in MB/s.
- Error handling: Includes handling for common download errors like redirects and missing files.
API Token
The first time you use civitai_downloader, you'll be prompted to enter your CivitAI API token. This token will be stored in ~/.civitai/config. You can generate your API token from your CivitAI account settings.
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Credits
gradio demo by - Eddycrack864
Metadata
Release files for civitai-downloader 1.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| civitai_downloader-1.3.5.tar.gz | 8.7 kB | Without provenance | Details for civitai_downloader-1.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| civitai_downloader-1.3.5-py3-none-any.whl | Python 3 | none | any | Details for civitai_downloader-1.3.5-py3-none-any.whl |
Total release size: 19.1 kB
Release files / civitai_downloader-1.3.5.tar.gz
| Download URL | civitai_downloader-1.3.5.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b45249946ee1bd84cfb0bcef0e7cb4800926a1a9f3e61cf46360c8f720ca68bc
|
|
BLAKE2b-256 checksum How to use checksums |
e96eb1ae158c76843b313d9e16a54ce53057264ccbf6b34ea6f1f2aa2a197b47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Release files / civitai_downloader-1.3.5-py3-none-any.whl
| Download URL | civitai_downloader-1.3.5-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa7016117685a828c427a681eda8608c237163a07e07f782512b30955fe092d9
|
|
BLAKE2b-256 checksum How to use checksums |
bbca484855d38f4dc6cda0540a99be22e994ab75d3f5a40ac12d68fe90485a31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Security for civitai-downloader 1.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.