Skip to main content

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-0.0.7.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

civitai-0.0.7-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file civitai-0.0.7.tar.gz.

File metadata

  • Download URL: civitai-0.0.7.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

Hashes for civitai-0.0.7.tar.gz
Algorithm Hash digest
SHA256 15c25c850fa404903e820878c0589b0b0813a6cd9875f1b809f2fc9a838e4f3e
MD5 bf22ec19581c86bcb703e5ae5ad427f4
BLAKE2b-256 c7798139c442e189fb53d2071452069144deb8a0f431b783e1ad60ad34dd1751

See more details on using hashes here.

File details

Details for the file civitai-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: civitai-0.0.7-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

Hashes for civitai-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 18518143d6bc1c5f9cb8584b47d9196b23dabb839c9cd8fd792688306bb38646
MD5 bcd06ef7fdba06aeffebdc3757efc9d1
BLAKE2b-256 f43306b4e72d86f5fbae59d5f41460ba6ca2fffac6ddf467bafce8664c1fd71f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page