[build-system]
requires = ["hatchling", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"

[project]
name = "hishel"
version = "1.1.10"
dynamic = ["readme"]
description = " Elegant HTTP Caching for Python"
license = "BSD-3-Clause"
requires-python = ">=3.10"
authors = [{ name = "Kar Petrosyan", email = "kar.petrosyanpy@gmail.com" }]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Environment :: Web Environment",
    "Framework :: AsyncIO",
    "Framework :: Trio",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: BSD License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Python :: 3.14",
    "Topic :: Internet :: WWW/HTTP",
]
dependencies = [
    "msgpack>=1.1.2",
    "typing-extensions>=4.14.1",
]

[project.optional-dependencies]

async = [
    "anyio>=4.9.0",
    "anysqlite>=0.0.5",
]

requests = [
    "requests>=2.32.5",
]
httpx = [
    "httpx>=0.28.1",
    # install async extra
    "anyio>=4.9.0",
    "anysqlite>=0.0.5",
]
fastapi = [
    "fastapi>=0.119.1",
]

[project.urls]
Homepage = "https://hishel.com"
Source = "https://github.com/karpetrosyan/hishel"

[tool.hatch.version]
path = "hishel/__init__.py"

[tool.hatch.build.targets.sdist]
include = ["/hishel", "/CHANGELOG.md", "/README.md"]

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "CHANGELOG.md"

[tool.mypy]
strict = true
show_error_codes = true
warn_unused_ignores = false
exclude = ['venv', '.venv']

[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false

check_untyped_defs = true
[[tool.mypy.overrides]]
module = ["time_machine.*", "msgpack.*"]
ignore_missing_imports = true

[tool.pytest.ini_options]
addopts = ["-rxXs", "--strict-config", "--strict-markers"]
filterwarnings = []

[tool.coverage.report]
exclude_also = ['__repr__', 'raise NotImplementedError()']

[tool.ruff]
exclude = [
    "hishel/_sync",
    "hishel/__init__.py",
    "tests/_sync",
    "hishel/_core/_sync",
    "tests/_core/_sync",
    "hishel/_sync_cache.py",
    "tests/test_sync_httpx.py",
    "hishel/_core/_storages/_sync_sqlite.py",
    "hishel/_core/_storages/_sync_base.py",
    "tests/test_sync_httpx.py",
    "hishel/_sync_httpx.py"
]
line-length = 120

[tool.ruff.lint]
select = ["E", "F", "W", "I"]

[tool.ruff.lint.isort]
combine-as-imports = true


[dependency-groups]
dev = [
    "anyio==4.12.1",
    "anysqlite>=0.0.5",
    "coverage==7.10.7",
    "fastapi[standard]>=0.119.1",
    "hatch==1.15.1",
    "inline-snapshot>=0.28.0",
    "mike>=2.1.3",
    "mkdocs==1.6.1",
    "mkdocs-git-committers-plugin>=0.2.3",
    "mkdocs-git-revision-date-localized-plugin>=1.4.7",
    "mkdocs-material==9.7.1",
    "mypy==1.19.1",
    "pyright>=1.1.404",
    "pytest==8.4.2",
    "pytest-cov>=6.2.1",
    "pytest-icdiff>=0.9",
    "ruff==0.14.14",
    "time-machine>=2.19.0",
    "trio==0.31.0",
    "types-boto3==1.42.39",
    "types-pyyaml==6.0.12.20250915",
    "types-requests>=2.31.0.6",
    "zipp>=3.19.1",
]
