Skip to main content

Simplified fetching of media for Filonov library

Project description

Media Fetcher

PyPI

Problem statement

Solution

media-fetcher performs fetching of images and videos performance from various data sources.

Deliverable (implementation)

media-fetcher is implemented as a:

  • library - Use it in your projects with a help of media_fetching.MediaFetchingService class.
  • CLI tool - media-fetcher tool is available to be used in the terminal.

Deployment

Prerequisites

Installation

Install media-fetcher with pip install media-fetching command.

Usage

Fetching media

Once media-fetcher is installed you can call it:

media-fetcher \
  --source <MEDIA_SOURCE> \
  --media-type <MEDIA_TYPE> \
  --extra_info <EXTRA_INFO_MODULES> \
  --writer <WRITER_TYPE> \
  --output <OUTPUT_FILE_NAME>

where:

  • <SOURCE> - source of media data:
    • googleads - fetch all assets from a Google Ads account / MCC.
    • file - fetch all assets with their tags and metrics from CSV files
    • youtube - fetch public videos from a YouTube channel.
  • <MEDIA_TYPE> - type of media (YOUTUBE_VIDEO, VIDEO, IMAGE).
  • <WRITER_TYPE> - writer identifier (check available options at garf-io library).
  • <OUTPUT_FILE_NAME> - name of the file to store results of tagging (by default media_results).

Source customizations

Source customizations are performed via --source.parameters=value syntax (i.e. --googleads.account=1)

  • googleads:

    Mandatory:

    • account=ACCOUNT_ID

    Optional:

    • ads_config_path=PATH-TO-GOOGLE-ADS-YAML
    • campaign-types=CAMPAIGN_TYPE
    • start-date=YYYY-MM-DD
    • end-date=YYYY-MM-DD
  • youtube:

    Mandatory:

    • channel=YOUTUBE_CHANNEL_ID
  • file:

    Mandatory:

    • path=PATH_TO_FILE

    Optional:

    • media_identifier=IDENTIFIER_OF_MEDIA
    • metric_names=COMMA_SEPARATED_METRIC_NAMES
  • bq:

    Mandatory:

    • table=FULLY_QUALIFIED_TABLE_NAME (in project.dataset.table format)

    Optional:

    • media_identifier=IDENTIFIER_OF_MEDIA
    • metric_names=COMMA_SEPARATED_METRIC_NAMES
  • sqldb:

    Mandatory:

    • connection_string=DATABASE_CONNECTION_STRING (in SQLAlchemy format)
    • table=TABLE_NAME

    Optional:

    • media_identifier=IDENTIFIER_OF_MEDIA
    • metric_names=COMMA_SEPARATED_METRIC_NAMES

Available extra info modules

Source customizations are performed via --extra-info module.method syntax (i.e. --extra-info tagging.languages,googleads.main_geo)

Currently supported modules:

  • googleads:

    • main_geo - identifies main spending country for a media.
    • approval_rate - calculates approval rate (from 0 to 1) for each media.
  • tagging:

    • language - identifies language of a media.
  • youtube:

    • language - identifies language of YouTube Video based on YouTube Data API.

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

media_fetching-0.2.5.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

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

media_fetching-0.2.5-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file media_fetching-0.2.5.tar.gz.

File metadata

  • Download URL: media_fetching-0.2.5.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.22

File hashes

Hashes for media_fetching-0.2.5.tar.gz
Algorithm Hash digest
SHA256 6c8ef42a737aea241414ed9648edf252fa5238d39b5a4be90c212315d7e6525b
MD5 0d596265a3114c2322acaf79ec6af886
BLAKE2b-256 d4fb70b6fec2b39b8f144714fb0ca5f2b04249d64142100da5279fde7c38fc4a

See more details on using hashes here.

File details

Details for the file media_fetching-0.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for media_fetching-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7a28d3a971d5f0421cd146cbd156c83cb5f57274f1cbda64ff5de40033feec44
MD5 1db272b5c478dbe5338de2991234e393
BLAKE2b-256 a763e7a30e440b72eed0fb3bca3fec09d6ec93b9e9ebeec2ebc70426058053b9

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