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!
    • some of the models have an EarlyAccess duration at the first time they get published.
  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.3.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

civitai_api-3.0.3-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for civitai_api-3.0.3.tar.gz
Algorithm Hash digest
SHA256 733722374676aa46ce6cf81fbbbb7e7fe5f73818010121c3914671e64ca5486b
MD5 68a29e34737d886f7f07c8bb2d47fd3c
BLAKE2b-256 43aa65af0573ea3798fb6dcd107e942b4c99156ea4afccb69c39879418e5bf1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for civitai_api-3.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f73e45da9cb6c4165dc0e55660340ad00130bc99946c59ced4086776f7365b32
MD5 a0561d033d3e2adfb17ecb6774b26b5c
BLAKE2b-256 2c68a57a56d7164723b13c83caed812e2c089bc042c2b3b76fb288ff281c96f7

See more details on using hashes here.

Supported by

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