Default template for PDM package
Project description
civitai_api
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
- QueryParamsError
- only for the endpoints which could return multiple results.
- FileNotFoundError
- only for the endpoints which could return single results.
- ConnectionAbortedError
- every endpoint could trigger this Exception when the number of requests reach Civitai server's limitation.
Attention
- you could only get model's availability from endpoint models or modelId endpoints!
- Trainned Prompts could only get from VersionId or Hash endpoints!
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a63b9b373aa55ec55d8e2ae1bbcadf83a2d0e8f2060f7b2b4ef996b5588b356 |
|
MD5 | b5ed16e2873f302d1013f7d3c1fe56a2 |
|
BLAKE2b-256 | 3b141f3e22b810cd92ac752d21c1b33fabd8dafabc5354dc79e41ba8ea92f2a7 |
File details
Details for the file civitai_api-3.0.0-py3-none-any.whl
.
File metadata
- Download URL: civitai_api-3.0.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34079cfd7ebe376b81e8fbf19a09892857c4e92914eabb93f806d121d70bd07e |
|
MD5 | 039a547d5e22fa7db78755e62f771be6 |
|
BLAKE2b-256 | a989432097858c981d6dc73e8877c72dab423a5a9d4d834bc8726d70c9db4241 |