Skip to main content

Dependency-light Python client for Zenith's Furry Artwork Tagger: upload an image, poll for results, get tag dicts (label, confidence).

Project description

zenith-tagger-api

PyPI version Python versions License: MIT

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, with tag_image() for end-to-end tagging
  • Persistent requests.Session — connection reuse and a clear User-Agent
  • Typed exceptionsZenithUploadError, ZenithTimeoutError, ZenithAPIError, all subclassing ZenithError
  • Configurable — custom base URL (e.g. mirrors or future deployments)
  • Logging — uses the standard library logging namespace zenith_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.

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
Changelog CHANGELOG.md

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zenith_tagger_api-0.1.1.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zenith_tagger_api-0.1.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file zenith_tagger_api-0.1.1.tar.gz.

File metadata

  • Download URL: zenith_tagger_api-0.1.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for zenith_tagger_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a0af4a157b7896c33d29c0e5341dada51dd223451d13ca422c49b5d9b6f664a2
MD5 5d69427d65ccddb1a795d96050982c23
BLAKE2b-256 e64710f7793f482d04341aa030f732c77fb7cbf07a566aeb02f99a22e187dd6e

See more details on using hashes here.

File details

Details for the file zenith_tagger_api-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for zenith_tagger_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0df6864e20f3236a0db3b9dd7e7e0ea032528188ac07d989ef86a5cc1e795c20
MD5 6b436184b7e444909251a6cf1a98d1b3
BLAKE2b-256 4276d4dde0e4e6e055447a2c085001cce6632a42f842b61bdfa9442b413f1f05

See more details on using hashes here.

Supported by

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