repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/maps/parsers/__init__.py | app/maps/parsers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/gamemodes/enums.py | app/gamemodes/enums.py | from enum import StrEnum
from app.helpers import read_csv_data_file
# Dynamically create the MapGamemode enum by using the CSV File
gamemodes_data = read_csv_data_file("gamemodes")
MapGamemode = StrEnum(
"MapGamemode",
{
gamemode["key"].upper().replace("-", "_"): gamemode["key"]
for gamemode i... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/gamemodes/router.py | app/gamemodes/router.py | """Gamemodes endpoints router : gamemodes list, etc."""
from fastapi import APIRouter, Request, Response
from app.enums import RouteTag
from app.helpers import success_responses
from .controllers.list_gamemodes_controller import ListGamemodesController
from .models import GamemodeDetails
router = APIRouter()
@rou... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/gamemodes/models.py | app/gamemodes/models.py | """Set of pydantic models used for Gamemodes API routes"""
from pydantic import BaseModel, Field, HttpUrl
from .enums import MapGamemode
class GamemodeDetails(BaseModel):
key: MapGamemode = Field(
...,
description=(
"Key corresponding to the gamemode. Can be "
"used as fi... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/gamemodes/__init__.py | app/gamemodes/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/gamemodes/controllers/__init__.py | app/gamemodes/controllers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/gamemodes/controllers/list_gamemodes_controller.py | app/gamemodes/controllers/list_gamemodes_controller.py | """List Gamemodes Controller module"""
from typing import ClassVar
from app.config import settings
from app.controllers import AbstractController
from app.gamemodes.parsers.gamemodes_parser import GamemodesParser
class ListGamemodesController(AbstractController):
"""List Gamemodes Controller used in order to re... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/gamemodes/parsers/__init__.py | app/gamemodes/parsers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/gamemodes/parsers/gamemodes_parser.py | app/gamemodes/parsers/gamemodes_parser.py | """Gamemodes Parser module"""
from app.parsers import CSVParser
class GamemodesParser(CSVParser):
"""Overwatch map gamemodes list page Parser class"""
filename = "gamemodes"
def parse_data(self) -> list[dict]:
return [
{
"key": gamemode["key"],
"name"... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/enums.py | app/heroes/enums.py | from enum import StrEnum
from app.helpers import read_csv_data_file
class MediaType(StrEnum):
"""Media types for heroes pages"""
COMIC = "comic"
SHORT_STORY = "short-story"
VIDEO = "video"
# Dynamically create the HeroKey enum by using the CSV File
heroes_data = read_csv_data_file("heroes")
HeroKe... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/router.py | app/heroes/router.py | """Heroes endpoints router : heroes list, heroes details, etc."""
from typing import Annotated
from fastapi import APIRouter, Path, Query, Request, Response, status
from app.enums import Locale, RouteTag
from app.helpers import routes_responses
from app.maps.enums import MapKey
from app.players.enums import (
Co... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/models.py | app/heroes/models.py | """Set of pydantic models used for Heroes API routes"""
from pydantic import BaseModel, Field, HttpUrl
from app.roles.enums import Role
from .enums import HeroKey, MediaType
class HitPoints(BaseModel):
health: int = Field(..., description="Health of the hero", ge=1, examples=[250])
armor: int = Field(..., ... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/__init__.py | app/heroes/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/commands/check_new_hero.py | app/heroes/commands/check_new_hero.py | """Command used in order to check if a new hero is in the heroes list, compared
to the internal heroes list. If this is a case, a Discord notification is sent to the
developer.
"""
import asyncio
from fastapi import HTTPException
from app.config import settings
from app.helpers import send_discord_webhook_message
fr... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/commands/__init__.py | app/heroes/commands/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/controllers/get_hero_controller.py | app/heroes/controllers/get_hero_controller.py | """Hero Controller module"""
from typing import Any, ClassVar
from app.config import settings
from app.controllers import AbstractController
from ..parsers.hero_parser import HeroParser
from ..parsers.heroes_parser import HeroesParser
from ..parsers.heroes_stats_parser import HeroesStatsParser
class GetHeroControl... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/controllers/list_heroes_controller.py | app/heroes/controllers/list_heroes_controller.py | """List Heroes Controller module"""
from typing import ClassVar
from app.config import settings
from app.controllers import AbstractController
from ..parsers.heroes_parser import HeroesParser
class ListHeroesController(AbstractController):
"""List Heroes Controller used in order to
retrieve a list of avail... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/controllers/get_hero_stats_summary_controller.py | app/heroes/controllers/get_hero_stats_summary_controller.py | """List Heroes Controller module"""
from typing import ClassVar
from app.config import settings
from app.controllers import AbstractController
from ..parsers.hero_stats_summary_parser import HeroStatsSummaryParser
class GetHeroStatsSummaryController(AbstractController):
"""Get Hero Stats Summary Controller use... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/controllers/__init__.py | app/heroes/controllers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/parsers/hero_stats_summary_parser.py | app/heroes/parsers/hero_stats_summary_parser.py | """Hero Stats Summary Parser module"""
from typing import ClassVar
from fastapi import status
from app.config import settings
from app.exceptions import ParserBlizzardError
from app.parsers import JSONParser
from app.players.enums import PlayerGamemode, PlayerPlatform
class HeroStatsSummaryParser(JSONParser):
... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/parsers/hero_parser.py | app/heroes/parsers/hero_parser.py | """Hero page Parser module"""
import re
from typing import TYPE_CHECKING, ClassVar
from fastapi import status
from app.config import settings
from app.enums import Locale
from app.exceptions import ParserBlizzardError
from app.parsers import HTMLParser
from app.roles.helpers import get_role_from_icon_url
from ..enu... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/parsers/heroes_stats_parser.py | app/heroes/parsers/heroes_stats_parser.py | """Heroes Stats Parser module"""
from typing import ClassVar
from app.parsers import CSVParser
class HeroesStatsParser(CSVParser):
"""Heroes stats (health, armor, shields) Parser class"""
filename = "heroes"
hitpoints_keys: ClassVar[set[str]] = {"health", "armor", "shields"}
def parse_data(self) -... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/parsers/heroes_parser.py | app/heroes/parsers/heroes_parser.py | """Heroes page Parser module"""
from app.config import settings
from app.parsers import HTMLParser
class HeroesParser(HTMLParser):
"""Overwatch heroes list page Parser class"""
root_path = settings.heroes_path
async def parse_data(self) -> list[dict]:
return sorted(
[
... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/heroes/parsers/__init__.py | app/heroes/parsers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/enums.py | app/players/enums.py | from enum import StrEnum
from app.heroes.enums import HeroKey
from app.roles.enums import Role
class CareerStatCategory(StrEnum):
"""Categories of general statistics displayed in the players API"""
ASSISTS = "assists"
AVERAGE = "average"
BEST = "best"
COMBAT = "combat"
GAME = "game"
HERO... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/router.py | app/players/router.py | """Players endpoints router : players search, players career, statistics, etc."""
from typing import Annotated
from fastapi import APIRouter, Depends, Path, Query, Request, Response, status
from app.enums import RouteTag
from app.helpers import routes_responses as common_routes_responses
from .controllers.get_playe... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/models.py | app/players/models.py | """Set of pydantic models used for Players API routes"""
from pydantic import (
AnyHttpUrl,
BaseModel,
ConfigDict,
Field,
HttpUrl,
StrictFloat,
StrictInt,
create_model,
)
from .api_examples import (
CareerStatsExample,
HeroesComparisonsExample,
PlayerCareerStatsExample,
... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/exceptions.py | app/players/exceptions.py | from app.exceptions import OverfastError
class SearchDataRetrievalError(OverfastError):
"""Generic search data retrieval Exception (namecards, titles, etc.)"""
message = "Error while retrieving search data"
| python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/helpers.py | app/players/helpers.py | import re
import unicodedata
from functools import cache
from app.helpers import read_csv_data_file
from app.roles.enums import Role
from .enums import CompetitiveDivision, CompetitiveRole, HeroKey
DURATION_HOURS_PATTERN = re.compile(r"^(-?\d+,?\d*?):(\d+):(\d+)$")
DURATION_MINUTES_PATTERN = re.compile(r"^(-?\d+):(\... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/api_examples.py | app/players/api_examples.py | """Some API result examples, mainly used in the exposed documentation"""
CareerStatsExample = {
"all-heroes": [
{
"category": "best",
"label": "Best",
"stats": [
{
"key": "eliminations_most_in_game",
"label": "Elimi... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | true |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/__init__.py | app/players/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/controllers/get_player_career_controller.py | app/players/controllers/get_player_career_controller.py | """Player Career Controller module"""
from typing import ClassVar
from app.config import settings
from ..parsers.player_career_parser import PlayerCareerParser
from .base_player_controller import BasePlayerController
class GetPlayerCareerController(BasePlayerController):
"""Player Career Controller used in ord... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/controllers/base_player_controller.py | app/players/controllers/base_player_controller.py | """Base Player Controller module"""
from fastapi import HTTPException, status
from app.config import settings
from app.controllers import AbstractController
from app.overfast_logger import logger
class BasePlayerController(AbstractController):
"""Base Player Controller used in order to ensure specific exception... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/controllers/get_player_career_stats_controller.py | app/players/controllers/get_player_career_stats_controller.py | """Player Stats Summary Controller module"""
from typing import ClassVar
from app.config import settings
from ..parsers.player_career_stats_parser import PlayerCareerStatsParser
from .base_player_controller import BasePlayerController
class GetPlayerCareerStatsController(BasePlayerController):
"""Player Career... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/controllers/get_player_stats_summary_controller.py | app/players/controllers/get_player_stats_summary_controller.py | """Player Stats Summary Controller module"""
from typing import ClassVar
from app.config import settings
from ..parsers.player_stats_summary_parser import PlayerStatsSummaryParser
from .base_player_controller import BasePlayerController
class GetPlayerStatsSummaryController(BasePlayerController):
"""Player Sta... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/controllers/search_players_controller.py | app/players/controllers/search_players_controller.py | """Search Players Controller module"""
from typing import ClassVar
from app.config import settings
from app.controllers import AbstractController
from ..parsers.player_search_parser import PlayerSearchParser
class SearchPlayersController(AbstractController):
"""Search Players Controller used in order to find a... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/controllers/__init__.py | app/players/controllers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/parsers/player_career_stats_parser.py | app/players/parsers/player_career_stats_parser.py | """Player stats summary Parser module"""
from .player_career_parser import PlayerCareerParser
class PlayerCareerStatsParser(PlayerCareerParser):
"""Overwatch player career Parser class"""
def filter_request_using_query(self, **_) -> dict:
return self._filter_stats() if self.data else {}
def _co... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/parsers/player_career_parser.py | app/players/parsers/player_career_parser.py | """Player profile page Parser module"""
from typing import TYPE_CHECKING, ClassVar
from fastapi import status
from app.config import settings
from app.exceptions import ParserBlizzardError
from ..enums import (
CareerHeroesComparisonsCategory,
CompetitiveRole,
PlayerGamemode,
PlayerPlatform,
)
from ... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/parsers/player_search_parser.py | app/players/parsers/player_search_parser.py | """Player stats summary Parser module"""
from typing import TYPE_CHECKING
from app.config import settings
from app.overfast_logger import logger
from app.parsers import JSONParser
from ..helpers import get_player_title
if TYPE_CHECKING:
from collections.abc import Iterable
class PlayerSearchParser(JSONParser)... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/parsers/base_player_parser.py | app/players/parsers/base_player_parser.py | from typing import TYPE_CHECKING
from app.overfast_logger import logger
from app.parsers import HTMLParser
from app.players.parsers.search_data_parser import SearchDataParser
if TYPE_CHECKING:
import httpx
class BasePlayerParser(HTMLParser):
def __init__(self, **kwargs):
super().__init__(**kwargs)
... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/parsers/search_data_parser.py | app/players/parsers/search_data_parser.py | """Search Data Parser module"""
from app.config import settings
from app.overfast_logger import logger
from app.parsers import JSONParser
class SearchDataParser(JSONParser):
"""Static Data Parser class"""
root_path = settings.search_account_path
def __init__(self, **kwargs):
super().__init__(**... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/parsers/__init__.py | app/players/parsers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/app/players/parsers/player_stats_summary_parser.py | app/players/parsers/player_stats_summary_parser.py | """Player stats summary Parser module"""
from collections import defaultdict
from copy import deepcopy
from typing import ClassVar
from app.roles.enums import Role
from ..enums import HeroKey, PlayerGamemode, PlayerPlatform
from ..helpers import get_hero_role, get_plural_stat_key
from .player_career_parser import Pl... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/update_test_fixtures.py | tests/update_test_fixtures.py | """Update Parsers Test Fixtures module
Using Blizzard real data about heroes, some players and maps,
download and update parsers test HTML fixtures
"""
import argparse
import asyncio
from pathlib import Path
import httpx
from fastapi import status
from app.config import settings
from app.enums import Locale
from app... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/test_decorators.py | tests/test_decorators.py | from time import sleep
from unittest.mock import Mock, patch
from app.decorators import rate_limited
from app.overfast_logger import logger
def test_rate_limited():
# Define the rate limited method
@rate_limited(max_calls=3, interval=2)
def method_to_limit(param1: int, param2: str, param3: bool):
... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/test_cache_manager.py | tests/test_cache_manager.py | from time import sleep
from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from valkey.exceptions import ValkeyError
from app.cache_manager import CacheManager
from app.config import settings
from app.enums import Locale
if TYPE_CHECKING:
from fastapi import Request
@pytest.fix... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/test_documentation_route.py | tests/test_documentation_route.py | import re
from typing import TYPE_CHECKING
from fastapi import status
if TYPE_CHECKING:
from fastapi.testclient import TestClient
def test_get_redoc_documentation(client: TestClient):
response = client.get("/")
assert response.status_code == status.HTTP_200_OK
assert (
re.search("<title>(.*)... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/conftest.py | tests/conftest.py | from unittest.mock import patch
import fakeredis
import pytest
from fastapi.testclient import TestClient
from app.main import app
@pytest.fixture(scope="session")
def client() -> TestClient:
return TestClient(app)
@pytest.fixture(scope="session")
def valkey_server():
return fakeredis.FakeValkey(protocol=3... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/helpers.py | tests/helpers.py | import json
from pathlib import Path
from app.config import settings
def read_html_file(filepath: str) -> str | None:
"""Helper method for retrieving fixture HTML file data"""
html_file_object = Path(f"{settings.test_fixtures_root_path}/html/{filepath}")
if not html_file_object.is_file():
return ... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/__init__.py | tests/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/test_update_test_fixtures.py | tests/test_update_test_fixtures.py | import asyncio
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from httpx import AsyncClient
from app.config import settings
from app.heroes.enums import HeroKey
from tests.helpers import players_ids
from tests.update_test_fixtures import ( # sourcery skip: dont-import-test-modules
... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/test_helpers.py | tests/test_helpers.py | import pytest
from app import helpers
@pytest.mark.parametrize(
("input_duration", "result"),
[
(98760, "1 day, 3 hours, 26 minutes"),
(86400, "1 day"),
(7200, "2 hours"),
(3600, "1 hour"),
(600, "10 minutes"),
(60, "1 minute"),
],
)
def test_get_human_read... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/roles/test_roles_route.py | tests/roles/test_roles_route.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
from fastapi import status
from app.config import settings
if TYPE_CHECKING:
from fastapi.testclient import TestClient
def test_get_roles(client: TestClient, home_html_data: str):
with patch(
"httpx.AsyncClient.get",
ret... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/roles/conftest.py | tests/roles/conftest.py | import pytest
from tests.helpers import read_html_file
@pytest.fixture(scope="package")
def home_html_data():
return read_html_file("home.html")
| python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/roles/__init__.py | tests/roles/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/roles/parsers/conftest.py | tests/roles/parsers/conftest.py | import pytest
from app.roles.parsers.roles_parser import RolesParser
@pytest.fixture(scope="package")
def roles_parser() -> RolesParser:
return RolesParser()
| python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/roles/parsers/test_roles_parser.py | tests/roles/parsers/test_roles_parser.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from app.exceptions import OverfastError
from app.roles.enums import Role
if TYPE_CHECKING:
from app.roles.parsers.roles_parser import RolesParser
@pytest.mark.asyncio
async def test_roles_page_parsi... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/roles/parsers/__init__.py | tests/roles/parsers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/maps/test_maps_route.py | tests/maps/test_maps_route.py | from pathlib import Path
from typing import TYPE_CHECKING
import pytest
from fastapi import status
from app.config import settings
from app.gamemodes.enums import MapGamemode
if TYPE_CHECKING:
from fastapi.testclient import TestClient
def test_get_maps(client: TestClient):
response = client.get("/maps")
... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/maps/__init__.py | tests/maps/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/maps/parsers/conftest.py | tests/maps/parsers/conftest.py | import pytest
from app.maps.parsers.maps_parser import MapsParser
@pytest.fixture(scope="package")
def maps_parser() -> MapsParser:
return MapsParser()
| python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/maps/parsers/__init__.py | tests/maps/parsers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/maps/parsers/test_maps_parser.py | tests/maps/parsers/test_maps_parser.py | from typing import TYPE_CHECKING
import pytest
from app.exceptions import OverfastError
if TYPE_CHECKING:
from app.maps.parsers.maps_parser import MapsParser
@pytest.mark.asyncio
async def test_maps_page_parsing(maps_parser: MapsParser):
try:
await maps_parser.parse()
except OverfastError:
... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/gamemodes/test_gamemodes_route.py | tests/gamemodes/test_gamemodes_route.py | from pathlib import Path
from typing import TYPE_CHECKING
from fastapi import status
from app.config import settings
if TYPE_CHECKING:
from fastapi.testclient import TestClient
def test_get_gamemodes(client: TestClient):
response = client.get("/gamemodes")
assert response.status_code == status.HTTP_200... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/gamemodes/__init__.py | tests/gamemodes/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/gamemodes/parsers/conftest.py | tests/gamemodes/parsers/conftest.py | import pytest
from app.gamemodes.parsers.gamemodes_parser import GamemodesParser
@pytest.fixture(scope="package")
def gamemodes_parser() -> GamemodesParser:
return GamemodesParser()
| python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/gamemodes/parsers/test_gamemodes_parser.py | tests/gamemodes/parsers/test_gamemodes_parser.py | from typing import TYPE_CHECKING
import pytest
from app.exceptions import OverfastError
if TYPE_CHECKING:
from app.gamemodes.parsers.gamemodes_parser import GamemodesParser
@pytest.mark.asyncio
async def test_gamemodes_page_parsing(gamemodes_parser: GamemodesParser):
try:
await gamemodes_parser.par... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/gamemodes/parsers/__init__.py | tests/gamemodes/parsers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/test_hero_routes.py | tests/heroes/test_hero_routes.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from app.config import settings
from app.heroes.enums import HeroKey
if TYPE_CHECKING:
from fastapi.testclient import TestClient
@pytest.mark.parametrize(
("hero_name", "hero_html_data"),
[(h... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/test_heroes_route.py | tests/heroes/test_heroes_route.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from app.config import settings
from app.roles.enums import Role
if TYPE_CHECKING:
from fastapi.testclient import TestClient
@pytest.fixture(scope="module", autouse=True)
def _setup_heroes_test(heroe... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/test_hero_stats_route.py | tests/heroes/test_hero_stats_route.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from app.config import settings
from app.players.enums import PlayerGamemode, PlayerPlatform, PlayerRegion
if TYPE_CHECKING:
from fastapi.testclient import TestClient
@pytest.fixture(scope="module", ... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/conftest.py | tests/heroes/conftest.py | import json
from typing import TYPE_CHECKING
from unittest.mock import Mock
import pytest
from fastapi import status
from tests.helpers import read_html_file, read_json_file
if TYPE_CHECKING:
from _pytest.fixtures import SubRequest
@pytest.fixture(scope="package")
def heroes_html_data():
return read_html_f... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/__init__.py | tests/heroes/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/commands/test_check_new_hero.py | tests/heroes/commands/test_check_new_hero.py | import asyncio
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from app.heroes.commands.check_new_hero import main as check_new_hero_main
from app.heroes.enums import HeroKey
@pytest.fixture(scope="module", autouse=True)
def _setup_check_new_hero_test():
with patch(
"app.h... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/commands/__init__.py | tests/heroes/commands/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/controllers/conftest.py | tests/heroes/controllers/conftest.py | from unittest.mock import MagicMock, patch
import pytest
from app.heroes.controllers.get_hero_controller import GetHeroController
@pytest.fixture(scope="package")
def get_hero_controller() -> GetHeroController:
with patch(
"app.controllers.AbstractController.__init__", MagicMock(return_value=None)
)... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/controllers/test_heroes_controllers.py | tests/heroes/controllers/test_heroes_controllers.py | from typing import TYPE_CHECKING, Any
import pytest
if TYPE_CHECKING:
from app.heroes.controllers.get_hero_controller import GetHeroController
@pytest.mark.parametrize(
("input_dict", "key", "new_key", "new_value"),
[
# Empty dict
({}, "key", "new_key", "new_value"),
# Key doesn'... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/controllers/__init__.py | tests/heroes/controllers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/parsers/test_hero_stats_summary.py | tests/heroes/parsers/test_hero_stats_summary.py | from unittest.mock import patch
import pytest
from app.exceptions import OverfastError, ParserBlizzardError
from app.heroes.parsers.hero_stats_summary_parser import HeroStatsSummaryParser
from app.players.enums import (
CompetitiveDivision,
PlayerGamemode,
PlayerPlatform,
PlayerRegion,
)
@pytest.mar... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/parsers/test_heroes_parser.py | tests/heroes/parsers/test_heroes_parser.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from app.exceptions import OverfastError
from app.heroes.enums import HeroKey
if TYPE_CHECKING:
from app.heroes.parsers.heroes_parser import HeroesParser
@pytest.mark.asyncio
async def test_heroes_pa... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/parsers/conftest.py | tests/heroes/parsers/conftest.py | import pytest
from app.heroes.parsers.hero_parser import HeroParser
from app.heroes.parsers.hero_stats_summary_parser import HeroStatsSummaryParser
from app.heroes.parsers.heroes_parser import HeroesParser
from app.players.enums import PlayerGamemode, PlayerPlatform, PlayerRegion
@pytest.fixture(scope="package")
def... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/parsers/test_hero_parser.py | tests/heroes/parsers/test_hero_parser.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from app.config import settings
from app.enums import Locale
from app.exceptions import OverfastError, ParserBlizzardError
from app.heroes.enums import HeroKey
if TYPE_CHECKING:
from app.heroes.parsers... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/heroes/parsers/__init__.py | tests/heroes/parsers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/test_player_stats_route.py | tests/players/test_player_stats_route.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from httpx import TimeoutException
from app.config import settings
from app.players.enums import HeroKeyCareerFilter, PlayerGamemode, PlayerPlatform
if TYPE_CHECKING:
from fastapi.testclient import Tes... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/test_player_career_route.py | tests/players/test_player_career_route.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from httpx import RemoteProtocolError, TimeoutException
from app.config import settings
from tests.helpers import players_ids
if TYPE_CHECKING:
from fastapi.testclient import TestClient
@pytest.mark.... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/test_search_players_route.py | tests/players/test_search_players_route.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from httpx import TimeoutException
from app.config import settings
if TYPE_CHECKING:
from fastapi.testclient import TestClient
@pytest.fixture(autouse=True)
def _setup_search_players_test(player_sear... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/test_player_summary_route.py | tests/players/test_player_summary_route.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from httpx import TimeoutException
from app.config import settings
from tests.helpers import players_ids
if TYPE_CHECKING:
from fastapi.testclient import TestClient
@pytest.mark.parametrize(
("pl... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/test_player_stats_summary_route.py | tests/players/test_player_stats_summary_route.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from httpx import TimeoutException
from app.config import settings
from app.players.enums import PlayerGamemode, PlayerPlatform
if TYPE_CHECKING:
from fastapi.testclient import TestClient
@pytest.fix... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/test_players_helpers.py | tests/players/test_players_helpers.py | import pytest
from app.heroes.enums import HeroKey
from app.players import helpers
from app.players.enums import CompetitiveDivision, CompetitiveRole
@pytest.mark.parametrize(
("input_str", "result"),
[
# Time format in hour:min:sec => seconds
("1,448:50:56", 5_215_856),
("205:08:38",... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/conftest.py | tests/players/conftest.py | import json
from typing import TYPE_CHECKING
from unittest.mock import Mock
import pytest
from fastapi import status
from tests.helpers import read_html_file, read_json_file
if TYPE_CHECKING:
from _pytest.fixtures import SubRequest
@pytest.fixture(scope="package")
def player_html_data(request: SubRequest) -> s... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/__init__.py | tests/players/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/parsers/test_player_career_stats_parser.py | tests/players/parsers/test_player_career_stats_parser.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from app.exceptions import ParserBlizzardError
from tests.helpers import players_ids, unknown_player_id
if TYPE_CHECKING:
from app.players.parsers.player_career_stats_parser import PlayerCareerStatsPar... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/parsers/conftest.py | tests/players/parsers/conftest.py | from typing import TYPE_CHECKING
import pytest
from app.players.parsers.player_career_parser import PlayerCareerParser
from app.players.parsers.player_career_stats_parser import PlayerCareerStatsParser
from app.players.parsers.player_stats_summary_parser import PlayerStatsSummaryParser
if TYPE_CHECKING:
from _py... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/parsers/__init__.py | tests/players/parsers/__init__.py | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false | |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/parsers/test_player_stats_summary_parser.py | tests/players/parsers/test_player_stats_summary_parser.py | from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from app.exceptions import ParserBlizzardError
from tests.helpers import players_ids, unknown_player_id
if TYPE_CHECKING:
from app.players.parsers.player_stats_summary_parser import PlayerStatsSummaryP... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
TeKrop/overfast-api | https://github.com/TeKrop/overfast-api/blob/e80c7da7d1515327ee0788192570c8462a909945/tests/players/parsers/test_player_career_parser.py | tests/players/parsers/test_player_career_parser.py | import re
from typing import TYPE_CHECKING
from unittest.mock import Mock, patch
import pytest
from fastapi import status
from app.exceptions import ParserBlizzardError, ParserParsingError
from app.players.enums import PlayerGamemode, PlayerPlatform
from tests.helpers import players_ids, unknown_player_id
if TYPE_CH... | python | MIT | e80c7da7d1515327ee0788192570c8462a909945 | 2026-01-05T07:11:35.242714Z | false |
barnumbirr/hazelnut | https://github.com/barnumbirr/hazelnut/blob/bf22120e8fd1c09228dc8570c7d5d45c60ac3b0f/setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name='hazelnut',
version='0.4.1',
url='https://github.com/mrsmn/hazelnut',
download_url='https://github.com/mrsmn/hazelnut/archive/master.zip',
author='Martin Simon',
author_email='me@martinsimon.me',
lic... | python | Apache-2.0 | bf22120e8fd1c09228dc8570c7d5d45c60ac3b0f | 2026-01-05T07:11:45.309443Z | false |
barnumbirr/hazelnut | https://github.com/barnumbirr/hazelnut/blob/bf22120e8fd1c09228dc8570c7d5d45c60ac3b0f/hazelnut/core.py | hazelnut/core.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
class MemInfo(object):
def __init__(self, path='/proc/meminfo'):
self.path = path
def fileobj(self):
return open(self.path, 'r')
def __str__(self):
with self.fileobj() as f:
lines = [line.strip() for line in f]
... | python | Apache-2.0 | bf22120e8fd1c09228dc8570c7d5d45c60ac3b0f | 2026-01-05T07:11:45.309443Z | false |
barnumbirr/hazelnut | https://github.com/barnumbirr/hazelnut/blob/bf22120e8fd1c09228dc8570c7d5d45c60ac3b0f/hazelnut/__init__.py | hazelnut/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__title__ = 'hazelnut'
__version__ = '0.4.1'
__author__ = 'Martin Simon <me@martinsimon.me>'
__repo__ = 'https://github.com/mrsmn/hazelnut'
__license__ = 'Apache v2.0 License'
from .core import MemInfo
| python | Apache-2.0 | bf22120e8fd1c09228dc8570c7d5d45c60ac3b0f | 2026-01-05T07:11:45.309443Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.