cello-framework 0.2.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.
- cello_framework-0.2.0/.github/workflows/ci.yml +150 -0
- cello_framework-0.2.0/.github/workflows/publish.yml +170 -0
- cello_framework-0.2.0/.gitignore +115 -0
- cello_framework-0.2.0/CONTRIBUTING.md +128 -0
- cello_framework-0.2.0/Cargo.lock +2334 -0
- cello_framework-0.2.0/Cargo.toml +71 -0
- cello_framework-0.2.0/LICENSE +21 -0
- cello_framework-0.2.0/PKG-INFO +244 -0
- cello_framework-0.2.0/PUBLISHING.md +161 -0
- cello_framework-0.2.0/README.md +214 -0
- cello_framework-0.2.0/cello.md +150 -0
- cello_framework-0.2.0/examples/advanced.py +230 -0
- cello_framework-0.2.0/examples/hello.py +87 -0
- cello_framework-0.2.0/pyproject.toml +78 -0
- cello_framework-0.2.0/python/cello/__init__.py +306 -0
- cello_framework-0.2.0/src/arena.rs +203 -0
- cello_framework-0.2.0/src/blueprint.rs +163 -0
- cello_framework-0.2.0/src/handler.rs +83 -0
- cello_framework-0.2.0/src/json.rs +166 -0
- cello_framework-0.2.0/src/lib.rs +204 -0
- cello_framework-0.2.0/src/middleware.rs +390 -0
- cello_framework-0.2.0/src/multipart.rs +248 -0
- cello_framework-0.2.0/src/request.rs +211 -0
- cello_framework-0.2.0/src/response.rs +300 -0
- cello_framework-0.2.0/src/router.rs +145 -0
- cello_framework-0.2.0/src/server.rs +218 -0
- cello_framework-0.2.0/src/sse.rs +236 -0
- cello_framework-0.2.0/src/websocket.rs +213 -0
- cello_framework-0.2.0/tests/test_cello.py +609 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Continuous Integration for Cello
|
|
2
|
+
# Runs on every push and pull request to main branch
|
|
3
|
+
# Builds for multiple platforms: Linux (x86_64, aarch64), macOS (x86_64, aarch64), Windows (x86_64)
|
|
4
|
+
|
|
5
|
+
name: CI
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [main, master]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [main, master]
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
CARGO_TERM_COLOR: always
|
|
15
|
+
PYTHON_VERSION: "3.12"
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
lint:
|
|
19
|
+
name: Lint
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
28
|
+
|
|
29
|
+
- name: Install Rust
|
|
30
|
+
uses: dtolnay/rust-toolchain@stable
|
|
31
|
+
with:
|
|
32
|
+
components: rustfmt, clippy
|
|
33
|
+
|
|
34
|
+
- name: Check Rust formatting
|
|
35
|
+
run: cargo fmt --check || echo "Formatting issues found (non-blocking)"
|
|
36
|
+
|
|
37
|
+
- name: Run Clippy
|
|
38
|
+
run: cargo clippy --all-targets || echo "Clippy warnings found (non-blocking)"
|
|
39
|
+
|
|
40
|
+
- name: Install Python linters
|
|
41
|
+
run: pip install ruff
|
|
42
|
+
|
|
43
|
+
- name: Run Ruff
|
|
44
|
+
run: ruff check python/ tests/ || echo "Ruff issues found (non-blocking)"
|
|
45
|
+
|
|
46
|
+
test:
|
|
47
|
+
name: Test (${{ matrix.os }})
|
|
48
|
+
runs-on: ${{ matrix.os }}
|
|
49
|
+
strategy:
|
|
50
|
+
fail-fast: false
|
|
51
|
+
matrix:
|
|
52
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
- name: Set up Python
|
|
57
|
+
uses: actions/setup-python@v5
|
|
58
|
+
with:
|
|
59
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
60
|
+
|
|
61
|
+
- name: Install test dependencies
|
|
62
|
+
run: pip install pytest requests
|
|
63
|
+
|
|
64
|
+
# Use maturin-action for proper build
|
|
65
|
+
- name: Build and install wheel
|
|
66
|
+
uses: PyO3/maturin-action@v1
|
|
67
|
+
with:
|
|
68
|
+
command: build
|
|
69
|
+
args: --release --out dist
|
|
70
|
+
|
|
71
|
+
- name: Install built wheel
|
|
72
|
+
shell: bash
|
|
73
|
+
run: pip install dist/*.whl
|
|
74
|
+
|
|
75
|
+
- name: Run Python tests
|
|
76
|
+
run: pytest tests/ -v -k "not integration"
|
|
77
|
+
|
|
78
|
+
# ============================================================================
|
|
79
|
+
# Linux Builds (x86_64 and aarch64) using manylinux
|
|
80
|
+
# ============================================================================
|
|
81
|
+
build-linux:
|
|
82
|
+
name: Build Linux (${{ matrix.target }})
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
strategy:
|
|
85
|
+
fail-fast: false
|
|
86
|
+
matrix:
|
|
87
|
+
target:
|
|
88
|
+
- x86_64-unknown-linux-gnu
|
|
89
|
+
- aarch64-unknown-linux-gnu
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v4
|
|
92
|
+
|
|
93
|
+
- name: Build wheels (manylinux)
|
|
94
|
+
uses: PyO3/maturin-action@v1
|
|
95
|
+
with:
|
|
96
|
+
target: ${{ matrix.target }}
|
|
97
|
+
args: --release --out dist
|
|
98
|
+
manylinux: auto
|
|
99
|
+
|
|
100
|
+
- name: Upload wheel
|
|
101
|
+
uses: actions/upload-artifact@v4
|
|
102
|
+
with:
|
|
103
|
+
name: wheel-linux-${{ matrix.target }}
|
|
104
|
+
path: dist/*.whl
|
|
105
|
+
|
|
106
|
+
# ============================================================================
|
|
107
|
+
# macOS Build (aarch64 Apple Silicon only)
|
|
108
|
+
# ============================================================================
|
|
109
|
+
build-macos:
|
|
110
|
+
name: Build macOS (Apple Silicon)
|
|
111
|
+
runs-on: macos-latest
|
|
112
|
+
steps:
|
|
113
|
+
- uses: actions/checkout@v4
|
|
114
|
+
|
|
115
|
+
- name: Build wheels
|
|
116
|
+
uses: PyO3/maturin-action@v1
|
|
117
|
+
with:
|
|
118
|
+
target: aarch64-apple-darwin
|
|
119
|
+
args: --release --out dist
|
|
120
|
+
|
|
121
|
+
- name: Upload wheel
|
|
122
|
+
uses: actions/upload-artifact@v4
|
|
123
|
+
with:
|
|
124
|
+
name: wheel-macos-aarch64
|
|
125
|
+
path: dist/*.whl
|
|
126
|
+
|
|
127
|
+
# ============================================================================
|
|
128
|
+
# Windows Builds (x86_64)
|
|
129
|
+
# ============================================================================
|
|
130
|
+
build-windows:
|
|
131
|
+
name: Build Windows (x86_64)
|
|
132
|
+
runs-on: windows-latest
|
|
133
|
+
steps:
|
|
134
|
+
- uses: actions/checkout@v4
|
|
135
|
+
|
|
136
|
+
- name: Set up Python
|
|
137
|
+
uses: actions/setup-python@v5
|
|
138
|
+
with:
|
|
139
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
140
|
+
|
|
141
|
+
- name: Build wheels
|
|
142
|
+
uses: PyO3/maturin-action@v1
|
|
143
|
+
with:
|
|
144
|
+
args: --release --out dist
|
|
145
|
+
|
|
146
|
+
- name: Upload wheel
|
|
147
|
+
uses: actions/upload-artifact@v4
|
|
148
|
+
with:
|
|
149
|
+
name: wheel-windows-x86_64
|
|
150
|
+
path: dist/*.whl
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Publish to PyPI when a new release is created
|
|
2
|
+
# Builds wheels for all platforms and uploads to PyPI
|
|
3
|
+
# Platforms: Linux (x86_64, aarch64), macOS (x86_64, aarch64), Windows (x86_64)
|
|
4
|
+
|
|
5
|
+
name: Publish to PyPI
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches:
|
|
10
|
+
- release
|
|
11
|
+
release:
|
|
12
|
+
types: [published]
|
|
13
|
+
workflow_dispatch:
|
|
14
|
+
inputs:
|
|
15
|
+
publish_to_test_pypi:
|
|
16
|
+
description: 'Publish to Test PyPI instead of PyPI'
|
|
17
|
+
required: false
|
|
18
|
+
default: 'false'
|
|
19
|
+
|
|
20
|
+
env:
|
|
21
|
+
PYTHON_VERSION: "3.12"
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
# ============================================================================
|
|
25
|
+
# Source Distribution
|
|
26
|
+
# ============================================================================
|
|
27
|
+
build-sdist:
|
|
28
|
+
name: Build source distribution
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
|
|
33
|
+
- name: Build sdist
|
|
34
|
+
uses: PyO3/maturin-action@v1
|
|
35
|
+
with:
|
|
36
|
+
command: sdist
|
|
37
|
+
args: --out dist
|
|
38
|
+
|
|
39
|
+
- name: Upload sdist
|
|
40
|
+
uses: actions/upload-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: sdist
|
|
43
|
+
path: dist/*.tar.gz
|
|
44
|
+
|
|
45
|
+
# ============================================================================
|
|
46
|
+
# Linux Builds (x86_64 and aarch64) using manylinux
|
|
47
|
+
# ============================================================================
|
|
48
|
+
build-linux:
|
|
49
|
+
name: Build Linux (${{ matrix.target }})
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
strategy:
|
|
52
|
+
fail-fast: false
|
|
53
|
+
matrix:
|
|
54
|
+
target:
|
|
55
|
+
- x86_64-unknown-linux-gnu
|
|
56
|
+
- aarch64-unknown-linux-gnu
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@v4
|
|
59
|
+
|
|
60
|
+
- name: Build wheels (manylinux)
|
|
61
|
+
uses: PyO3/maturin-action@v1
|
|
62
|
+
with:
|
|
63
|
+
target: ${{ matrix.target }}
|
|
64
|
+
args: --release --out dist
|
|
65
|
+
manylinux: auto
|
|
66
|
+
|
|
67
|
+
- name: Upload wheel
|
|
68
|
+
uses: actions/upload-artifact@v4
|
|
69
|
+
with:
|
|
70
|
+
name: wheel-linux-${{ matrix.target }}
|
|
71
|
+
path: dist/*.whl
|
|
72
|
+
|
|
73
|
+
# ============================================================================
|
|
74
|
+
# macOS Build (aarch64 Apple Silicon only)
|
|
75
|
+
# ============================================================================
|
|
76
|
+
build-macos:
|
|
77
|
+
name: Build macOS (Apple Silicon)
|
|
78
|
+
runs-on: macos-latest
|
|
79
|
+
steps:
|
|
80
|
+
- uses: actions/checkout@v4
|
|
81
|
+
|
|
82
|
+
- name: Build wheels
|
|
83
|
+
uses: PyO3/maturin-action@v1
|
|
84
|
+
with:
|
|
85
|
+
target: aarch64-apple-darwin
|
|
86
|
+
args: --release --out dist
|
|
87
|
+
|
|
88
|
+
- name: Upload wheel
|
|
89
|
+
uses: actions/upload-artifact@v4
|
|
90
|
+
with:
|
|
91
|
+
name: wheel-macos-aarch64
|
|
92
|
+
path: dist/*.whl
|
|
93
|
+
|
|
94
|
+
# ============================================================================
|
|
95
|
+
# Windows Builds (x86_64)
|
|
96
|
+
# ============================================================================
|
|
97
|
+
build-windows:
|
|
98
|
+
name: Build Windows (x86_64)
|
|
99
|
+
runs-on: windows-latest
|
|
100
|
+
steps:
|
|
101
|
+
- uses: actions/checkout@v4
|
|
102
|
+
|
|
103
|
+
- name: Set up Python
|
|
104
|
+
uses: actions/setup-python@v5
|
|
105
|
+
with:
|
|
106
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
107
|
+
|
|
108
|
+
- name: Build wheels
|
|
109
|
+
uses: PyO3/maturin-action@v1
|
|
110
|
+
with:
|
|
111
|
+
args: --release --out dist
|
|
112
|
+
|
|
113
|
+
- name: Upload wheel
|
|
114
|
+
uses: actions/upload-artifact@v4
|
|
115
|
+
with:
|
|
116
|
+
name: wheel-windows-x86_64
|
|
117
|
+
path: dist/*.whl
|
|
118
|
+
|
|
119
|
+
# ============================================================================
|
|
120
|
+
# Publish to PyPI
|
|
121
|
+
# ============================================================================
|
|
122
|
+
publish:
|
|
123
|
+
name: Publish to PyPI
|
|
124
|
+
needs: [build-sdist, build-linux, build-macos, build-windows]
|
|
125
|
+
runs-on: ubuntu-latest
|
|
126
|
+
if: github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/release')
|
|
127
|
+
environment:
|
|
128
|
+
name: pypi
|
|
129
|
+
url: https://pypi.org/project/cello-framework/
|
|
130
|
+
permissions:
|
|
131
|
+
id-token: write
|
|
132
|
+
|
|
133
|
+
steps:
|
|
134
|
+
- name: Download all artifacts
|
|
135
|
+
uses: actions/download-artifact@v4
|
|
136
|
+
with:
|
|
137
|
+
path: dist
|
|
138
|
+
merge-multiple: true
|
|
139
|
+
|
|
140
|
+
- name: List artifacts
|
|
141
|
+
run: ls -la dist/
|
|
142
|
+
|
|
143
|
+
- name: Publish to PyPI
|
|
144
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
145
|
+
with:
|
|
146
|
+
packages-dir: dist/
|
|
147
|
+
|
|
148
|
+
# ============================================================================
|
|
149
|
+
# Publish to Test PyPI (manual trigger)
|
|
150
|
+
# ============================================================================
|
|
151
|
+
publish-test:
|
|
152
|
+
name: Publish to Test PyPI
|
|
153
|
+
needs: [build-sdist, build-linux, build-macos, build-windows]
|
|
154
|
+
runs-on: ubuntu-latest
|
|
155
|
+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.publish_to_test_pypi == 'true'
|
|
156
|
+
permissions:
|
|
157
|
+
id-token: write
|
|
158
|
+
|
|
159
|
+
steps:
|
|
160
|
+
- name: Download all artifacts
|
|
161
|
+
uses: actions/download-artifact@v4
|
|
162
|
+
with:
|
|
163
|
+
path: dist
|
|
164
|
+
merge-multiple: true
|
|
165
|
+
|
|
166
|
+
- name: Publish to Test PyPI
|
|
167
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
168
|
+
with:
|
|
169
|
+
repository-url: https://test.pypi.org/legacy/
|
|
170
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
*.manifest
|
|
31
|
+
*.spec
|
|
32
|
+
|
|
33
|
+
# Installer logs
|
|
34
|
+
pip-log.txt
|
|
35
|
+
pip-delete-this-directory.txt
|
|
36
|
+
|
|
37
|
+
# Unit test / coverage reports
|
|
38
|
+
htmlcov/
|
|
39
|
+
.tox/
|
|
40
|
+
.nox/
|
|
41
|
+
.coverage
|
|
42
|
+
.coverage.*
|
|
43
|
+
.cache
|
|
44
|
+
nosetests.xml
|
|
45
|
+
coverage.xml
|
|
46
|
+
*.cover
|
|
47
|
+
*.py,cover
|
|
48
|
+
.hypothesis/
|
|
49
|
+
.pytest_cache/
|
|
50
|
+
pytest_cache/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Environments
|
|
57
|
+
.env
|
|
58
|
+
.venv
|
|
59
|
+
env/
|
|
60
|
+
venv/
|
|
61
|
+
ENV/
|
|
62
|
+
env.bak/
|
|
63
|
+
venv.bak/
|
|
64
|
+
|
|
65
|
+
# IDE / Editor
|
|
66
|
+
.vscode/
|
|
67
|
+
.idea/
|
|
68
|
+
*.swp
|
|
69
|
+
*.swo
|
|
70
|
+
*~
|
|
71
|
+
.project
|
|
72
|
+
.pydevproject
|
|
73
|
+
.settings/
|
|
74
|
+
*.sublime-project
|
|
75
|
+
*.sublime-workspace
|
|
76
|
+
|
|
77
|
+
# macOS
|
|
78
|
+
.DS_Store
|
|
79
|
+
.AppleDouble
|
|
80
|
+
.LSOverride
|
|
81
|
+
._*
|
|
82
|
+
.Spotlight-V100
|
|
83
|
+
.Trashes
|
|
84
|
+
|
|
85
|
+
# Windows
|
|
86
|
+
Thumbs.db
|
|
87
|
+
ehthumbs.db
|
|
88
|
+
Desktop.ini
|
|
89
|
+
|
|
90
|
+
# Rust
|
|
91
|
+
target/
|
|
92
|
+
Cargo.lock
|
|
93
|
+
**/*.rs.bk
|
|
94
|
+
|
|
95
|
+
# Maturin
|
|
96
|
+
*.whl
|
|
97
|
+
|
|
98
|
+
# Documentation
|
|
99
|
+
docs/_build/
|
|
100
|
+
site/
|
|
101
|
+
|
|
102
|
+
# Jupyter Notebook
|
|
103
|
+
.ipynb_checkpoints
|
|
104
|
+
|
|
105
|
+
# Local development
|
|
106
|
+
*.log
|
|
107
|
+
*.tmp
|
|
108
|
+
*.temp
|
|
109
|
+
.scratch/
|
|
110
|
+
|
|
111
|
+
# Secrets (never commit these!)
|
|
112
|
+
*.pem
|
|
113
|
+
*.key
|
|
114
|
+
secrets.toml
|
|
115
|
+
.secrets
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Contributing to Cello
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to Cello! 🐍
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
### Prerequisites
|
|
8
|
+
|
|
9
|
+
- Python 3.8+
|
|
10
|
+
- Rust 1.70+
|
|
11
|
+
- maturin (`pip install maturin`)
|
|
12
|
+
|
|
13
|
+
### Development Setup
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Clone the repository
|
|
17
|
+
git clone https://github.com/jagadeeshkatla/cello.git
|
|
18
|
+
cd cello
|
|
19
|
+
|
|
20
|
+
# Create virtual environment
|
|
21
|
+
python -m venv .venv
|
|
22
|
+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
23
|
+
|
|
24
|
+
# Install development dependencies
|
|
25
|
+
pip install maturin pytest ruff requests
|
|
26
|
+
|
|
27
|
+
# Build the project
|
|
28
|
+
maturin develop
|
|
29
|
+
|
|
30
|
+
# Run tests
|
|
31
|
+
pytest tests/ -v
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Making Changes
|
|
35
|
+
|
|
36
|
+
### 1. Create a Branch
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
git checkout -b feature/your-feature-name
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 2. Make Your Changes
|
|
43
|
+
|
|
44
|
+
- **Rust code** → `src/` directory
|
|
45
|
+
- **Python wrapper** → `python/cello/` directory
|
|
46
|
+
- **Tests** → `tests/` directory
|
|
47
|
+
|
|
48
|
+
### 3. Test Your Changes
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Rebuild after Rust changes
|
|
52
|
+
maturin develop
|
|
53
|
+
|
|
54
|
+
# Run Python tests
|
|
55
|
+
pytest tests/ -v
|
|
56
|
+
|
|
57
|
+
# Run linters
|
|
58
|
+
ruff check python/ tests/
|
|
59
|
+
cargo clippy
|
|
60
|
+
cargo fmt --check
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 4. Commit Your Changes
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
git add .
|
|
67
|
+
git commit -m "feat: add your feature description"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
71
|
+
- `feat:` New feature
|
|
72
|
+
- `fix:` Bug fix
|
|
73
|
+
- `docs:` Documentation
|
|
74
|
+
- `refactor:` Code refactoring
|
|
75
|
+
- `test:` Adding tests
|
|
76
|
+
- `chore:` Maintenance
|
|
77
|
+
|
|
78
|
+
### 5. Push and Create PR
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
git push origin feature/your-feature-name
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Then create a Pull Request on GitHub.
|
|
85
|
+
|
|
86
|
+
## Code Style
|
|
87
|
+
|
|
88
|
+
### Rust
|
|
89
|
+
|
|
90
|
+
- Follow Rust standard style (`cargo fmt`)
|
|
91
|
+
- No clippy warnings (`cargo clippy -- -D warnings`)
|
|
92
|
+
- Document public APIs with `///` comments
|
|
93
|
+
|
|
94
|
+
### Python
|
|
95
|
+
|
|
96
|
+
- Follow PEP 8
|
|
97
|
+
- Use ruff for linting
|
|
98
|
+
- Type hints encouraged
|
|
99
|
+
|
|
100
|
+
## Project Structure
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
cello/
|
|
104
|
+
├── src/ # Rust source code
|
|
105
|
+
│ ├── lib.rs # Main entry, Python module
|
|
106
|
+
│ ├── request.rs # Request handling
|
|
107
|
+
│ ├── response.rs # Response types
|
|
108
|
+
│ ├── router.rs # URL routing
|
|
109
|
+
│ ├── handler.rs # Handler registry
|
|
110
|
+
│ ├── middleware.rs # Middleware system
|
|
111
|
+
│ ├── blueprint.rs # Route grouping
|
|
112
|
+
│ ├── websocket.rs # WebSocket support
|
|
113
|
+
│ ├── sse.rs # Server-Sent Events
|
|
114
|
+
│ ├── multipart.rs # File uploads
|
|
115
|
+
│ ├── json.rs # SIMD JSON
|
|
116
|
+
│ ├── arena.rs # Arena allocators
|
|
117
|
+
│ └── server.rs # HTTP server
|
|
118
|
+
├── python/cello/ # Python package
|
|
119
|
+
│ └── __init__.py # Python API wrapper
|
|
120
|
+
├── tests/ # Python tests
|
|
121
|
+
├── examples/ # Example applications
|
|
122
|
+
├── Cargo.toml # Rust dependencies
|
|
123
|
+
└── pyproject.toml # Python project config
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Questions?
|
|
127
|
+
|
|
128
|
+
Open an issue on GitHub!
|