Skip to main content

Default template for PDM package

Project description

civitai_api

Coverage

This project provide a easy way to communicating with Civitai-API.

It supports both Sync and Async request implementation, and both Async implementation (AsyncIO and Trio) by using Anyio.

See usage example in : /tests/test_v1.py.

You may need to register your own CivitAI api key, see here.

Exception handling

There are 3 types of Exception you should care of

  1. QueryParamsError
    • only for the endpoints which could return multiple results.
  2. FileNotFoundError
    • only for the endpoints which could return single results.
  3. ConnectionAbortedError
    • every endpoint could trigger this Exception when the number of requests reach Civitai server's limitation.

Attention

  1. you could only get model's availability from endpoint models or modelId endpoints!
  2. Trainned Prompts could only get from VersionId or Hash endpoints!

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_api-3.0.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

civitai_api-3.0.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file civitai_api-3.0.0.tar.gz.

File metadata

  • Download URL: civitai_api-3.0.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.2

File hashes

Hashes for civitai_api-3.0.0.tar.gz
Algorithm Hash digest
SHA256 3a63b9b373aa55ec55d8e2ae1bbcadf83a2d0e8f2060f7b2b4ef996b5588b356
MD5 b5ed16e2873f302d1013f7d3c1fe56a2
BLAKE2b-256 3b141f3e22b810cd92ac752d21c1b33fabd8dafabc5354dc79e41ba8ea92f2a7

See more details on using hashes here.

File details

Details for the file civitai_api-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for civitai_api-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34079cfd7ebe376b81e8fbf19a09892857c4e92914eabb93f806d121d70bd07e
MD5 039a547d5e22fa7db78755e62f771be6
BLAKE2b-256 a989432097858c981d6dc73e8877c72dab423a5a9d4d834bc8726d70c9db4241

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 Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page