pyproject.toml 5.2 KB

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