blazely 0.1.0__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.
- blazely-0.1.0/.github/workflows/ci.yml +102 -0
- blazely-0.1.0/.gitignore +58 -0
- blazely-0.1.0/Cargo.lock +867 -0
- blazely-0.1.0/Cargo.toml +35 -0
- blazely-0.1.0/HOMEWORK.md +962 -0
- blazely-0.1.0/Makefile +63 -0
- blazely-0.1.0/PKG-INFO +371 -0
- blazely-0.1.0/README.md +334 -0
- blazely-0.1.0/examples/hello_world.py +63 -0
- blazely-0.1.0/pyproject.toml +62 -0
- blazely-0.1.0/pytest.ini +13 -0
- blazely-0.1.0/python/blazely/__init__.py +19 -0
- blazely-0.1.0/python/blazely/_internal.py +12 -0
- blazely-0.1.0/python/blazely/app.py +279 -0
- blazely-0.1.0/python/blazely/exceptions.py +27 -0
- blazely-0.1.0/python/blazely/params.py +61 -0
- blazely-0.1.0/python/blazely/response.py +104 -0
- blazely-0.1.0/src/error.rs +46 -0
- blazely-0.1.0/src/handler.rs +71 -0
- blazely-0.1.0/src/lib.rs +25 -0
- blazely-0.1.0/src/request.rs +121 -0
- blazely-0.1.0/src/response.rs +120 -0
- blazely-0.1.0/src/router.rs +122 -0
- blazely-0.1.0/src/runtime.rs +10 -0
- blazely-0.1.0/src/server.rs +173 -0
- blazely-0.1.0/tests/python/__init__.py +1 -0
- blazely-0.1.0/tests/python/test_basic.py +116 -0
- blazely-0.1.0/uv.lock +754 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
name: CI/CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main, master]
|
|
6
|
+
tags: ['v*']
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main, master]
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
# ── Lint (fast check, no build needed) ───────────────────────────────────
|
|
16
|
+
lint:
|
|
17
|
+
name: Lint
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- uses: dtolnay/rust-toolchain@stable
|
|
22
|
+
with:
|
|
23
|
+
components: rustfmt, clippy
|
|
24
|
+
- uses: Swatinem/rust-cache@v2
|
|
25
|
+
- run: cargo fmt --check
|
|
26
|
+
- run: cargo clippy -- -D warnings
|
|
27
|
+
- uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version: '3.12'
|
|
30
|
+
- run: pip install ruff && ruff check python/
|
|
31
|
+
|
|
32
|
+
# ── Build wheels for all platforms ───────────────────────────────────────
|
|
33
|
+
build:
|
|
34
|
+
name: Build (${{ matrix.os }} / ${{ matrix.target }})
|
|
35
|
+
runs-on: ${{ matrix.runner }}
|
|
36
|
+
strategy:
|
|
37
|
+
fail-fast: false
|
|
38
|
+
matrix:
|
|
39
|
+
include:
|
|
40
|
+
# Linux — built inside manylinux container, works on all distros
|
|
41
|
+
- { os: linux, runner: ubuntu-latest, target: x86_64, manylinux: auto }
|
|
42
|
+
- { os: linux, runner: ubuntu-latest, target: aarch64, manylinux: auto }
|
|
43
|
+
# macOS (Apple Silicon only — macos-13 Intel runner is no longer supported)
|
|
44
|
+
- { os: macos, runner: macos-latest, target: aarch64 }
|
|
45
|
+
# Windows
|
|
46
|
+
- { os: windows, runner: windows-latest, target: x86_64 }
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@v4
|
|
49
|
+
- uses: actions/setup-python@v5
|
|
50
|
+
with:
|
|
51
|
+
python-version: '3.12'
|
|
52
|
+
# Cache Rust deps on the host runner (works on all platforms/targets).
|
|
53
|
+
# Must come before maturin-action; for Linux it runs before the container.
|
|
54
|
+
- uses: Swatinem/rust-cache@v2
|
|
55
|
+
- uses: PyO3/maturin-action@v1
|
|
56
|
+
with:
|
|
57
|
+
target: ${{ matrix.target }}
|
|
58
|
+
manylinux: ${{ matrix.manylinux || 'off' }}
|
|
59
|
+
args: --release --out dist
|
|
60
|
+
- uses: actions/upload-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
name: wheels-${{ matrix.os }}-${{ matrix.target }}
|
|
63
|
+
path: dist
|
|
64
|
+
|
|
65
|
+
# ── Source distribution ───────────────────────────────────────────────────
|
|
66
|
+
sdist:
|
|
67
|
+
name: Source distribution
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v4
|
|
71
|
+
- uses: PyO3/maturin-action@v1
|
|
72
|
+
with:
|
|
73
|
+
command: sdist
|
|
74
|
+
args: --out dist
|
|
75
|
+
- uses: actions/upload-artifact@v4
|
|
76
|
+
with:
|
|
77
|
+
name: wheels-sdist
|
|
78
|
+
path: dist
|
|
79
|
+
|
|
80
|
+
# ── Publish to PyPI on version tags ──────────────────────────────────────
|
|
81
|
+
# Prerequisites (one-time setup):
|
|
82
|
+
# 1. On PyPI: Add a Trusted Publisher → GitHub Actions
|
|
83
|
+
# Owner: cakirtaha Repo: blazely Workflow: ci.yml Env: pypi
|
|
84
|
+
# 2. On GitHub: Settings → Environments → create "pypi"
|
|
85
|
+
# Then just: git tag v0.1.0 && git push origin v0.1.0
|
|
86
|
+
publish:
|
|
87
|
+
name: Publish to PyPI
|
|
88
|
+
needs: [lint, build, sdist]
|
|
89
|
+
runs-on: ubuntu-latest
|
|
90
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
91
|
+
environment:
|
|
92
|
+
name: pypi
|
|
93
|
+
url: https://pypi.org/p/blazely
|
|
94
|
+
permissions:
|
|
95
|
+
id-token: write
|
|
96
|
+
steps:
|
|
97
|
+
- uses: actions/download-artifact@v4
|
|
98
|
+
with:
|
|
99
|
+
pattern: wheels-*
|
|
100
|
+
merge-multiple: true
|
|
101
|
+
path: dist
|
|
102
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
blazely-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
.venv/
|
|
23
|
+
venv/
|
|
24
|
+
ENV/
|
|
25
|
+
|
|
26
|
+
# Rust
|
|
27
|
+
target/
|
|
28
|
+
Cargo.lock
|
|
29
|
+
**/*.rs.bk
|
|
30
|
+
*.pdb
|
|
31
|
+
|
|
32
|
+
# IDE
|
|
33
|
+
.idea/
|
|
34
|
+
.vscode/
|
|
35
|
+
*.swp
|
|
36
|
+
*.swo
|
|
37
|
+
*~
|
|
38
|
+
.DS_Store
|
|
39
|
+
|
|
40
|
+
# Testing
|
|
41
|
+
.pytest_cache/
|
|
42
|
+
.coverage
|
|
43
|
+
htmlcov/
|
|
44
|
+
|
|
45
|
+
# Logs
|
|
46
|
+
*.log
|
|
47
|
+
|
|
48
|
+
# Temporary files
|
|
49
|
+
/tmp/
|
|
50
|
+
*.tmp
|
|
51
|
+
test_server.sh
|
|
52
|
+
|
|
53
|
+
# Benchmark outputs
|
|
54
|
+
/private/
|
|
55
|
+
|
|
56
|
+
# Build artifacts
|
|
57
|
+
*.whl
|
|
58
|
+
blazely_by_ourselves
|