A python wrapper for the civitai.com API
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
civitai-1.0.0.tar.gz
(4.8 kB
view details)
Built Distribution
File details
Details for the file civitai-1.0.0.tar.gz
.
File metadata
- Download URL: civitai-1.0.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fd0121a6534cfa2ab8c8f5042ebe63e0c92390e2276c06110cae18b33ab5e7d |
|
MD5 | 1f2d753629e3628c827e0dd3fdb0044d |
|
BLAKE2b-256 | 36d0ef686adfd6a7f98526225099bafe2d2545482249fb6d66641c8683760a91 |
File details
Details for the file civitai-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: civitai-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 375858d44fae50b06fd284573e17a7f5538636e2cc1635ebb5130ae8537a164c |
|
MD5 | 1e22e67b44f87c436e81f41d1ba419af |
|
BLAKE2b-256 | 74bec5a6dce5443b5e2d05ec0b5548c08aa69bdddf3de1d06d717c839f267cb2 |