-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathpyproject.toml
More file actions
156 lines (144 loc) · 4.47 KB
/
Copy pathpyproject.toml
File metadata and controls
156 lines (144 loc) · 4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
[build-system]
requires = ["uv_build>=0.11,<0.12"]
build-backend = "uv_build"
[project]
name = "fastadmin"
version = "0.10.0"
description = "FastAdmin is an easy-to-use Admin Dashboard App for FastAPI/Flask/Django inspired by Django Admin."
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
license-files = ["LICENSE.md"]
authors = [{ name = "Seva D", email = "vsdudakov@gmail.com" }]
keywords = [
"admin",
"dashboard",
"fastapi",
"flask",
"django",
"tortoise-orm",
"sqlalchemy",
"pony",
"yara-orm",
"admin-dashboard",
"django-admin",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Framework :: FastAPI",
"Framework :: Django",
"Framework :: Flask",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Documentation",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Widget Sets",
"Typing :: Typed",
]
dependencies = ["pyjwt>=2.6", "asgiref>=3.11"]
urls = { Homepage = "https://vsdudakov.github.io/fastadmin/", Repository = "https://github.com/vsdudakov/fastadmin", Documentation = "https://vsdudakov.github.io/fastadmin/", Issues = "https://github.com/vsdudakov/fastadmin/issues" }
[project.optional-dependencies]
fastapi = ["fastapi>=0.100,<1", "python-multipart>=0.0.5,<1"]
flask = ["flask>=3,<4"]
django = ["django>=6,<7"]
tortoise-orm = ["tortoise-orm>=1,<2"]
sqlalchemy = ["sqlalchemy[asyncio]>=2,<3", "greenlet>=3"]
pony = ["pony>=0.7,<1"]
yara-orm = ["yara-orm>=1,<2"]
[dependency-groups]
dev = [
"uvicorn>=0.34",
"pytest>=8.3",
"pytest-cov>=6.1",
"pytest-mock>=3.12",
"pytest-asyncio>=0.26",
"pytest-xdist>=3.6",
"httpx>=0.28",
"aioshutil>=1.2",
"bcrypt>=4.0",
"ruff>=0.11",
"ty>=0.0.1a1",
"typing-extensions>=4.15",
"yara-orm>=1,<2",
]
docs = ["mkdocs-material[imaging]>=9.5"]
[tool.uv.build-backend]
# Flat layout: the import package lives at ./fastadmin (not src/fastadmin).
module-root = ""
[tool.pytest.ini_options]
asyncio_mode = "auto"
filterwarnings = [
"ignore::pytest.PytestCollectionWarning",
"ignore::DeprecationWarning",
"ignore::RuntimeWarning",
]
[tool.coverage.run]
source = ["fastadmin"]
[tool.coverage.report]
show_missing = true
fail_under = 100
[tool.ruff]
target-version = "py312"
line-length = 120
src = ["."]
lint.select = [
"F", # pyflakes
"E", # pycodestyle
"W", # pycodestyle
"I", # isort
"UP", # pyupgrade
"YTT", # flake8-2020
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A001", # flake8-builtins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PT", # flake8-pytest-style
"RET501", # flake8-return
"RET502", # flake8-return
"SIM", # flake8-simplify
"PTH", # flake8-use-pathlib
"PGH", # pygrep-hooks
"PLC", # pylint
"PLE", # pylint
"RUF", # ruff-specific
]
lint.fixable = [
"F401", # unused imports
"I001", # unsorted imports
]
lint.ignore = [
"E501", # the formatter handles line length
"F405", # defined from star import
"S101", # impossible logic branches are denoted with 'assert'
"S104", # bind to all interfaces is OK in Docker
"S105",
"S106",
"B008", # function call (e.g. `Depends`) in argument defaults
"SIM108", # use ternary operator ... instead of if-else-block
"PLC0415", # imports inside functions are intentional (optional ORM/framework deps)
"UP042", # keep `str, Enum` bases: StrEnum changes str() behavior in API responses
]
[tool.ruff.lint.isort]
known-first-party = ["fastadmin", "tests"]
[tool.ty.environment]
python-version = "3.12"
[tool.ty.rules]
# The admin base classes are ORM-agnostic and work with `Any`-typed model
# objects, so dynamic attribute access is pervasive by design. These two rules
# mirror the error codes the previous mypy setup disabled.
unresolved-attribute = "ignore"
invalid-assignment = "ignore"
[tool.basedpyright]
typeCheckingMode = "off"