Skip to content

Commit 445b9d3

Browse files
committed
Initial commit
1 parent 9ff670b commit 445b9d3

File tree

14 files changed

+1056
-0
lines changed

14 files changed

+1056
-0
lines changed

README.md

Whitespace-only changes.

pyproject.toml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
[build-system]
2+
requires = ["setuptools", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "Starlette-Plus"
7+
authors = [{ name = "PythonistaGuild" }]
8+
dynamic = ["dependencies", "version"]
9+
description = "Additional features, utilities and helpers for Starlette."
10+
readme = "README.md"
11+
requires-python = ">=3.11"
12+
classifiers = [
13+
"License :: OSI Approved :: MIT License",
14+
"Intended Audience :: Developers",
15+
"Natural Language :: English",
16+
"Operating System :: OS Independent",
17+
"Programming Language :: Python :: 3.11",
18+
"Programming Language :: Python :: 3.12",
19+
"Topic :: Internet",
20+
"Topic :: Software Development :: Libraries",
21+
"Topic :: Software Development :: Libraries :: Python Modules",
22+
"Topic :: Utilities",
23+
]
24+
25+
[project.urls]
26+
"Homepage" = "https://github.com/PythonistaGuild/StarlettePlus"
27+
28+
[tool.setuptools]
29+
packages = ["starlette_plus", "starlette_plus.types_"]
30+
31+
[tool.setuptools.package-data]
32+
starlette_plus = ["py.typed"]
33+
34+
[tool.setuptools.dynamic]
35+
dependencies = { file = ["requirements.txt"] }
36+
37+
[project.optional-dependencies]
38+
docs = ["mkdocs-material", "mkdocstrings-python", "mkdocstrings"]
39+
dev = ["ruff", "pyright", "isort"]
40+
41+
[tool.ruff]
42+
line-length = 120
43+
indent-width = 4
44+
exclude = ["venv"]
45+
46+
47+
[tool.ruff.lint]
48+
select = [
49+
"C4",
50+
"E",
51+
"F",
52+
"G",
53+
"I",
54+
"PTH",
55+
"RUF",
56+
"SIM",
57+
"TCH",
58+
"UP",
59+
"W",
60+
"PERF",
61+
"ANN",
62+
]
63+
ignore = [
64+
"F402",
65+
"F403",
66+
"F405",
67+
"PERF203",
68+
"RUF001",
69+
"RUF009",
70+
"SIM105",
71+
"UP034",
72+
"UP038",
73+
"ANN101",
74+
"ANN102",
75+
"ANN401",
76+
"UP031",
77+
"PTH123",
78+
"E203",
79+
"E501",
80+
]
81+
82+
[tool.ruff.lint.isort]
83+
split-on-trailing-comma = true
84+
combine-as-imports = true
85+
lines-after-imports = 2
86+
87+
[tool.ruff.lint.flake8-annotations]
88+
allow-star-arg-any = true
89+
90+
[tool.ruff.lint.flake8-quotes]
91+
inline-quotes = "double"
92+
93+
[tool.ruff.format]
94+
quote-style = "double"
95+
indent-style = "space"
96+
skip-magic-trailing-comma = false
97+
line-ending = "auto"
98+
99+
[tool.pyright]
100+
exclude = ["venv"]
101+
useLibraryCodeForTypes = true
102+
typeCheckingMode = "strict"
103+
reportImportCycles = false
104+
reportPrivateUsage = false
105+
pythonVersion = "3.11"

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
starlette>=0.37.2
2+
itsdangerous>=2.1.2
3+
redis>=5.0.3

starlette_plus/__init__.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""Copyright 2024 PythonistaGuild
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
"""
15+
16+
from starlette.requests import Request as Request
17+
from starlette.responses import (
18+
FileResponse as FileResponse,
19+
HTMLResponse as HTMLResponse,
20+
JSONResponse as JSONResponse,
21+
PlainTextResponse as PlainTextResponse,
22+
RedirectResponse as RedirectResponse,
23+
Response as Response,
24+
StreamingResponse as StreamingResponse,
25+
)
26+
27+
from . import middleware as middleware
28+
from .core import *
29+
from .redis import Redis as Redis
30+
from .utils import *

0 commit comments

Comments
 (0)