pyproject.toml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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. [tool.poetry.dependencies]
  82. python = "^3.10"
  83. beautifulsoup4 = "^4.12.2"
  84. flask = "^3.0.1"
  85. flask-sqlalchemy = "^3.0.5"
  86. sqlalchemy = "^2.0.29"
  87. flask-compress = "^1.14"
  88. flask-login = "^0.6.3"
  89. flask-migrate = "^4.0.5"
  90. flask-restful = "^0.3.10"
  91. flask-cors = "^4.0.0"
  92. gunicorn = "^22.0.0"
  93. gevent = "^23.9.1"
  94. openai = "^1.29.0"
  95. tiktoken = "^0.7.0"
  96. psycopg2-binary = "^2.9.6"
  97. pycryptodome = "3.19.1"
  98. python-dotenv = "1.0.0"
  99. authlib = "1.2.0"
  100. boto3 = "^1.28.17"
  101. tenacity = "^8.2.2"
  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. openpyxl = "3.1.2"
  112. chardet = "^5.1.0"
  113. python-docx = "^1.1.0"
  114. pypdfium2 = "^4.17.0"
  115. resend = "^0.7.0"
  116. pyjwt = "^2.8.0"
  117. anthropic = "^0.23.1"
  118. newspaper3k = "0.2.8"
  119. wikipedia = "1.4.0"
  120. readabilipy = "0.2.0"
  121. google-ai-generativelanguage = "0.6.1"
  122. google-api-core = "^2.18.0"
  123. google-api-python-client = "^2.90.0"
  124. google-auth = "^2.29.0"
  125. google-auth-httplib2 = "0.2.0"
  126. google-generativeai = "0.5.0"
  127. google-search-results = "2.4.2"
  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 = "1.5.3"
  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.35"
  152. pydub = "^0.25.1"
  153. gmpy2 = "^2.1.5"
  154. numexpr = "^2.9.0"
  155. duckduckgo-search = "5.2.2"
  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.9.0"
  161. azure-identity = "1.15.0"
  162. lxml = "5.1.0"
  163. xlrd = "^2.0.1"
  164. pydantic = "^1.10.0"
  165. pgvecto-rs = "0.1.4"
  166. firecrawl-py = "0.0.5"
  167. oss2 = "2.15.0"
  168. pgvector = "0.2.5"
  169. pymysql = "^1.1.1"
  170. tidb-vector = "^0.0.9"
  171. google-cloud-aiplatform = "1.49.0"
  172. vanna = {version = "==0.5.5", extras = ["postgres", "mysql", "clickhouse", "duckdb"]}
  173. kaleido = "0.2.1"
  174. [tool.poetry.group.dev.dependencies]
  175. coverage = "^7.2.4"
  176. pytest = "^8.1.1"
  177. pytest-benchmark = "^4.0.0"
  178. pytest-env = "^1.1.3"
  179. pytest-mock = "^3.14.0"