Civitai.com API Package
This is a small wrapper of the civitai.com API
Usage Creators
from civitai import creators
result = creators.get(query="Lykon")
N = result.totalItems
creator = result.items[0]
creator.username # Lykon
creator.modelCount # 212
Usage Images
from civitai import images
# https://civitai.com/posts/442123
result = images.get(postId=442123)
image = result.items[0]
image.url
image.likeCount
image.dislikeCount
Usage Models
from civitai import models
# https://civitai.com/models/4384/dreamshaper?modelVersionId=128713
model = models.get_model(modelId=4384)
modelVersion = models.get_by_modelVersion(modelVersionId=128713)
model.name # DreamShaper
modelVersion.name # 8
Usage Tags
from civitai import tags
result = tags.get(query="realism")
tag = result.items[0]
result.totalItems # 4
tag.modelCount # 383
Metadata
Release files for civitai 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| civitai-1.0.0.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| civitai-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / civitai-1.0.0.tar.gz
| Download URL | civitai-1.0.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fd0121a6534cfa2ab8c8f5042ebe63e0c92390e2276c06110cae18b33ab5e7d
|
|
BLAKE2b-256 checksum How to use checksums |
36d0ef686adfd6a7f98526225099bafe2d2545482249fb6d66641c8683760a91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / civitai-1.0.0-py3-none-any.whl
| Download URL | civitai-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
375858d44fae50b06fd284573e17a7f5538636e2cc1635ebb5130ae8537a164c
|
|
BLAKE2b-256 checksum How to use checksums |
74bec5a6dce5443b5e2d05ec0b5548c08aa69bdddf3de1d06d717c839f267cb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|