Bumps the dev group in /api with 47 updates: | Package | From | To | | --- | --- | --- | | [coverage](https://github.com/coveragepy/coveragepy) | `7.13.5` | `7.14.0` | | [faker](https://github.com/joke2k/faker) | `40.11.0` | `40.19.1` | | [basedpyright](https://github.com/detachhead/basedpyright) | `1.38.3` | `1.39.6` | | [ruff](https://github.com/astral-sh/ruff) | `0.15.7` | `0.15.14` | | [pytest](https://github.com/pytest-dev/pytest) | `9.0.2` | `9.0.3` | | [types-aiofiles](https://github.com/python/typeshed) | `25.1.0.20251011` | `25.1.0.20260518` | | [types-cachetools](https://github.com/python/typeshed) | `6.2.0.20260317` | `7.0.0.20260518` | | [types-colorama](https://github.com/python/typeshed) | `0.4.15.20250801` | `0.4.15.20260508` | | [types-defusedxml](https://github.com/python/typeshed) | `0.7.0.20250822` | `0.7.0.20260504` | | [types-deprecated](https://github.com/python/typeshed) | `1.3.1.20260130` | `1.3.1.20260520` | | [types-docutils](https://github.com/python/typeshed) | `0.22.3.20260322` | `0.22.3.20260518` | | [types-jsonschema](https://github.com/python/typeshed) | `4.26.0.20260202` | `4.26.0.20260518` | | [types-flask-cors](https://github.com/python/typeshed) | `6.0.0.20250809` | `6.0.0.20260518` | | [types-flask-migrate](https://github.com/python/typeshed) | `4.1.0.20250809` | `4.1.0.20260508` | | [types-gevent](https://github.com/python/typeshed) | `25.9.0.20260322` | `26.4.0.20260518` | | [types-greenlet](https://github.com/python/typeshed) | `3.3.0.20251206` | `3.5.0.20260518` | | [types-html5lib](https://github.com/python/typeshed) | `1.1.11.20251117` | `1.1.11.20260518` | | [types-markdown](https://github.com/python/typeshed) | `3.10.2.20260211` | `3.10.2.20260518` | | [types-oauthlib](https://github.com/python/typeshed) | `3.3.0.20250822` | `3.3.0.20260518` | | [types-objgraph](https://github.com/python/typeshed) | `3.6.0.20240907` | `3.6.0.20260508` | | [types-olefile](https://github.com/python/typeshed) | `0.47.0.20240806` | `0.47.0.20260508` | | [types-openpyxl](https://github.com/python/typeshed) | `3.1.5.20260322` | `3.1.5.20260518` | | [types-pexpect](https://github.com/python/typeshed) | `4.9.0.20260127` | `4.9.0.20260518` | | [types-protobuf](https://github.com/python/typeshed) | `6.32.1.20260221` | `7.34.1.20260518` | | [types-psutil](https://github.com/python/typeshed) | `7.2.2.20260130` | `7.2.2.20260518` | | [types-psycopg2](https://github.com/python/typeshed) | `2.9.21.20260223` | `2.9.21.20260518` | | [types-pygments](https://github.com/python/typeshed) | `2.19.0.20251121` | `2.20.0.20260518` | | [types-pymysql](https://github.com/python/typeshed) | `1.1.0.20251220` | `1.1.0.20260518` | | [types-python-dateutil](https://github.com/python/typeshed) | `2.9.0.20260323` | `2.9.0.20260518` | | [types-pywin32](https://github.com/python/typeshed) | `311.0.0.20260323` | `311.0.0.20260521` | | [types-pyyaml](https://github.com/python/typeshed) | `6.0.12.20250915` | `6.0.12.20260518` | | [types-regex](https://github.com/python/typeshed) | `2026.2.28.20260301` | `2026.5.9.20260518` | | [types-shapely](https://github.com/python/typeshed) | `2.1.0.20250917` | `2.1.0.20260518` | | [types-simplejson](https://github.com/python/typeshed) | `3.20.0.20250822` | `3.20.0.20260518` | | [types-six](https://github.com/python/typeshed) | `1.17.0.20251009` | `1.17.0.20260518` | | [types-tensorflow](https://github.com/python/typeshed) | `2.18.0.20260322` | `2.18.0.20260518` | | [types-tqdm](https://github.com/python/typeshed) | `4.67.3.20260303` | `4.67.3.20260518` | | [boto3-stubs](https://github.com/youtype/mypy_boto3_builder) | `1.42.73` | `1.43.14` | | [types-jmespath](https://github.com/python/typeshed) | `1.1.0.20260124` | `1.1.0.20260508` | | [hypothesis](https://github.com/HypothesisWorks/hypothesis) | `6.151.9` | `6.153.0` | | [types-cffi](https://github.com/python/typeshed) | `2.0.0.20260316` | `2.0.0.20260518` | | [types-setuptools](https://github.com/python/typeshed) | `82.0.0.20260210` | `82.0.0.20260518` | | [scipy-stubs](https://github.com/scipy/scipy-stubs) | `1.17.1.3` | `1.17.1.5` | | [types-python-http-client](https://github.com/python/typeshed) | `3.3.7.20250708` | `3.3.7.20260518` | | [celery-types](https://github.com/sbdchd/celery-types) | `0.23.0` | `0.26.0` | | [mypy](https://github.com/python/mypy) | `1.19.1` | `2.1.0` | | [pyrefly](https://github.com/facebook/pyrefly) | `0.57.1` | `1.0.0` | Updates `coverage` from 7.13.5 to 7.14.0 - [Release notes](https://github.com/coveragepy/coveragepy/releases) - [Changelog](https://github.com/coveragepy/coveragepy/blob/main/CHANGES.rst) - [Commits](https://github.com/coveragepy/coveragepy/compare/7.13.5...7.14.0) Updates `faker` from 40.11.0 to 40.19.1 - [Release notes](https://github.com/joke2k/faker/releases) - [Changelog](https://github.com/joke2k/faker/blob/master/CHANGELOG.md) - [Commits](https://github.com/joke2k/faker/compare/v40.11.0...v40.19.1) Updates `basedpyright` from 1.38.3 to 1.39.6 - [Release notes](https://github.com/detachhead/basedpyright/releases) - [Commits](https://github.com/detachhead/basedpyright/compare/v1.38.3...v1.39.6) Updates `ruff` from 0.15.7 to 0.15.14 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.15.7...0.15.14) Updates `pytest` from 9.0.2 to 9.0.3 - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/9.0.2...9.0.3) Updates `types-aiofiles` from 25.1.0.20251011 to 25.1.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-cachetools` from 6.2.0.20260317 to 7.0.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-colorama` from 0.4.15.20250801 to 0.4.15.20260508 - [Commits](https://github.com/python/typeshed/commits) Updates `types-defusedxml` from 0.7.0.20250822 to 0.7.0.20260504 - [Commits](https://github.com/python/typeshed/commits) Updates `types-deprecated` from 1.3.1.20260130 to 1.3.1.20260520 - [Commits](https://github.com/python/typeshed/commits) Updates `types-docutils` from 0.22.3.20260322 to 0.22.3.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-jsonschema` from 4.26.0.20260202 to 4.26.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-flask-cors` from 6.0.0.20250809 to 6.0.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-flask-migrate` from 4.1.0.20250809 to 4.1.0.20260508 - [Commits](https://github.com/python/typeshed/commits) Updates `types-gevent` from 25.9.0.20260322 to 26.4.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-greenlet` from 3.3.0.20251206 to 3.5.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-html5lib` from 1.1.11.20251117 to 1.1.11.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-markdown` from 3.10.2.20260211 to 3.10.2.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-oauthlib` from 3.3.0.20250822 to 3.3.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-objgraph` from 3.6.0.20240907 to 3.6.0.20260508 - [Commits](https://github.com/python/typeshed/commits) Updates `types-olefile` from 0.47.0.20240806 to 0.47.0.20260508 - [Commits](https://github.com/python/typeshed/commits) Updates `types-openpyxl` from 3.1.5.20260322 to 3.1.5.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-pexpect` from 4.9.0.20260127 to 4.9.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-protobuf` from 6.32.1.20260221 to 7.34.1.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-psutil` from 7.2.2.20260130 to 7.2.2.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-psycopg2` from 2.9.21.20260223 to 2.9.21.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-pygments` from 2.19.0.20251121 to 2.20.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-pymysql` from 1.1.0.20251220 to 1.1.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-python-dateutil` from 2.9.0.20260323 to 2.9.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-pywin32` from 311.0.0.20260323 to 311.0.0.20260521 - [Commits](https://github.com/python/typeshed/commits) Updates `types-pyyaml` from 6.0.12.20250915 to 6.0.12.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-regex` from 2026.2.28.20260301 to 2026.5.9.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-shapely` from 2.1.0.20250917 to 2.1.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-simplejson` from 3.20.0.20250822 to 3.20.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-six` from 1.17.0.20251009 to 1.17.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-tensorflow` from 2.18.0.20260322 to 2.18.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-tqdm` from 4.67.3.20260303 to 4.67.3.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `boto3-stubs` from 1.42.73 to 1.43.14 - [Release notes](https://github.com/youtype/mypy_boto3_builder/releases) - [Commits](https://github.com/youtype/mypy_boto3_builder/commits) Updates `types-jmespath` from 1.1.0.20260124 to 1.1.0.20260508 - [Commits](https://github.com/python/typeshed/commits) Updates `hypothesis` from 6.151.9 to 6.153.0 - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.151.9...v6.153.0) Updates `types-cffi` from 2.0.0.20260316 to 2.0.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `types-setuptools` from 82.0.0.20260210 to 82.0.0.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `scipy-stubs` from 1.17.1.3 to 1.17.1.5 - [Release notes](https://github.com/scipy/scipy-stubs/releases) - [Commits](https://github.com/scipy/scipy-stubs/compare/v1.17.1.3...v1.17.1.5) Updates `types-python-http-client` from 3.3.7.20250708 to 3.3.7.20260518 - [Commits](https://github.com/python/typeshed/commits) Updates `celery-types` from 0.23.0 to 0.26.0 - [Commits](https://github.com/sbdchd/celery-types/commits) Updates `mypy` from 1.19.1 to 2.1.0 - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.19.1...v2.1.0) Updates `pyrefly` from 0.57.1 to 1.0.0 - [Release notes](https://github.com/facebook/pyrefly/releases) - [Commits](https://github.com/facebook/pyrefly/compare/0.57.1...1.0.0) --- updated-dependencies: - dependency-name: coverage dependency-version: 7.14.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev - dependency-name: faker dependency-version: 40.19.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev - dependency-name: basedpyright dependency-version: 1.39.6 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev - dependency-name: ruff dependency-version: 0.15.14 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: pytest dependency-version: 9.0.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-aiofiles dependency-version: 25.1.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-cachetools dependency-version: 7.0.0.20260518 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev - dependency-name: types-colorama dependency-version: 0.4.15.20260508 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-defusedxml dependency-version: 0.7.0.20260504 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-deprecated dependency-version: 1.3.1.20260520 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-docutils dependency-version: 0.22.3.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-jsonschema dependency-version: 4.26.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-flask-cors dependency-version: 6.0.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-flask-migrate dependency-version: 4.1.0.20260508 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-gevent dependency-version: 26.4.0.20260518 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev - dependency-name: types-greenlet dependency-version: 3.5.0.20260518 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev - dependency-name: types-html5lib dependency-version: 1.1.11.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-markdown dependency-version: 3.10.2.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-oauthlib dependency-version: 3.3.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-objgraph dependency-version: 3.6.0.20260508 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-olefile dependency-version: 0.47.0.20260508 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-openpyxl dependency-version: 3.1.5.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-pexpect dependency-version: 4.9.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-protobuf dependency-version: 7.34.1.20260518 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev - dependency-name: types-psutil dependency-version: 7.2.2.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-psycopg2 dependency-version: 2.9.21.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-pygments dependency-version: 2.20.0.20260518 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev - dependency-name: types-pymysql dependency-version: 1.1.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-python-dateutil dependency-version: 2.9.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-pywin32 dependency-version: 311.0.0.20260521 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-pyyaml dependency-version: 6.0.12.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-regex dependency-version: 2026.5.9.20260518 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev - dependency-name: types-shapely dependency-version: 2.1.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-simplejson dependency-version: 3.20.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-six dependency-version: 1.17.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-tensorflow dependency-version: 2.18.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-tqdm dependency-version: 4.67.3.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: boto3-stubs dependency-version: 1.43.14 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev - dependency-name: types-jmespath dependency-version: 1.1.0.20260508 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: hypothesis dependency-version: 6.153.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev - dependency-name: types-cffi dependency-version: 2.0.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-setuptools dependency-version: 82.0.0.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: scipy-stubs dependency-version: 1.17.1.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: types-python-http-client dependency-version: 3.3.7.20260518 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev - dependency-name: celery-types dependency-version: 0.26.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev - dependency-name: mypy dependency-version: 2.1.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev - dependency-name: pyrefly dependency-version: 1.0.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev ... Signed-off-by: dependabot[bot] <support@github.com>
Dify Backend API
Setup and Run
Important
In the v1.3.0 release,
poetryhas been replaced withuvas the package manager for Dify API backend service.
uv and pnpm are required to run the setup and development commands below.
Using scripts (recommended)
The scripts resolve paths relative to their location, so you can run them from anywhere.
-
Run setup (copies env files and installs dependencies).
./dev/setup -
Review
api/.env,web/.env.local, anddocker/middleware.envvalues (see theSECRET_KEYnote below). -
Start middleware (PostgreSQL/Redis/Weaviate).
./dev/start-docker-compose -
Start backend (runs migrations first).
./dev/start-api -
Start Dify web service.
./dev/start-web -
Set up your application by visiting
http://localhost:3000. -
Start the worker service (async and scheduler tasks, runs from
api)../dev/start-worker -
Optional: start Celery Beat (scheduled tasks).
./dev/start-beat
Environment notes
Important
When the frontend and backend run on different subdomains, set COOKIE_DOMAIN to the site’s top-level domain (e.g.,
example.com). The frontend and backend must be under the same top-level domain in order to share authentication cookies.
-
Generate a
SECRET_KEYin the.envfile.bash for Linux
sed -i "/^SECRET_KEY=/c\\SECRET_KEY=$(openssl rand -base64 42)" .envbash for Mac
secret_key=$(openssl rand -base64 42) sed -i '' "/^SECRET_KEY=/c\\ SECRET_KEY=${secret_key}" .env
Testing
-
Install dependencies for both the backend and the test environment
cd api uv sync --group dev -
Run the tests locally with mocked system environment variables in
tool.pytest_envsection inpyproject.toml, more can check Claude.mdcd api uv run pytest # Run all tests uv run pytest tests/unit_tests/ # Unit tests only uv run pytest tests/integration_tests/ # Integration tests # Code quality ./dev/reformat # Run all formatters and linters uv run ruff check --fix ./ # Fix linting issues uv run ruff format ./ # Format code uv run basedpyright . # Type checking