1
1
[project ]
2
2
authors = [
3
- {
name =
" Cody Fincher" ,
email =
" [email protected] " },
4
- {
name =
" Jacob Coffee" ,
email =
" [email protected] " },
5
- {
name =
" Janek Nouvertné" ,
email =
" [email protected] " },
6
- {
name =
" Na'aman Hirschfeld" ,
email =
" [email protected] " },
7
- {
name =
" Peter Schutt" ,
email =
" [email protected] " },
3
+ {
name =
" Cody Fincher" ,
email =
" [email protected] " },
4
+ {
name =
" Jacob Coffee" ,
email =
" [email protected] " },
5
+ {
name =
" Janek Nouvertné" ,
email =
" [email protected] " },
6
+ {
name =
" Na'aman Hirschfeld" ,
email =
" [email protected] " },
7
+ {
name =
" Peter Schutt" ,
email =
" [email protected] " },
8
8
]
9
9
classifiers = [
10
10
" Development Status :: 5 - Production/Stable" ,
@@ -47,19 +47,18 @@ dependencies = [
47
47
" rich-click" ,
48
48
" multipart>=1.2.0" ,
49
49
# default litestar plugins
50
- " litestar-htmx>=0.4.0"
50
+ " litestar-htmx>=0.4.0" ,
51
51
]
52
52
description = " Litestar - A production-ready, highly performant, extensible ASGI API Framework"
53
53
keywords = [" api" , " rest" , " asgi" , " litestar" , " starlite" ]
54
- license = {text = " MIT" }
54
+ license = { text = " MIT" }
55
55
maintainers = [
56
- {
name =
" Litestar Developers" ,
email =
" [email protected] " },
57
- {
name =
" Cody Fincher" ,
email =
" [email protected] " },
58
- {
name =
" Jacob Coffee" ,
email =
" [email protected] " },
59
- {
name =
" Janek Nouvertné" ,
email =
" [email protected] " },
60
- {
name =
" Peter Schutt" ,
email =
" [email protected] " },
61
- {
name =
" Visakh Unnikrishnan" ,
email =
" [email protected] " },
62
- {
name =
" Alc" ,
email =
" [email protected] " }
56
+ {
name =
" Litestar Developers" ,
email =
" [email protected] " },
57
+ {
name =
" Cody Fincher" ,
email =
" [email protected] " },
58
+ {
name =
" Jacob Coffee" ,
email =
" [email protected] " },
59
+ {
name =
" Janek Nouvertné" ,
email =
" [email protected] " },
60
+ {
name =
" Visakh Unnikrishnan" ,
email =
" [email protected] " },
61
+ {
name =
" Julien Courtes" ,
email =
" [email protected] " },
63
62
]
64
63
name = " litestar"
65
64
readme = " README.md"
@@ -70,14 +69,14 @@ version = "2.15.1"
70
69
Blog = " https://blog.litestar.dev"
71
70
Changelog = " https://github.com/litestar-org/litestar/releases/"
72
71
Discord = " https://discord.gg/litestar"
72
+ Discussions = " https://github.com/litestar-org/litestar/discussions"
73
73
Documentation = " https://docs.litestar.dev/"
74
+ Funding = " https://github.com/sponsors/litestar-org"
74
75
Homepage = " https://litestar.dev/"
75
76
"Issue Tracker" = " https://github.com/litestar-org/litestar/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc"
76
77
Reddit = " https://www.reddit.com/r/LitestarAPI"
77
78
Repository = " https://github.com/litestar-org/litestar"
78
79
Twitter = " https://twitter.com/LitestarAPI"
79
- Funding = " https://github.com/sponsors/litestar-org"
80
- Discussions = " https://github.com/litestar-org/litestar/discussions"
81
80
82
81
[project .optional-dependencies ]
83
82
annotated-types = [" annotated-types" ]
@@ -90,10 +89,7 @@ full = [
90
89
" litestar[annotated-types,attrs,brotli,cli,cryptography,jinja,jwt,mako,minijinja,opentelemetry,piccolo,prometheus,pydantic,redis,sqlalchemy,standard,structlog,valkey]; python_version >= \" 3.13\" " ,
91
90
]
92
91
jinja = [" jinja2>=3.1.2" ]
93
- jwt = [
94
- " cryptography" ,
95
- " pyjwt>=2.9.0" ,
96
- ]
92
+ jwt = [" cryptography" , " pyjwt>=2.9.0" ]
97
93
mako = [" mako>=1.2.4" ]
98
94
minijinja = [" minijinja>=1.0.0" ]
99
95
opentelemetry = [" opentelemetry-instrumentation-asgi" ]
@@ -107,20 +103,23 @@ pydantic = [
107
103
" pydantic-extra-types; python_version >= \" 3.9\" " ,
108
104
]
109
105
redis = [" redis[hiredis]>=4.4.4" ]
110
- valkey = [" valkey[libvalkey]>=6.0.2" ]
111
106
sqlalchemy = [" advanced-alchemy>=0.2.2" ]
112
- standard = [" jinja2" , " jsbeautifier" , " uvicorn[standard]" , " uvloop>=0.18.0; sys_platform != 'win32'" , " fast-query-parsers>=1.0.2" ]
107
+ standard = [
108
+ " jinja2" ,
109
+ " jsbeautifier" ,
110
+ " uvicorn[standard]" ,
111
+ " uvloop>=0.18.0; sys_platform != 'win32'" ,
112
+ " fast-query-parsers>=1.0.2" ,
113
+ ]
113
114
structlog = [" structlog" ]
115
+ valkey = [" valkey[libvalkey]>=6.0.2" ]
114
116
115
117
[project .scripts ]
116
118
litestar = " litestar.__main__:run_cli"
117
119
118
120
119
121
[tool .hatch .build .targets .sdist ]
120
- include = [
121
- ' docs/PYPI_README.md' ,
122
- ' /litestar' ,
123
- ]
122
+ include = [' docs/PYPI_README.md' , ' /litestar' ]
124
123
125
124
126
125
[tool .uv ]
@@ -147,7 +146,7 @@ dev = [
147
146
" hypercorn>=0.16.0" ,
148
147
" daphne>=4.0.0" ,
149
148
" opentelemetry-sdk" ,
150
- " httpx-sse"
149
+ " httpx-sse" ,
151
150
]
152
151
153
152
docs = [
@@ -205,17 +204,13 @@ plugins = ["covdefaults"]
205
204
source = [" litestar" ]
206
205
207
206
[tool .coverage .report ]
208
- exclude_lines = [
209
- ' except ImportError\b' ,
210
- ' if VERSION.startswith("1"):' ,
211
- ' if pydantic.VERSION.startswith("1"):' ,
212
- ]
207
+ exclude_lines = [' except ImportError\b' , ' if VERSION.startswith("1"):' , ' if pydantic.VERSION.startswith("1"):' ]
213
208
fail_under = 50
214
209
215
210
[tool .pytest .ini_options ]
216
211
addopts = " --strict-markers --strict-config --dist=loadgroup -m 'not server_integration'"
217
- asyncio_mode = " auto"
218
212
asyncio_default_fixture_loop_scope = " function"
213
+ asyncio_mode = " auto"
219
214
filterwarnings = [
220
215
" error" ,
221
216
# https://github.com/pytest-dev/pytest-asyncio/issues/724
@@ -230,7 +225,7 @@ filterwarnings = [
230
225
" ignore::DeprecationWarning:litestar.*" ,
231
226
" ignore::pydantic.PydanticDeprecatedSince20::" ,
232
227
" ignore:`general_plain_validator_function`:DeprecationWarning::" ,
233
- " ignore: 'RichMultiCommand':DeprecationWarning::" , # this is coming from rich_click itself, nothing we can do about # that for now
228
+ " ignore: 'RichMultiCommand':DeprecationWarning::" , # this is coming from rich_click itself, nothing we can do about # that for now
234
229
" ignore: Dropping max_length:litestar.exceptions.LitestarWarning:litestar.contrib.piccolo" ,
235
230
" ignore: Python Debugger on exception enabled:litestar.exceptions.LitestarWarning:" ,
236
231
" ignore: datetime.datetime.utcnow:DeprecationWarning:time_machine" ,
@@ -243,8 +238,6 @@ testpaths = ["tests", "docs/examples/testing"]
243
238
xfail_strict = true
244
239
245
240
[tool .mypy ]
246
- packages = [" litestar" , " tests" ]
247
- plugins = [" pydantic.mypy" ]
248
241
enable_error_code = [
249
242
" truthy-bool" ,
250
243
" truthy-iterable" ,
@@ -253,21 +246,23 @@ enable_error_code = [
253
246
" possibly-undefined" ,
254
247
" redundant-self" ,
255
248
]
249
+ packages = [" litestar" , " tests" ]
250
+ plugins = [" pydantic.mypy" ]
256
251
python_version = " 3.8"
257
252
258
253
disallow_any_generics = false
254
+ local_partial_types = true
259
255
show_error_codes = true
260
256
strict = true
261
257
warn_unreachable = true
262
- local_partial_types = true
263
258
264
259
[[tool .mypy .overrides ]]
265
260
ignore_errors = true
266
261
module = [" tests.examples.*" , " tests.docker_service_fixtures" ]
267
262
268
263
[[tool .mypy .overrides ]]
269
- module = [" tests.*" ]
270
264
disable_error_code = [" truthy-bool" ]
265
+ module = [" tests.*" ]
271
266
272
267
[[tool .mypy .overrides ]]
273
268
disable_error_code = [" assignment" ]
@@ -282,12 +277,12 @@ module = ["tests.unit.test_contrib.test_repository"]
282
277
strict_equality = false
283
278
284
279
[[tool .mypy .overrides ]]
285
- module = [" tests.unit.test_plugins.test_pydantic.test_openapi" ," litestar._asgi.routing_trie.traversal" ]
286
280
disable_error_code = " index, union-attr"
281
+ module = [" tests.unit.test_plugins.test_pydantic.test_openapi" , " litestar._asgi.routing_trie.traversal" ]
287
282
288
283
[[tool .mypy .overrides ]]
289
- module = [" tests.unit.test_channels.test_subscriber" , " tests.unit.test_response.test_streaming_response" ]
290
284
disable_error_code = " arg-type, comparison-overlap, unreachable"
285
+ module = [" tests.unit.test_channels.test_subscriber" , " tests.unit.test_response.test_streaming_response" ]
291
286
292
287
[[tool .mypy .overrides ]]
293
288
ignore_missing_imports = true
@@ -303,7 +298,6 @@ module = [
303
298
]
304
299
305
300
[[tool .mypy .overrides ]]
306
- warn_unused_ignores = false
307
301
module = [
308
302
" litestar.contrib.sqlalchemy.*" ,
309
303
" litestar.plugins.pydantic.*" ,
@@ -313,17 +307,14 @@ module = [
313
307
" litestar.openapi.spec.base" ,
314
308
" litestar.utils.helpers" ,
315
309
" litestar.channels.plugin" ,
316
- " litestar.handlers.http_handlers._utils"
310
+ " litestar.handlers.http_handlers._utils" ,
317
311
]
312
+ warn_unused_ignores = false
318
313
319
314
[[tool .mypy .overrides ]]
320
- warn_unused_ignores = false
321
- module = [
322
- " litestar.openapi.spec.base" ,
323
- " litestar._asgi.routin_trie.traversal" ,
324
- " litestar.plugins.pydantic.plugins.int" ,
325
- ]
326
315
disable_error_code = " arg-type"
316
+ module = [" litestar.openapi.spec.base" , " litestar._asgi.routin_trie.traversal" , " litestar.plugins.pydantic.plugins.int" ]
317
+ warn_unused_ignores = false
327
318
328
319
[tool .pydantic-mypy ]
329
320
init_forbid_extra = true
@@ -350,7 +341,6 @@ pythonVersion = "3.8"
350
341
reportUnnecessaryTypeIgnoreComments = true
351
342
352
343
[tool .slotscheck ]
353
- strict-imports = false
354
344
exclude-classes = """
355
345
(
356
346
# github.com/python/cpython/pull/106771
@@ -370,70 +360,68 @@ exclude-classes = """
370
360
|(^litestar.utils.sync:AsyncIteratorWrapper)
371
361
)
372
362
"""
363
+ strict-imports = false
373
364
374
365
[tool .ruff ]
375
- include = [
376
- " {litestar,tests,docs,test_apps,tools}/**/*.{py,pyi}" ,
377
- " pyproject.toml"
378
- ]
366
+ include = [" {litestar,tests,docs,test_apps,tools}/**/*.{py,pyi}" , " pyproject.toml" ]
379
367
380
368
lint.select = [
381
- " A" , # flake8-builtins
382
- " B" , # flake8-bugbear
369
+ " A" , # flake8-builtins
370
+ " B" , # flake8-bugbear
383
371
" BLE" , # flake8-blind-except
384
- " C4" , # flake8-comprehensions
372
+ " C4" , # flake8-comprehensions
385
373
" C90" , # mccabe
386
- " D" , # pydocstyle
387
- " DJ" , # flake8-django
374
+ " D" , # pydocstyle
375
+ " DJ" , # flake8-django
388
376
" DTZ" , # flake8-datetimez
389
- " E" , # pycodestyle errors
377
+ " E" , # pycodestyle errors
390
378
" ERA" , # eradicate
391
379
" EXE" , # flake8-executable
392
- " F" , # pyflakes
393
- " G" , # flake8-logging-format
394
- " I" , # isort
380
+ " F" , # pyflakes
381
+ " G" , # flake8-logging-format
382
+ " I" , # isort
395
383
" ICN" , # flake8-import-conventions
396
384
" ISC" , # flake8-implicit-str-concat
397
- " N" , # pep8-naming
385
+ " N" , # pep8-naming
398
386
" PIE" , # flake8-pie
399
387
" PLC" , # pylint - convention
400
388
" PLE" , # pylint - error
401
389
" PLW" , # pylint - warning
402
390
" PTH" , # flake8-use-pathlib
403
- " Q" , # flake8-quotes
391
+ " Q" , # flake8-quotes
404
392
" RET" , # flake8-return
405
393
" RUF" , # Ruff-specific rules
406
- " S" , # flake8-bandit
394
+ " S" , # flake8-bandit
407
395
" SIM" , # flake8-simplify
408
396
" T10" , # flake8-debugger
409
397
" T20" , # flake8-print
410
- " TC" , # flake8-type-checking
398
+ " TC" , # flake8-type-checking
411
399
" TID" , # flake8-tidy-imports
412
- " UP" , # pyupgrade
413
- " W" , # pycodestyle - warning
400
+ " UP" , # pyupgrade
401
+ " W" , # pycodestyle - warning
414
402
" YTT" , # flake8-2020
415
403
]
416
404
417
405
line-length = 120
418
406
lint.ignore = [
419
- " A003" , # flake8-builtins - class attribute {name} is shadowing a python builtin
420
- " B010" , # flake8-bugbear - do not call setattr with a constant attribute value
421
- " D100" , # pydocstyle - missing docstring in public module
422
- " D101" , # pydocstyle - missing docstring in public class
423
- " D102" , # pydocstyle - missing docstring in public method
424
- " D103" , # pydocstyle - missing docstring in public function
425
- " D104" , # pydocstyle - missing docstring in public package
426
- " D105" , # pydocstyle - missing docstring in magic method
427
- " D106" , # pydocstyle - missing docstring in public nested class
428
- " D107" , # pydocstyle - missing docstring in __init__
429
- " D202" , # pydocstyle - no blank lines allowed after function docstring
430
- " D205" , # pydocstyle - 1 blank line required between summary line and description
431
- " D415" , # pydocstyle - first line should end with a period, question mark, or exclamation point
432
- " E501" , # pycodestyle line too long, handled by ruff format
407
+ " A003" , # flake8-builtins - class attribute {name} is shadowing a python builtin
408
+ " B010" , # flake8-bugbear - do not call setattr with a constant attribute value
409
+ " D100" , # pydocstyle - missing docstring in public module
410
+ " D101" , # pydocstyle - missing docstring in public class
411
+ " D102" , # pydocstyle - missing docstring in public method
412
+ " D103" , # pydocstyle - missing docstring in public function
413
+ " D104" , # pydocstyle - missing docstring in public package
414
+ " D105" , # pydocstyle - missing docstring in magic method
415
+ " D106" , # pydocstyle - missing docstring in public nested class
416
+ " D107" , # pydocstyle - missing docstring in __init__
417
+ " D202" , # pydocstyle - no blank lines allowed after function docstring
418
+ " D205" , # pydocstyle - 1 blank line required between summary line and description
419
+ " D415" , # pydocstyle - first line should end with a period, question mark, or exclamation point
420
+ " E501" , # pycodestyle line too long, handled by ruff format
433
421
" PLW2901" , # pylint - for loop variable overwritten by assignment target
434
- " RUF012" , # Ruff-specific rule - annotated with classvar
435
- " ISC001" , # Ruff formatter incompatible
436
- " CPY001" , # ruff - copyright notice at the top of the file
422
+ " RUF012" , # Ruff-specific rule - annotated with classvar
423
+ " ISC001" , # Ruff formatter incompatible
424
+ " CPY001" , # ruff - copyright notice at the top of the file
437
425
]
438
426
src = [" litestar" , " tests" , " docs/examples" ]
439
427
target-version = " py38"
@@ -462,8 +450,8 @@ known-first-party = ["litestar", "tests", "examples"]
462
450
"docs/examples/**" = [" T201" ]
463
451
"docs/examples/application_hooks/before_send_hook.py" = [" UP006" ]
464
452
"docs/examples/contrib/sqlalchemy/plugins/**/*.*" = [" UP006" ]
465
- "docs/examples/data_transfer_objects**/*.*" = [" UP006" ]
466
453
"docs/examples/contrib/sqlalchemy/sqlalchemy_declarative_models.py" = [" UP006" ]
454
+ "docs/examples/data_transfer_objects**/*.*" = [" UP006" ]
467
455
"litestar/_openapi/schema_generation/schema.py" = [" C901" ]
468
456
"litestar/exceptions/*.*" = [" N818" ]
469
457
"litestar/handlers/**/*.*" = [" N801" ]
@@ -496,9 +484,9 @@ known-first-party = ["litestar", "tests", "examples"]
496
484
" E721" ,
497
485
]
498
486
"tests/unit/test_contrib/test_sqlalchemy/**/*.*" = [" UP006" ]
487
+ "tests/unit/test_openapi/test_typescript_converter/test_converter.py" = [" W293" ]
499
488
"tools/**/*.*" = [" D" , " ARG" , " EM" , " TRY" , " G" , " FBT" ]
500
489
"tools/prepare_release.py" = [" S603" , " S607" ]
501
- "tests/unit/test_openapi/test_typescript_converter/test_converter.py" = [" W293" ]
502
490
503
491
[tool .ruff .format ]
504
492
docstring-code-format = true
0 commit comments