No project description provided
Project description
zenith-tagger-api
A small, dependency-light Python client for Zenith’s Furry Artwork Tagger. It uploads a local image, polls for inference results, and returns a list of tag dictionaries (label, confidence).
PyPI package: zenith-tagger-api · Import name: zenith_tagger
Features
- Simple API — one class,
ZenithTagger, withtag_image()for end-to-end tagging - Persistent
requests.Session— connection reuse and a clearUser-Agent - Typed exceptions —
ZenithUploadError,ZenithTimeoutError,ZenithAPIError, all subclassingZenithError - Configurable — custom base URL (e.g. mirrors or future deployments)
- Logging — uses the standard library
loggingnamespacezenith_tagger.client
Requirements
- Python 3.7+
- requests 2.28+ (declared in package metadata)
Installation
From PyPI (when published):
pip install zenith-tagger-api
From a clone of this repository (editable install for development):
git clone https://codeberg.org/TheBunnieMaster/zenith-tagger-api.git
cd zenith-tagger-api
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e .
Quick start
from zenith_tagger import ZenithTagger
tagger = ZenithTagger()
tags = tagger.tag_image("/path/to/image.png")
for tag in tags:
print(tag["label"], tag["confidence"])
Each element of tags is a dict with at least label and confidence (see the live API for the exact schema).
Configuration
Default service
By default the client uses https://pawgge.rs (trailing slashes are normalized).
Custom base URL
tagger = ZenithTagger(base_url="https://your-mirror.example.com")
Polling
tag_image() uploads, then polls GET /api/result?file_md5=… until tags appear or limits are hit:
| Argument | Default | Purpose |
|---|---|---|
retry_delay |
1.5 |
Seconds between polls |
max_retries |
10 |
Maximum poll attempts after upload |
Increase max_retries or retry_delay if the service is slow under load.
Logging
import logging
logging.basicConfig(level=logging.INFO) # or logging.DEBUG for poll details
Logger name: zenith_tagger.client.
Exceptions
| Exception | When it occurs |
|---|---|
FileNotFoundError |
The given image path does not exist |
ZenithUploadError |
Network/upload failure during POST /api/image |
ZenithAPIError |
JSON response without file_md5 (API error field) |
ZenithTimeoutError |
No tags after max_retries polls |
All custom errors subclass ZenithError.
Development
See CONTRIBUTING.md for setup, what optional folders like .nox are, and Windows notes.
Quick path: install dev tools, then run the full check (format, lint, tests, build, metadata):
pip install -e ".[dev]" # or: pip install -r requirements-dev.txt
make verify # or: make install-dev && make check
If you do not use Make, the same commands are written out in CONTRIBUTING.md.
Project links
| Resource | URL |
|---|---|
| Source | codeberg.org/TheBunnieMaster/zenith-tagger-api |
| Issue tracker | Issues |
Disclaimer
This library is an independent HTTP client. It is not affiliated with the operators of the tagging service. Use the public API in line with their terms, acceptable use, and any rate or capacity limits. Model output is provided by a third-party service; the authors of this package do not control availability, accuracy, or policy changes.
License
MIT — see LICENSE.
Copyright (c) 2026 TheBunnieMaster
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zenith_tagger_api-0.1.0.tar.gz.
File metadata
- Download URL: zenith_tagger_api-0.1.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
833f4ed5167ced6f35470c8f229e55bf09b16ec9a7e06b005e7b4f9198af18e5
|
|
| MD5 |
7751e4e4567753eef7db8863130b9689
|
|
| BLAKE2b-256 |
b1edcb70d24f7bda84c9404336458b6cf8e9c6f53b3703c67edafc8a53c71bca
|
File details
Details for the file zenith_tagger_api-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zenith_tagger_api-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b24a7a27a99eeab0164aa3793dd8c9a733fd1a97c6e9a80f4d4cebd3d7cb3fdc
|
|
| MD5 |
7d1d3ad43408055bf8878ad76160593c
|
|
| BLAKE2b-256 |
9f6525a276b8899b07baa2949bf17e2202418f1020ba10d2c102349656779ea3
|