Skip to main content

garf for Media Tagging

garf-media-tagging simplifies interaction with media_tagging library via SQL queries and can be used with garf framework.

Prerequisites

Installation

pip install garf-media-tagging

Usage

Run via CLI

Install garf-executors package to run queries via CLI (pip install garf-executors).

garf <PATH_TO_QUERIES> --source media-tagging \
  --output <OUTPUT_TYPE> \
  --source.endpoint=MEDIA_TAGGING_API_ENDPOINT_URL

where:

Available source parameters

name values comments
endpoint http endpoint when media-tagging API is running
db-uri Optional connection string to DB where tagging results can be found
tagger-type Type of tagger to use Optional, can be specified in query filters
media-type Type of media to use Optional, can be specified in query filters
media-paths Type of media to use Optional, can be specified in query filters
tagging-options Key-value pairs to fine-tune tagging process Optional, can be specified in query filters

Queries for Media Tagging API

SELECT
  media_url,
  content.tags[].name AS tags
FROM tag
WHERE
  media_type = 'image'
  AND tagger_type = 'gemini'
  AND media_path IN ({media})

Resources

  • tag - identifies tags (pair name: score) uniquely defining media.
  • description - custom description of media; usually fine-tuned via custom_prompt parameter.

Filters

  • media_type - Required, one of: image, youtube_video, webpage, text, video.
  • tagger_type - Tagger used to identify tags / descriptions.
  • media_path - location of media.
  • tagging_options - optional parameters to finetune tagging.
    • n_tags - number of tags to return.
    • tags - custom tags to find in the media.
    • custom_prompt - prompt to send to LLM.

Fields

You can extract one of the following elements from reach row of API response.

  • media_type
  • media_url
  • identifier
  • processed_at
  • content
    • text for description
    • {name, score} for tag
  • hash

Download files

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

Source Distribution

garf_media_tagging-0.0.8.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

garf_media_tagging-0.0.8-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file garf_media_tagging-0.0.8.tar.gz.

File metadata

  • Download URL: garf_media_tagging-0.0.8.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.4

File hashes

Hashes for garf_media_tagging-0.0.8.tar.gz
Algorithm Hash digest
SHA256 90cdedb57293860d8cf527c45c2fe076a2e56cf140abc7c101da6a6fa19abf90
MD5 82ac25710b510adc57a306d074b19544
BLAKE2b-256 827cf9b94e9feb9c0d0ac5557baca0da5b0ec71beba66de7cad9ce9f5c70f7b9

See more details on using hashes here.

File details

Details for the file garf_media_tagging-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for garf_media_tagging-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 5066aaadd57bf7230aba87521820ad2fa7bcde37258a7de88d63689a6c616c8a
MD5 d6ba99e9fd3bcfbf46c6a5804f266612
BLAKE2b-256 39980ca33a9d3747db000225a7254e81a7f52a0ef956d213f5075e6c1b19cb01

See more details on using hashes here.

Release history Release notifications | RSS feed

0.0.9

2 files

This release

0.0.8 This release

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

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