alphaapi 0.2.0b0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- alphaapi-0.2.0b0/.github/workflows/ci.yml +69 -0
- alphaapi-0.2.0b0/.github/workflows/docs.yml +43 -0
- alphaapi-0.2.0b0/.github/workflows/release.yml +24 -0
- alphaapi-0.2.0b0/.gitignore +14 -0
- alphaapi-0.2.0b0/Cargo.lock +598 -0
- alphaapi-0.2.0b0/Cargo.toml +35 -0
- alphaapi-0.2.0b0/LICENSE +21 -0
- alphaapi-0.2.0b0/PKG-INFO +663 -0
- alphaapi-0.2.0b0/README.md +629 -0
- alphaapi-0.2.0b0/benchmarks/bench.py +233 -0
- alphaapi-0.2.0b0/benchmarks/loadgen.rs +124 -0
- alphaapi-0.2.0b0/benchmarks/server_alpha.py +36 -0
- alphaapi-0.2.0b0/benchmarks/server_fastapi.py +34 -0
- alphaapi-0.2.0b0/docs/api/application.md +48 -0
- alphaapi-0.2.0b0/docs/api/apps.md +41 -0
- alphaapi-0.2.0b0/docs/api/binding.md +173 -0
- alphaapi-0.2.0b0/docs/api/cli.md +88 -0
- alphaapi-0.2.0b0/docs/api/core.md +49 -0
- alphaapi-0.2.0b0/docs/api/exceptions.md +42 -0
- alphaapi-0.2.0b0/docs/api/index.md +99 -0
- alphaapi-0.2.0b0/docs/api/middleware.md +47 -0
- alphaapi-0.2.0b0/docs/api/observability.md +109 -0
- alphaapi-0.2.0b0/docs/api/openapi.md +69 -0
- alphaapi-0.2.0b0/docs/api/requests.md +108 -0
- alphaapi-0.2.0b0/docs/api/responses.md +104 -0
- alphaapi-0.2.0b0/docs/api/routing.md +90 -0
- alphaapi-0.2.0b0/docs/api/security.md +166 -0
- alphaapi-0.2.0b0/docs/api/sessions.md +140 -0
- alphaapi-0.2.0b0/docs/api/settings.md +157 -0
- alphaapi-0.2.0b0/docs/api/static-files.md +61 -0
- alphaapi-0.2.0b0/docs/api/streaming.md +99 -0
- alphaapi-0.2.0b0/docs/api/templates.md +66 -0
- alphaapi-0.2.0b0/docs/api/testing.md +76 -0
- alphaapi-0.2.0b0/docs/api/views.md +54 -0
- alphaapi-0.2.0b0/docs/getting-started.md +276 -0
- alphaapi-0.2.0b0/docs/index.md +127 -0
- alphaapi-0.2.0b0/docs/stylesheets/extra.css +22 -0
- alphaapi-0.2.0b0/docs/tutorials/blog.md +322 -0
- alphaapi-0.2.0b0/docs/tutorials/deployment.md +337 -0
- alphaapi-0.2.0b0/docs/tutorials/index.md +44 -0
- alphaapi-0.2.0b0/docs/tutorials/task-api.md +367 -0
- alphaapi-0.2.0b0/examples/__init__.py +1 -0
- alphaapi-0.2.0b0/examples/basic.py +108 -0
- alphaapi-0.2.0b0/examples/manage.py +15 -0
- alphaapi-0.2.0b0/examples/project/__init__.py +1 -0
- alphaapi-0.2.0b0/examples/project/app.py +6 -0
- alphaapi-0.2.0b0/examples/project/middleware.py +16 -0
- alphaapi-0.2.0b0/examples/project/settings.py +12 -0
- alphaapi-0.2.0b0/examples/project/urls.py +17 -0
- alphaapi-0.2.0b0/examples/project/views.py +33 -0
- alphaapi-0.2.0b0/examples/test/manage.py +10 -0
- alphaapi-0.2.0b0/examples/test/test/__init__.py +0 -0
- alphaapi-0.2.0b0/examples/test/test/app.py +6 -0
- alphaapi-0.2.0b0/examples/test/test/settings.py +10 -0
- alphaapi-0.2.0b0/examples/test/test/urls.py +11 -0
- alphaapi-0.2.0b0/examples/test/test/views.py +13 -0
- alphaapi-0.2.0b0/mkdocs.yml +117 -0
- alphaapi-0.2.0b0/pyproject.toml +69 -0
- alphaapi-0.2.0b0/python/alphaapi/__init__.py +178 -0
- alphaapi-0.2.0b0/python/alphaapi/_core.pyi +67 -0
- alphaapi-0.2.0b0/python/alphaapi/_debug.py +46 -0
- alphaapi-0.2.0b0/python/alphaapi/_helpers.py +63 -0
- alphaapi-0.2.0b0/python/alphaapi/app.py +640 -0
- alphaapi-0.2.0b0/python/alphaapi/apps.py +126 -0
- alphaapi-0.2.0b0/python/alphaapi/auth.py +101 -0
- alphaapi-0.2.0b0/python/alphaapi/cli.py +261 -0
- alphaapi-0.2.0b0/python/alphaapi/conf.py +225 -0
- alphaapi-0.2.0b0/python/alphaapi/cors.py +62 -0
- alphaapi-0.2.0b0/python/alphaapi/csrf.py +65 -0
- alphaapi-0.2.0b0/python/alphaapi/exceptions.py +74 -0
- alphaapi-0.2.0b0/python/alphaapi/http/__init__.py +48 -0
- alphaapi-0.2.0b0/python/alphaapi/http/multipart.py +127 -0
- alphaapi-0.2.0b0/python/alphaapi/http/request.py +261 -0
- alphaapi-0.2.0b0/python/alphaapi/http/response.py +574 -0
- alphaapi-0.2.0b0/python/alphaapi/middleware.py +49 -0
- alphaapi-0.2.0b0/python/alphaapi/observability.py +152 -0
- alphaapi-0.2.0b0/python/alphaapi/openapi.py +205 -0
- alphaapi-0.2.0b0/python/alphaapi/params.py +338 -0
- alphaapi-0.2.0b0/python/alphaapi/py.typed +0 -0
- alphaapi-0.2.0b0/python/alphaapi/scaffold.py +180 -0
- alphaapi-0.2.0b0/python/alphaapi/security.py +75 -0
- alphaapi-0.2.0b0/python/alphaapi/sessions.py +186 -0
- alphaapi-0.2.0b0/python/alphaapi/signed_cookies.py +72 -0
- alphaapi-0.2.0b0/python/alphaapi/staticfiles.py +51 -0
- alphaapi-0.2.0b0/python/alphaapi/templates.py +91 -0
- alphaapi-0.2.0b0/python/alphaapi/testing.py +200 -0
- alphaapi-0.2.0b0/python/alphaapi/urls.py +414 -0
- alphaapi-0.2.0b0/python/alphaapi/views.py +114 -0
- alphaapi-0.2.0b0/python/alphaapi/welcome.py +115 -0
- alphaapi-0.2.0b0/review.txt +77 -0
- alphaapi-0.2.0b0/src/app.rs +2075 -0
- alphaapi-0.2.0b0/src/lib.rs +28 -0
- alphaapi-0.2.0b0/src/request.rs +161 -0
- alphaapi-0.2.0b0/src/response.rs +149 -0
- alphaapi-0.2.0b0/src/spec.rs +166 -0
- alphaapi-0.2.0b0/src/util.rs +242 -0
- alphaapi-0.2.0b0/tasks/manage.py +10 -0
- alphaapi-0.2.0b0/tasks/tasks/__init__.py +0 -0
- alphaapi-0.2.0b0/tasks/tasks/app.py +6 -0
- alphaapi-0.2.0b0/tasks/tasks/settings.py +10 -0
- alphaapi-0.2.0b0/tasks/tasks/store.py +51 -0
- alphaapi-0.2.0b0/tasks/tasks/urls.py +10 -0
- alphaapi-0.2.0b0/tasks/tasks/views.py +86 -0
- alphaapi-0.2.0b0/tests/conftest.py +97 -0
- alphaapi-0.2.0b0/tests/test_alpha.py +521 -0
- alphaapi-0.2.0b0/tests/test_binding.py +229 -0
- alphaapi-0.2.0b0/tests/test_cli.py +145 -0
- alphaapi-0.2.0b0/tests/test_cli_tools.py +76 -0
- alphaapi-0.2.0b0/tests/test_multipart.py +160 -0
- alphaapi-0.2.0b0/tests/test_observability.py +120 -0
- alphaapi-0.2.0b0/tests/test_openapi_static_templates.py +180 -0
- alphaapi-0.2.0b0/tests/test_review_regressions.py +196 -0
- alphaapi-0.2.0b0/tests/test_security_features.py +307 -0
- alphaapi-0.2.0b0/tests/test_sessions_auth.py +163 -0
- alphaapi-0.2.0b0/tests/test_streaming_files.py +228 -0
- alphaapi-0.2.0b0/tests/test_test_client.py +132 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
rust:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
18
|
+
with:
|
|
19
|
+
components: rustfmt, clippy
|
|
20
|
+
- uses: Swatinem/rust-cache@v2
|
|
21
|
+
- name: Format
|
|
22
|
+
run: cargo fmt --all --check
|
|
23
|
+
- name: Clippy
|
|
24
|
+
run: cargo clippy --all-targets -- -D warnings
|
|
25
|
+
- name: Rust unit tests
|
|
26
|
+
run: cargo test --all-targets
|
|
27
|
+
|
|
28
|
+
python:
|
|
29
|
+
runs-on: ${{ matrix.os }}
|
|
30
|
+
strategy:
|
|
31
|
+
fail-fast: false
|
|
32
|
+
matrix:
|
|
33
|
+
os: [ubuntu-latest, windows-latest]
|
|
34
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
- uses: actions/setup-python@v5
|
|
38
|
+
with:
|
|
39
|
+
python-version: ${{ matrix.python-version }}
|
|
40
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
41
|
+
- uses: Swatinem/rust-cache@v2
|
|
42
|
+
- name: Install package
|
|
43
|
+
run: pip install -e ".[dev]"
|
|
44
|
+
- name: Test
|
|
45
|
+
run: pytest -q
|
|
46
|
+
|
|
47
|
+
lint:
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
steps:
|
|
50
|
+
- uses: actions/checkout@v4
|
|
51
|
+
- uses: actions/setup-python@v5
|
|
52
|
+
with:
|
|
53
|
+
python-version: "3.12"
|
|
54
|
+
- name: Install Ruff
|
|
55
|
+
run: pip install "ruff>=0.6"
|
|
56
|
+
- name: Ruff
|
|
57
|
+
run: ruff check python tests
|
|
58
|
+
|
|
59
|
+
mypy:
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
steps:
|
|
62
|
+
- uses: actions/checkout@v4
|
|
63
|
+
- uses: actions/setup-python@v5
|
|
64
|
+
with:
|
|
65
|
+
python-version: "3.12"
|
|
66
|
+
- name: Install mypy
|
|
67
|
+
run: pip install mypy
|
|
68
|
+
- name: Mypy
|
|
69
|
+
run: mypy python
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
pages: write
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: pages
|
|
14
|
+
cancel-in-progress: false
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
25
|
+
- name: Install the package and documentation tooling
|
|
26
|
+
# The API reference imports alphaapi, which needs the compiled Rust
|
|
27
|
+
# extension. Building the editable package supplies both.
|
|
28
|
+
run: pip install -e ".[docs]"
|
|
29
|
+
- name: Build site
|
|
30
|
+
run: mkdocs build --strict
|
|
31
|
+
- uses: actions/upload-pages-artifact@v3
|
|
32
|
+
with:
|
|
33
|
+
path: site
|
|
34
|
+
|
|
35
|
+
deploy:
|
|
36
|
+
needs: build
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
environment:
|
|
39
|
+
name: github-pages
|
|
40
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
41
|
+
steps:
|
|
42
|
+
- id: deployment
|
|
43
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
id-token: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
pypi:
|
|
13
|
+
name: Publish to PyPI
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
21
|
+
- name: Build sdist and wheels
|
|
22
|
+
run: pip install -q "maturin>=1.7,<2.0" && maturin sdist --out dist && maturin build --release --out dist
|
|
23
|
+
- name: Publish to PyPI
|
|
24
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|