blob: 93fa132a0b4fa0242c296bf35f83f4e51fa74a7c [file] [edit]
[project]
name = 'requests-cache'
version = '1.3.4'
description = 'A persistent cache for python requests'
authors = [{name='Jordan Cook'}, {name='Roman Haritonov'}]
license = 'BSD-2-Clause'
readme = 'README.md'
keywords = [
'requests',
'python-requests',
'cache',
'http',
'http-client',
'web',
'webscraping',
'performance',
'sqlite',
'redis',
'mongodb',
'dynamodb',
]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'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',
'Programming Language :: Python :: 3.15',
'Topic :: Software Development :: Libraries :: Python Modules',
'Typing :: Typed',
]
requires-python = '>=3.8'
# Required dependencies
dependencies = [
'requests >=2.22', # Needs no introduction
'urllib3 >=1.25.5', # Use a slightly newer version than required by requests (for bugfixes)
'attrs >=21.2', # For response data models
'cattrs >=22.2', # For response serialization
'platformdirs >=2.5', # For features that use platform-specific system directories
'url-normalize >=2.0', # For more accurate request matching
]
[project.urls]
homepage = 'https://github.com/requests-cache/requests-cache'
repository = 'https://github.com/requests-cache/requests-cache'
documentation = 'https://requests-cache.readthedocs.io'
[project.optional-dependencies]
# Optional backend and serialization dependencies
dynamodb = ['boto3>=1.15', 'botocore>=1.18']
mongodb = ['pymongo>=3']
redis = ['redis>=3']
security = ['itsdangerous>=2.0']
yaml = ['pyyaml>=6.0.1']
all = [
'boto3 >=1.15',
'botocore >=1.18',
'itsdangerous >=2.0',
'orjson >=3.0; python_version < "3.14"',
'pymongo >=3',
'pyyaml >=6.0.1',
'redis >=3',
'ujson >=5.4',
]
[dependency-groups]
# Test dependencies and local development tools
dev = [
'coverage >=7.2',
'psutil >=5.0',
'pytest >=8.2',
'pytest-clarity >=1.0.1',
'pytest-cov >=3.0',
'pytest-pretty >=1.2',
'pytest-rerunfailures >=10.1',
'pytest-xdist >=2.2',
'requests >=2.22.0.dev0', # Use a prerelease if it's the latest version
'requests-mock ~=1.12',
'responses >=0.19',
'tenacity ~=8.0',
'time-machine ~=2.9; implementation_name != "pypy"',
'nox >=2024.4',
'prek >=0.2',
'rich >=10.0',
]
# Documentation dependencies
docs = [
'furo ~=2025.7 ; python_version>="3.11"',
'linkify-it-py >=2.0 ; python_version>="3.11"',
'myst-parser >=3.0 ; python_version>="3.11"',
'sphinx ~=8.2.3 ; python_version>="3.11"',
'sphinx-autobuild ~=2024.10 ; python_version>="3.11"',
'sphinx-autodoc-typehints ~=3.2 ; python_version>="3.11"',
'sphinx-automodapi ~=0.20 ; python_version>="3.11"',
'sphinx-copybutton >=0.5 ; python_version>="3.11"',
'sphinx-design >=0.6 ; python_version>="3.11"',
'sphinx-notfound-page >=1.0 ; python_version>="3.11"',
'sphinx-llms-txt >=0.5 ; python_version>="3.11"',
'sphinx-sitemap >=2.8 ; python_version>="3.11"',
'sphinxcontrib-apidoc >=0.3 ; python_version>="3.11"',
'sphinxext-opengraph >=0.9 ; python_version>="3.11"',
]
[build-system]
requires = ['hatchling>=1.0.0']
build-backend = 'hatchling.build'
[tool.hatch.build]
only-include = ['requests_cache']
force-include = {'README.md' = 'requests_cache/README.md'}
# Include tests in sdist, except for sample data, which is too large to package
[tool.hatch.build.targets.sdist]
only-include = ['requests_cache', 'tests']
exclude = [
"tests/sample_data",
"tests/integration/test_upgrade.py",
]
[tool.coverage.html]
directory = 'test-reports'
[tool.coverage.xml]
output = 'test-reports/coverage.xml'
[tool.coverage.run]
branch = true
source = ['requests_cache']
omit = [
'requests_cache/__init__.py',
'requests_cache/backends/__init__.py',
'requests_cache/models/__init__.py',
'requests_cache/serializers/__init__.py',
]
[tool.coverage.report]
exclude_lines = [
'pragma: no cover',
'if TYPE_CHECKING:',
'if logger.level',
'except ImportError:',
]
[tool.mypy]
python_version = 3.8
ignore_missing_imports = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
show_error_codes = true
show_column_numbers = true
pretty = true
[tool.ruff]
fix = true
unsafe-fixes = true
line-length = 100
output-format = 'grouped'
target-version = 'py38'
exclude = ['examples/']
[tool.ruff.format]
quote-style = 'single'
[tool.ruff.lint]
select = ['B', 'C4', 'C90', 'E', 'F']
ignore = ['B023']
[tool.ruff.lint.isort]
known-first-party = ['tests']
# Wrap lines to 100 chars, but don't error on unwrappable lines until 120 chars
[tool.ruff.lint.pycodestyle]
max-line-length = 120
[tool.typos]
files.extend-exclude = [
'.all-contributorsrc',
'CONTRIBUTORS.md',
'docs/sample_data',
'tests/sample_data',
]