Filonov library & CLI tool
Prerequisites
- Python 3.10+
- Prerequisites for
media-tagginglibrary satisfied
Installation
pip install filonov
Install filonov with UI support to have a visual way of file generation
pip install filonov[ui]
Usage
Run filonov based on one of the following sources:
Alternatively run
filonov-uito generate files in an interactive UI.
filonov supports three main modes determined by the --source argument:
googleads- fetch all assets from a Google Ads account / MCC.file- fetch all assets with their tags and metrics from CSV filesyoutube- fetch public videos from a YouTube channel.
Google Ads API
filonov --source googleads --media-type <MEDIA_TYPE> \
--db-uri=<CONNECTION_STRING> \
--tagger=<TAGGER_TYPE> \
--googleads.ads_config_path=<PATH-TO-GOOGLE-ADS-YAML> \
--googleads.campaign-types=<CAMPAIGN_TYPE> \
--googleads.account=<ACCOUNT_ID> \
--googleads.start-date=YYYY-MM-DD \
--googleads.end-date=YYYY-MM-DD \
--size-base=cost \
--trim-tags-threshold <TAG_TRIM_THRESHOLD> \
--parallel-threshold <N_THREADS> \
--output-name <FILE_NAME>
where:
<MEDIA_TYPE>- one ofIMAGEorYOUTUBE_VIDEO<CAMPAIGN_TYPE>- all possible combinationsapp,pmax,demandgen,display,videoseparated by commas.<TAGGER_TYPE>- one of possible media taggers listed here<ACCOUNT_ID>- Google Ads Account Id in 1234567890 format. Can be MCC.<CONNECTION_STRING>- Connection string to the database with tagging results (i.e.sqlite:///tagging.db). Make sure that DB exists.To create an empty Sqlite DB call
touch database.db.<PATH-TO-GOOGLE-ADS-YAML>- path togoogle-ads.yaml.<TAG_TRIM_THRESHOLD>- Remove all tags with score lower than provided threshold.<FILE_NAME>- Path to store results of runningfilonov. By default results are stored in the same folder wherefilonovis run, but you can provide any custom path (including remote one).
Examples
- Analyze all images in App campaigns for the last 30 days
filonov --source googleads --media-type IMAGE \
--googleads.campaign-types=app \
--googleads.account=<ACCOUNT_ID>
- Analyze all images in DemandGen campaigns for the January 2025
filonov --source googleads --media-type IMAGE \
--googleads.campaign-types=demandgen \
--googleads.start_date=2025-01-01 \
--googleads.end_date=2025-01-31 \
--googleads.account=<ACCOUNT_ID>
- Save results to Google Cloud Storage
filonov --source googleads --media-type IMAGE \
--googleads.campaign-types=app \
--googleads.account=<ACCOUNT_ID> \
--output-name gs://<YOUR_BUCKET>/filonov
In order to use
filonovfor tagging YOUTUBE_VIDEO in Google Ads account (with parameters--source googleads --media-type YOUTUBE_VIDEO) you need to be a content owner or request data only for publicly available videos. Alternatively if you have access to video files you can perform media tagging before runningfilonov. Checkmedia-taggingREADME for more details.
Local files
filonov --source file --media-type <MEDIA_TYPE> \
--db-uri=<CONNECTION_STRING> \
--tagger=<TAGGER_TYPE> \
--file.path=<PATH_TO_CSV_WITH_PERFORMANCE_RESULTS> \
--file.media_identifier=<COLUMN_WITH_MEDIA_URL> \
--file.media_name=<COLUMN_WITH_MEDIA_NAME> \
--file.metric_names=<COMMA_SEPARATED_METRICS_IN_FILE> \
--size-base=cost \
--parallel-threshold <N_THREADS> \
--output-name <FILE_NAME>
where:
<MEDIA_TYPE>- one ofIMAGE,VIDEOorYOUTUBE_VIDEO<TAGGER_TYPE>- one of possible media taggers listed here
taggercan be omitted - in that casefilonovwill search any loaded tagging data in provided database.
<CONNECTION_STRING>- Connection string to the database with tagging results (i.e.sqlite:///tagging.db). Make sure that DB exists.To create an empty Sqlite DB call
touch database.db.<PATH_TO_CSV_WITH_PERFORMANCE_RESULTS>- path to csv file containing performance results.<COLUMN_WITH_MEDIA_URL>- column name in the file where media urls are found (defaults tomedia_url).<COLUMN_WITH_MEDIA_NAME>- column name in the file where name of media is found (defaults tomedia_name).<COMMA_SEPARATED_METRICS_IN_FILE>- comma separated names of metrics to be injected into the output.<FILE_NAME>- Path to store results of runningfilonov. By default results are stored in the same folder wherefilonovis run, but you can provide any custom path (including remote one).
Examples
- Get performance data from
performance.csvfile and search for tags in provided DB.
filonov --source file --media-type IMAGE \
--file.path=performance.csv \
--db-uri sqlite:///tagging.db
- Get performance data from
performance.csvfile and perform tagging withgeminitagger.
filonov --source file --media-type IMAGE \
--file.path=performance.csv \
--tagger gemini
YouTube Channel
filonov --source youtube \
--db-uri=<CONNECTION_STRING> \
--youtube.channel=YOUR_CHANNEL_ID \
--parallel-threshold 10 \
--output-name <FILE_NAME>
Metadata
Release files for filonov 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| filonov-0.12.0.tar.gz | 26.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| filonov-0.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 60.6 kB
Release files / filonov-0.12.0.tar.gz
| Download URL | filonov-0.12.0.tar.gz |
|---|---|
| Size | 26.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df3145c4e50dffac715038454e41e781dfb85ff508daf86d5fd40554762facd3
|
|
BLAKE2b-256 checksum How to use checksums |
026ec3267bb2413ca050f681810c85e64bd6bce093f77846a1bd50f075bb4670
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / filonov-0.12.0-py3-none-any.whl
| Download URL | filonov-0.12.0-py3-none-any.whl |
|---|---|
| Size | 34.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f67a6882cf804ee4d9d7c35227cadc4124675df5b8ebfa00e2b3cb2950d4a32b
|
|
BLAKE2b-256 checksum How to use checksums |
bca7955c04551160c264b526afedade37a365f159349a23393a1876be3a3c623
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|