Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

2.7 KB
Raw Blame
[project]
name = "openverse-api"
version = "0.0.0" # redundant for application
description = "API for the Openverse project"
readme = "README.md"
license = {text = "MIT"}
authors = [
    {name = "Openverse Contributors", email = "[email protected]"},
]

requires-python = "==3.14.*"
dependencies = [
    "adrf >= 0.1.14, <0.2",
    "aiohttp >=3.11.11, <4",
    "aws-requests-auth >=0.4.3, <0.5",
    "deepdiff >=8.0.1, <9",
    "django >=5.2.19, <6",
    "django-asgi-lifespan >=0.5.1, <0.6",
    "django-cors-headers >=4.3.1, <5",
    "django-migrations-git-conflicts >=1.0, <2",
    "django-oauth-toolkit >=3.4.1, <4",
    "django-redis >=6.0.0, <7",
    "django-split-settings >=1.2.0, <2",
    "django-structlog >=9, <10",
    "django-tqdm >=1.3.1, <2",
    "django-uuslug >=2.0.0, <3",
    "djangorestframework >=3.14.0, <4",
    "drf-spectacular[sidecar] >=0.30, <0.31",
    "elasticsearch >=8.19.3, <9",
    "limit >=0.2.3, <0.3",
    "pillow >=13, <14",
    "psycopg[pool] >=3.2.3, <4",
    "python-decouple >=3.8, <4",
    "uvicorn[standard] >=0.54, <0.55",
    "openverse-attribution",
]

[tool.uv]
package = false
default-groups = "all"

[tool.uv.sources]
# Docker builds install it as a regular package with `--no-editable`.
openverse-attribution = { path = "../packages/python/openverse-attribution", editable = true }

[dependency-groups]
dev = [
    "debugpy >= 1.8.9, <2",
    "ipython >=9.1, <10",
    "pgcli >=4.1, <5",
    "remote-pdb >=2.1, <3",
    "setuptools >=84.1, <85",
    # FIXME: Should be removed when Python build issues are resolved,
    # FIXME: since we don't explicitly use this library.
    # FIXME: https://github.com/WordPress/openverse/issues/5146
    "watchfiles >=0.24.0",
]
test = [
    "factory-boy >=3.3, <4",
    "fakeredis >=2.26, <3",
    "freezegun >=1.5, <2",
    "pook >=2.1.5, <3",
    "pytest >=9, <10",
    "pytest-django >=4.9, <5",
    "pytest-pook>=1.0.0",
    "pytest-raises >=0.11, <0.12",
    "pytest-sugar >=1, <1.1",
    "schemathesis >=4.13, <5",
]

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "conf.settings"

pythonpath = "."

filterwarnings = [
    # Ignore warnings related to unverified HTTPS requests.
    # Reason: This warning is suppressed to avoid raising warnings when making HTTP requests
    # to servers with invalid or self-signed SSL certificates. It allows the tests to proceed
    # without being interrupted by these warnings.
    "ignore:Unverified HTTPS request",

    # Ignore warnings coming from schemathesis.
    # Reason: These are warnings raised by the library itself and are not relevant to our codebase.
    "ignore:jsonschema.RefResolver is deprecated as of v4.18.0",
    "ignore:jsonschema.exceptions.RefResolutionError is deprecated as of version 4.18.0.",
]