{"id":29370905,"url":"https://github.com/halworsen/fflogsapi","last_synced_at":"2025-07-09T14:11:32.832Z","repository":{"id":85691823,"uuid":"484552076","full_name":"halworsen/fflogsapi","owner":"halworsen","description":"A Python client for the FF Logs API","archived":false,"fork":false,"pushed_at":"2024-11-16T14:40:40.000Z","size":282,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T09:42:17.208Z","etag":null,"topics":["api","api-client","caching","fflogs","fflogs-api","ffxiv","graphql","lazy"],"latest_commit_sha":null,"homepage":"https://fflogsapi.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/halworsen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-22T19:40:50.000Z","updated_at":"2025-02-10T14:21:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"2ecc88de-c5cd-4ef6-b09a-4ec1164936fc","html_url":"https://github.com/halworsen/fflogsapi","commit_stats":{"total_commits":86,"total_committers":2,"mean_commits":43.0,"dds":"0.011627906976744207","last_synced_commit":"9b25aa2d2ea7ac8613c0ae8afde110213d02118e"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/halworsen/fflogsapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halworsen%2Ffflogsapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halworsen%2Ffflogsapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halworsen%2Ffflogsapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halworsen%2Ffflogsapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halworsen","download_url":"https://codeload.github.com/halworsen/fflogsapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halworsen%2Ffflogsapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264473897,"owners_count":23613961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-client","caching","fflogs","fflogs-api","ffxiv","graphql","lazy"],"created_at":"2025-07-09T14:11:31.484Z","updated_at":"2025-07-09T14:11:32.823Z","avatar_url":"https://github.com/halworsen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fflogsapi\n\nfflogsapi is a lazy Python 3 client for [FF Logs](https://www.fflogs.com/)' v2 GraphQL API with query caching functionality.\n\n[![Tests](https://github.com/halworsen/fflogsapi/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/halworsen/fflogsapi/actions/workflows/test.yml)\n[![Linting](https://github.com/halworsen/fflogsapi/actions/workflows/lint.yml/badge.svg?branch=master)](https://github.com/halworsen/fflogsapi/actions/workflows/lint.yml)\n[![codecov](https://codecov.io/gh/halworsen/fflogsapi/branch/master/graph/badge.svg?token=YTEGMDJOGL)](https://codecov.io/gh/halworsen/fflogsapi)\n[![Documentation Status](https://readthedocs.org/projects/fflogsapi/badge/?version=latest)](https://fflogsapi.readthedocs.io/en/latest/?badge=latest)\n[![pypi](https://shields.io/pypi/v/fflogsapi)](https://pypi.org/project/fflogsapi/)\n\n---\n\n## Installation\n\nfflogsapi is available as a [PyPI package](https://pypi.org/project/fflogsapi/) and\ncan be installed with pip:\n\n```shell\npip install fflogsapi\n```\n\nIf you want to contribute, you can install fflogsapi with the following command\nto install development and test tools as well:\n\n```shell\npip install fflogsapi[dev,test]\n```\n\n## Example usage\n\nCalculating damage done under pots:\n\n```python\nfrom config import CLIENT_ID, CLIENT_SECRET\n\nfrom fflogsapi import FFLogsClient\n\nclient = FFLogsClient(CLIENT_ID, CLIENT_SECRET)\nreport = client.get_report('rGARYmQwTKbahXz9')\n\nfor fight in report:\n    print(f'Fight #{fight.id}:', fight.name(), f'- Kill: {fight.is_kill()}')\n    pot_table = fight.table(filters={'sourceAurasPresent': 'Medicated'})\n    potted_damage = 0\n    for damage in pot_table['damageDone']:\n        potted_damage += damage['total']\n    print(f'Damage done under pots: {potted_damage}')\n    if not fight.is_kill():\n        print(f'Percentage reached: {fight.percentage()}')\n\nclient.close()\nclient.save_cache()\n```\n\nListing reports and durations for a specific guild:\n\n```python\nfrom config import CLIENT_ID, CLIENT_SECRET\n\nfrom fflogsapi import FFLogsClient\n\nclient = FFLogsClient(CLIENT_ID, CLIENT_SECRET)\nfor page in client.reports(filters={ 'guildID': 80551 }):\n    print(f'Reports in page: {page.count()}')\n    for report in page:\n        print(report.title(), f'Duration: {report.duration()}')\n\nclient.close()\nclient.save_cache()\n```\n\nListing a character's RDPS \u0026 All stars rank for Abyssos Savage in 6.28:\n\n```python\nfrom config import CLIENT_ID, CLIENT_SECRET\n\nfrom fflogsapi import FFLogsClient, GQLEnum, FightDifficulty\n\nclient = FFLogsClient(CLIENT_ID, CLIENT_SECRET)\ncharacter = client.get_character(id=19181640)\n\nabyssos = client.get_zone(id=49)\npartition_628 = next(filter(\n    lambda p: '6.28' in p.name,\n    abyssos.partitions()\n))\n\nrankings = character.zone_rankings(filters={\n    'specName': 'Reaper',\n    'metric': GQLEnum('rdps'),\n    'zoneID': abyssos.id,\n    'difficulty': FightDifficulty.SAVAGE.value,\n    'partition': partition_628.id,\n})\n\nprint('6.28 All Star points: '\n      f'{rankings.all_stars[0].points} (rank {rankings.all_stars[0].rank})')\n\nfor rank in rankings.encounter_ranks:\n    print(f'{rank.encounter.name()}: {rank.best_amount}rdps (rank {rank.all_stars.rank})')\n\nclient.close()\nclient.save_cache()\n```\n\n## User mode\n\nThe default access mode of the client is 'client' mode, which uses the public API. This is by far the most\nconvenient method to use the client, and usually provides access to enough data for the majority of\nuse cases.\n\nIf you need to access private information, you can configure the client to use user mode,\ngranting access to private information such as private reports.\n\nTo use user mode, you must first specify `https://localhost:4433` as the redirect URL in your API\nclient on FF Logs. Then provide the `mode='user'` kwarg to the client when instantiating it:\n\n```python\nclient = FFLogsClient(CLIENT_ID, CLIENT_SECRET, mode='user')\n```\n\nThis will have the client popup a browser window for you to log in. When logged in, the client gets\naccess to the user API. Note that the client will generate a self-signed certificate to serve\nthe redirect. Your browser will likely produce a warning about this, although it is safe to ignore.\n\nIf you wish to handle the user authentication flow yourself, you can still use the API client in\nuser mode by calling `set_auth_response` on the client **before using it**:\n\n```python\n# Your implementation of the user authentication flow here\n...\n\nclient = FFLogsClient(CLIENT_ID, CLIENT_SECRET, mode='user')\nclient.set_auth_response(response)\n\n# Start using the client\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalworsen%2Ffflogsapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalworsen%2Ffflogsapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalworsen%2Ffflogsapi/lists"}