pyproject.toml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. [project]
  2. requires-python = ">=3.10"
  3. [tool.ruff]
  4. exclude = [
  5. ]
  6. line-length = 120
  7. [tool.ruff.lint]
  8. preview = true
  9. select = [
  10. "B", # flake8-bugbear rules
  11. "F", # pyflakes rules
  12. "I", # isort rules
  13. "UP", # pyupgrade rules
  14. "E101", # mixed-spaces-and-tabs
  15. "E111", # indentation-with-invalid-multiple
  16. "E112", # no-indented-block
  17. "E113", # unexpected-indentation
  18. "E115", # no-indented-block-comment
  19. "E116", # unexpected-indentation-comment
  20. "E117", # over-indented
  21. "RUF019", # unnecessary-key-check
  22. "RUF100", # unused-noqa
  23. "RUF101", # redirected-noqa
  24. "S506", # unsafe-yaml-load
  25. "W191", # tab-indentation
  26. "W605", # invalid-escape-sequence
  27. ]
  28. ignore = [
  29. "F403", # undefined-local-with-import-star
  30. "F405", # undefined-local-with-import-star-usage
  31. "F821", # undefined-name
  32. "F841", # unused-variable
  33. "UP007", # non-pep604-annotation
  34. "UP032", # f-string
  35. "B005", # strip-with-multi-characters
  36. "B006", # mutable-argument-default
  37. "B007", # unused-loop-control-variable
  38. "B026", # star-arg-unpacking-after-keyword-arg
  39. "B901", # return-in-generator
  40. "B904", # raise-without-from-inside-except
  41. "B905", # zip-without-explicit-strict
  42. ]
  43. [tool.ruff.lint.per-file-ignores]
  44. "app.py" = [
  45. "F401", # unused-import
  46. "F811", # redefined-while-unused
  47. ]
  48. "__init__.py" = [
  49. "F401", # unused-import
  50. "F811", # redefined-while-unused
  51. ]
  52. "tests/*" = [
  53. "F401", # unused-import
  54. "F811", # redefined-while-unused
  55. ]
  56. [tool.pytest_env]
  57. OPENAI_API_KEY = "sk-IamNotARealKeyJustForMockTestKawaiiiiiiiiii"
  58. AZURE_OPENAI_API_BASE = "https://difyai-openai.openai.azure.com"
  59. AZURE_OPENAI_API_KEY = "xxxxb1707exxxxxxxxxxaaxxxxxf94"
  60. ANTHROPIC_API_KEY = "sk-ant-api11-IamNotARealKeyJustForMockTestKawaiiiiiiiiii-NotBaka-ASkksz"
  61. CHATGLM_API_BASE = "http://a.abc.com:11451"
  62. XINFERENCE_SERVER_URL = "http://a.abc.com:11451"
  63. XINFERENCE_GENERATION_MODEL_UID = "generate"
  64. XINFERENCE_CHAT_MODEL_UID = "chat"
  65. XINFERENCE_EMBEDDINGS_MODEL_UID = "embedding"
  66. XINFERENCE_RERANK_MODEL_UID = "rerank"
  67. GOOGLE_API_KEY = "abcdefghijklmnopqrstuvwxyz"
  68. HUGGINGFACE_API_KEY = "hf-awuwuwuwuwuwuwuwuwuwuwuwuwuwuwuwuwu"
  69. HUGGINGFACE_TEXT_GEN_ENDPOINT_URL = "a"
  70. HUGGINGFACE_TEXT2TEXT_GEN_ENDPOINT_URL = "b"
  71. HUGGINGFACE_EMBEDDINGS_ENDPOINT_URL = "c"
  72. MOCK_SWITCH = "true"
  73. CODE_MAX_STRING_LENGTH = "80000"
  74. CODE_EXECUTION_ENDPOINT="http://127.0.0.1:8194"
  75. CODE_EXECUTION_API_KEY="dify-sandbox"
  76. FIRECRAWL_API_KEY = "fc-"
  77. [tool.poetry]
  78. name = "dify-api"
  79. version = "0.6.11"
  80. description = ""
  81. authors = ["Dify <hello@dify.ai>"]
  82. readme = "README.md"
  83. package-mode = false
  84. [tool.poetry.dependencies]
  85. python = "^3.10"
  86. beautifulsoup4 = "4.12.2"
  87. flask = "~3.0.1"
  88. flask-sqlalchemy = "~3.0.5"
  89. sqlalchemy = "~2.0.29"
  90. flask-compress = "~1.14"
  91. flask-login = "~0.6.3"
  92. flask-migrate = "~4.0.5"
  93. flask-restful = "~0.3.10"
  94. flask-cors = "~4.0.0"
  95. gunicorn = "~22.0.0"
  96. gevent = "~23.9.1"
  97. openai = "~1.29.0"
  98. tiktoken = "~0.7.0"
  99. psycopg2-binary = "~2.9.6"
  100. pycryptodome = "3.19.1"
  101. python-dotenv = "1.0.0"
  102. authlib = "1.3.1"
  103. boto3 = "1.28.17"
  104. cachetools = "~5.3.0"
  105. weaviate-client = "~3.21.0"
  106. mailchimp-transactional = "~1.0.50"
  107. scikit-learn = "1.2.2"
  108. sentry-sdk = {version = "~1.39.2", extras = ["flask"]}
  109. sympy = "1.12"
  110. jieba = "0.42.1"
  111. celery = "~5.3.6"
  112. redis = {version = "~5.0.3", extras = ["hiredis"]}
  113. chardet = "~5.1.0"
  114. python-docx = "~1.1.0"
  115. pypdfium2 = "~4.17.0"
  116. resend = "~0.7.0"
  117. pyjwt = "~2.8.0"
  118. anthropic = "~0.23.1"
  119. newspaper3k = "0.2.8"
  120. wikipedia = "1.4.0"
  121. readabilipy = "0.2.0"
  122. google-ai-generativelanguage = "0.6.1"
  123. google-api-core = "2.18.0"
  124. google-api-python-client = "2.90.0"
  125. google-auth = "2.29.0"
  126. google-auth-httplib2 = "0.2.0"
  127. google-generativeai = "0.5.0"
  128. googleapis-common-protos = "1.63.0"
  129. google-cloud-storage = "2.16.0"
  130. replicate = "~0.22.0"
  131. websocket-client = "~1.7.0"
  132. dashscope = {version = "~1.17.0", extras = ["tokenizer"]}
  133. huggingface-hub = "~0.16.4"
  134. transformers = "~4.35.0"
  135. tokenizers = "~0.15.0"
  136. pandas = { version = "~2.2.2", extras = ["performance", "excel"] }
  137. xinference-client = "0.9.4"
  138. safetensors = "~0.4.3"
  139. zhipuai = "1.0.7"
  140. werkzeug = "~3.0.1"
  141. pymilvus = "2.3.1"
  142. qdrant-client = "1.7.3"
  143. cohere = "~5.2.4"
  144. pyyaml = "~6.0.1"
  145. numpy = "~1.26.4"
  146. unstructured = {version = "~0.10.27", extras = ["docx", "epub", "md", "msg", "ppt", "pptx"]}
  147. bs4 = "~0.0.1"
  148. markdown = "~3.5.1"
  149. httpx = {version = "~0.24.1", extras = ["socks"]}
  150. matplotlib = "~3.8.2"
  151. yfinance = "~0.2.40"
  152. pydub = "~0.25.1"
  153. gmpy2 = "~2.1.5"
  154. numexpr = "~2.9.0"
  155. duckduckgo-search = "~6.1.5"
  156. arxiv = "2.1.0"
  157. yarl = "~1.9.4"
  158. twilio = "~9.0.4"
  159. qrcode = "~7.4.2"
  160. azure-storage-blob = "12.13.0"
  161. azure-identity = "1.16.1"
  162. lxml = "5.1.0"
  163. xlrd = "~2.0.1"
  164. pydantic = "~2.7.4"
  165. pydantic_extra_types = "~2.8.1"
  166. pgvecto-rs = "0.1.4"
  167. firecrawl-py = "0.0.5"
  168. oss2 = "2.18.5"
  169. pgvector = "0.2.5"
  170. pymysql = "1.1.1"
  171. tidb-vector = "0.0.9"
  172. google-cloud-aiplatform = "1.49.0"
  173. vanna = {version = "0.5.5", extras = ["postgres", "mysql", "clickhouse", "duckdb"]}
  174. kaleido = "0.2.1"
  175. tencentcloud-sdk-python-hunyuan = "~3.0.1158"
  176. tcvectordb = "1.3.2"
  177. chromadb = "~0.5.0"
  178. [tool.poetry.group.dev]
  179. optional = true
  180. [tool.poetry.group.dev.dependencies]
  181. coverage = "~7.2.4"
  182. pytest = "~8.1.1"
  183. pytest-benchmark = "~4.0.0"
  184. pytest-env = "~1.1.3"
  185. pytest-mock = "~3.14.0"
  186. [tool.poetry.group.lint]
  187. optional = true
  188. [tool.poetry.group.lint.dependencies]
  189. ruff = "~0.4.8"
  190. dotenv-linter = "~0.5.0"