civitai


Namecivitai JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryA python wrapper for the civitai.com API
upload_time2023-12-06 07:45:39
maintainer
docs_urlNone
author
requires_python>=3.8
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Civitai.com API Package

This is a small wrapper of the [civitai.com API](https://github.com/civitai/civitai/wiki/REST-API-Reference)

## Usage Creators

```python
from civitai import creators

result = creators.get(query="Lykon")
N = result.totalItems
creator = result.items[0]
creator.username   # Lykon
creator.modelCount # 212
```

## Usage Images

```python
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

```python
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

```python
from civitai import tags

result = tags.get(query="realism")
tag = result.items[0]
result.totalItems # 4
tag.modelCount    # 383
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "civitai",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Sebastian Hartwig <sebastian@hartwig-bw.de>",
    "download_url": "https://files.pythonhosted.org/packages/36/d0/ef686adfd6a7f98526225099bafe2d2545482249fb6d66641c8683760a91/civitai-1.0.0.tar.gz",
    "platform": null,
    "description": "# Civitai.com API Package\r\n\r\nThis is a small wrapper of the [civitai.com API](https://github.com/civitai/civitai/wiki/REST-API-Reference)\r\n\r\n## Usage Creators\r\n\r\n```python\r\nfrom civitai import creators\r\n\r\nresult = creators.get(query=\"Lykon\")\r\nN = result.totalItems\r\ncreator = result.items[0]\r\ncreator.username   # Lykon\r\ncreator.modelCount # 212\r\n```\r\n\r\n## Usage Images\r\n\r\n```python\r\nfrom civitai import images\r\n\r\n# https://civitai.com/posts/442123\r\nresult = images.get(postId=442123)\r\nimage = result.items[0]\r\nimage.url\r\nimage.likeCount\r\nimage.dislikeCount\r\n```\r\n\r\n## Usage Models\r\n\r\n```python\r\nfrom civitai import models\r\n\r\n# https://civitai.com/models/4384/dreamshaper?modelVersionId=128713\r\nmodel = models.get_model(modelId=4384)\r\nmodelVersion = models.get_by_modelVersion(modelVersionId=128713)\r\nmodel.name                # DreamShaper\r\nmodelVersion.name         # 8\r\n```\r\n\r\n## Usage Tags\r\n\r\n```python\r\nfrom civitai import tags\r\n\r\nresult = tags.get(query=\"realism\")\r\ntag = result.items[0]\r\nresult.totalItems # 4\r\ntag.modelCount    # 383\r\n```\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A python wrapper for the civitai.com API",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/kopetri/civitai",
        "Issues": "https://github.com/kopetri/civitai/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "74bec5a6dce5443b5e2d05ec0b5548c08aa69bdddf3de1d06d717c839f267cb2",
                "md5": "1e22e67b44f87c436e81f41d1ba419af",
                "sha256": "375858d44fae50b06fd284573e17a7f5538636e2cc1635ebb5130ae8537a164c"
            },
            "downloads": -1,
            "filename": "civitai-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1e22e67b44f87c436e81f41d1ba419af",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6137,
            "upload_time": "2023-12-06T07:45:31",
            "upload_time_iso_8601": "2023-12-06T07:45:31.116628Z",
            "url": "https://files.pythonhosted.org/packages/74/be/c5a6dce5443b5e2d05ec0b5548c08aa69bdddf3de1d06d717c839f267cb2/civitai-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "36d0ef686adfd6a7f98526225099bafe2d2545482249fb6d66641c8683760a91",
                "md5": "1f2d753629e3628c827e0dd3fdb0044d",
                "sha256": "4fd0121a6534cfa2ab8c8f5042ebe63e0c92390e2276c06110cae18b33ab5e7d"
            },
            "downloads": -1,
            "filename": "civitai-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1f2d753629e3628c827e0dd3fdb0044d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 4820,
            "upload_time": "2023-12-06T07:45:39",
            "upload_time_iso_8601": "2023-12-06T07:45:39.749806Z",
            "url": "https://files.pythonhosted.org/packages/36/d0/ef686adfd6a7f98526225099bafe2d2545482249fb6d66641c8683760a91/civitai-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-06 07:45:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kopetri",
    "github_project": "civitai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "civitai"
}
        
Elapsed time: 0.57094s