Updates the requirements on [weaviate-client](https://github.com/weaviate/weaviate-python-client), [alibabacloud-gpdb20160503](https://github.com/aliyun/alibabacloud-python-sdk), [chromadb](https://github.com/chroma-core/chroma), [clickhouse-connect](https://github.com/ClickHouse/clickhouse-connect), [couchbase](https://github.com/couchbase/couchbase-python-client), [elasticsearch](https://github.com/elastic/elasticsearch-py), [opensearch-py](https://github.com/opensearch-project/opensearch-py), [oracledb](https://github.com/oracle/python-oracledb), [pgvecto-rs[sqlalchemy]](https://github.com/tensorchord/pgvecto.rs), [pymilvus](https://github.com/milvus-io/pymilvus), [pymochow](http://bce.baidu.com), [pyobvector](https://github.com/oceanbase/pyobvector), [qdrant-client](https://github.com/qdrant/qdrant-client), [intersystems-irispython](https://www.intersystems.com/), [tablestore](https://github.com/aliyun/aliyun-tablestore-python-sdk), tcvectordb, [xinference-client](https://github.com/xorbitsai/inference-client) and [mysql-connector-python](https://github.com/mysql/mysql-connector-python) to permit the latest version. Updates `weaviate-client` from 4.20.5 to 4.21.0 - [Release notes](https://github.com/weaviate/weaviate-python-client/releases) - [Changelog](https://github.com/weaviate/weaviate-python-client/blob/main/docs/changelog.rst) - [Commits](https://github.com/weaviate/weaviate-python-client/compare/v4.20.5...v4.21.0) Updates `alibabacloud-gpdb20160503` from 5.1.0 to 5.3.0 - [Changelog](https://github.com/aliyun/alibabacloud-python-sdk/blob/master/docmind-api-20220711/ChangeLog.md) - [Commits](https://github.com/aliyun/alibabacloud-python-sdk/commits) Updates `chromadb` from 0.5.20 to 1.5.9 - [Release notes](https://github.com/chroma-core/chroma/releases) - [Changelog](https://github.com/chroma-core/chroma/blob/main/RELEASE_PROCESS.md) - [Commits](https://github.com/chroma-core/chroma/compare/0.5.20...1.5.9) Updates `clickhouse-connect` from 0.14.1 to 1.0.1 - [Release notes](https://github.com/ClickHouse/clickhouse-connect/releases) - [Changelog](https://github.com/ClickHouse/clickhouse-connect/blob/main/CHANGELOG.md) - [Commits](https://github.com/ClickHouse/clickhouse-connect/compare/v0.14.1...v1.0.1) Updates `couchbase` from 4.5.0 to 4.6.1 - [Commits](https://github.com/couchbase/couchbase-python-client/compare/4.5.0...4.6.1) Updates `elasticsearch` from 8.14.0 to 9.4.0 - [Release notes](https://github.com/elastic/elasticsearch-py/releases) - [Commits](https://github.com/elastic/elasticsearch-py/compare/v8.14.0...v9.4.0) Updates `opensearch-py` from 3.1.0 to 3.2.0 - [Release notes](https://github.com/opensearch-project/opensearch-py/releases) - [Changelog](https://github.com/opensearch-project/opensearch-py/blob/main/CHANGELOG.md) - [Commits](https://github.com/opensearch-project/opensearch-py/compare/v3.1.0...v3.2.0) Updates `oracledb` from 3.4.2 to 4.0.1 - [Release notes](https://github.com/oracle/python-oracledb/releases) - [Commits](https://github.com/oracle/python-oracledb/compare/v3.4.2...v4.0.1) Updates `pgvecto-rs[sqlalchemy]` to 0.2.2 - [Release notes](https://github.com/tensorchord/pgvecto.rs/releases) - [Commits](https://github.com/tensorchord/pgvecto.rs/commits) Updates `pymilvus` from 2.6.10 to 3.0.0 - [Release notes](https://github.com/milvus-io/pymilvus/releases) - [Commits](https://github.com/milvus-io/pymilvus/compare/v2.6.10...v3.0.0) Updates `pymochow` from 2.3.6 to 2.4.1 Updates `pyobvector` from 0.2.25 to 0.2.26 - [Release notes](https://github.com/oceanbase/pyobvector/releases) - [Changelog](https://github.com/oceanbase/pyobvector/blob/main/RELEASE_NOTES.md) - [Commits](https://github.com/oceanbase/pyobvector/compare/release-v0.2.25...release-v0.2.26) Updates `qdrant-client` from 1.9.0 to 1.18.0 - [Release notes](https://github.com/qdrant/qdrant-client/releases) - [Commits](https://github.com/qdrant/qdrant-client/compare/v1.9.0...v1.18.0) Updates `intersystems-irispython` from 5.3.1 to 5.3.2 Updates `tablestore` from 6.4.1 to 6.4.6 - [Release notes](https://github.com/aliyun/aliyun-tablestore-python-sdk/releases) - [Changelog](https://github.com/aliyun/aliyun-tablestore-python-sdk/blob/master/CHANGELOG.md) - [Commits](https://github.com/aliyun/aliyun-tablestore-python-sdk/commits) Updates `tcvectordb` from 2.0.0 to 2.1.1 Updates `xinference-client` from 2.3.1 to 2.9.0 - [Release notes](https://github.com/xorbitsai/inference-client/releases) - [Commits](https://github.com/xorbitsai/inference-client/compare/v2.3.1...v2.9.0) Updates `mysql-connector-python` from 9.6.0 to 9.7.0 - [Changelog](https://github.com/mysql/mysql-connector-python/blob/trunk/CHANGES.txt) - [Commits](https://github.com/mysql/mysql-connector-python/compare/9.6.0...9.7.0) --- updated-dependencies: - dependency-name: weaviate-client dependency-version: 4.21.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: vdb - dependency-name: alibabacloud-gpdb20160503 dependency-version: 5.3.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: vdb - dependency-name: chromadb dependency-version: 1.5.9 dependency-type: direct:development update-type: version-update:semver-major dependency-group: vdb - dependency-name: clickhouse-connect dependency-version: 1.0.1 dependency-type: direct:development update-type: version-update:semver-major dependency-group: vdb - dependency-name: couchbase dependency-version: 4.6.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: vdb - dependency-name: elasticsearch dependency-version: 9.4.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: vdb - dependency-name: opensearch-py dependency-version: 3.2.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: vdb - dependency-name: oracledb dependency-version: 4.0.1 dependency-type: direct:development update-type: version-update:semver-major dependency-group: vdb - dependency-name: pgvecto-rs[sqlalchemy] dependency-version: 0.2.2 dependency-type: direct:development dependency-group: vdb - dependency-name: pymilvus dependency-version: 3.0.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: vdb - dependency-name: pymochow dependency-version: 2.4.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: vdb - dependency-name: pyobvector dependency-version: 0.2.26 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: vdb - dependency-name: qdrant-client dependency-version: 1.18.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: vdb - dependency-name: intersystems-irispython dependency-version: 5.3.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: vdb - dependency-name: tablestore dependency-version: 6.4.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: vdb - dependency-name: tcvectordb dependency-version: 2.1.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: vdb - dependency-name: xinference-client dependency-version: 2.9.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: vdb - dependency-name: mysql-connector-python dependency-version: 9.7.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: vdb ... 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