orbit-web-framework 1.0.2__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.
- orbit_web_framework-1.0.2/CHANGELOG_v1.0.2.md +322 -0
- orbit_web_framework-1.0.2/LICENSE +21 -0
- orbit_web_framework-1.0.2/MANIFEST.in +8 -0
- orbit_web_framework-1.0.2/PKG-INFO +480 -0
- orbit_web_framework-1.0.2/QUICKSTART.md +276 -0
- orbit_web_framework-1.0.2/README.md +447 -0
- orbit_web_framework-1.0.2/orbit/__init__.py +16 -0
- orbit_web_framework-1.0.2/orbit/core/__init__.py +1 -0
- orbit_web_framework-1.0.2/orbit/core/application.py +289 -0
- orbit_web_framework-1.0.2/orbit/core/middleware.py +236 -0
- orbit_web_framework-1.0.2/orbit/core/request.py +126 -0
- orbit_web_framework-1.0.2/orbit/core/response.py +264 -0
- orbit_web_framework-1.0.2/orbit/core/router.py +183 -0
- orbit_web_framework-1.0.2/orbit/http/__init__.py +1 -0
- orbit_web_framework-1.0.2/orbit/http/parser.py +176 -0
- orbit_web_framework-1.0.2/orbit/http/server.py +387 -0
- orbit_web_framework-1.0.2/orbit/static/__init__.py +1 -0
- orbit_web_framework-1.0.2/orbit/static/handler.py +168 -0
- orbit_web_framework-1.0.2/orbit/template/__init__.py +1 -0
- orbit_web_framework-1.0.2/orbit/template/engine.py +239 -0
- orbit_web_framework-1.0.2/orbit/testing/__init__.py +1 -0
- orbit_web_framework-1.0.2/orbit/testing/client.py +120 -0
- orbit_web_framework-1.0.2/orbit_web_framework.egg-info/PKG-INFO +480 -0
- orbit_web_framework-1.0.2/orbit_web_framework.egg-info/SOURCES.txt +27 -0
- orbit_web_framework-1.0.2/orbit_web_framework.egg-info/dependency_links.txt +1 -0
- orbit_web_framework-1.0.2/orbit_web_framework.egg-info/top_level.txt +1 -0
- orbit_web_framework-1.0.2/pyproject.toml +44 -0
- orbit_web_framework-1.0.2/setup.cfg +4 -0
- orbit_web_framework-1.0.2/setup.py +50 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# Orbit Framework - v1.0.2 Release Notes
|
|
2
|
+
|
|
3
|
+
## Release Date: February 7, 2026
|
|
4
|
+
|
|
5
|
+
## Major Feature: Access Logging System โจ
|
|
6
|
+
|
|
7
|
+
This release adds comprehensive logging infrastructure to make Orbit production-ready.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## ๐ฏ New Features
|
|
12
|
+
|
|
13
|
+
### 1. **Multi-Logger Architecture** โ
|
|
14
|
+
|
|
15
|
+
Orbit now uses specialized loggers for different purposes:
|
|
16
|
+
|
|
17
|
+
- **`orbit.access`** - HTTP access logs (every request)
|
|
18
|
+
- **`orbit.security`** - Security events (rate limits, anomalies)
|
|
19
|
+
- **`orbit.server`** - Server lifecycle (startup, shutdown)
|
|
20
|
+
- **`orbit`** - Application-level events
|
|
21
|
+
|
|
22
|
+
### 2. **Access Logging** โ
|
|
23
|
+
|
|
24
|
+
Every HTTP request is now logged with:
|
|
25
|
+
- Client IP address
|
|
26
|
+
- HTTP method
|
|
27
|
+
- Request path
|
|
28
|
+
- Response status code
|
|
29
|
+
- Request duration (milliseconds)
|
|
30
|
+
|
|
31
|
+
**Format:**
|
|
32
|
+
```
|
|
33
|
+
2026-02-07 04:27:19 - orbit.access - INFO - 127.0.0.1 | GET / | 200 | 0ms
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 3. **Security Logging** โ
|
|
37
|
+
|
|
38
|
+
Security events are logged separately:
|
|
39
|
+
|
|
40
|
+
#### Rate Limiting
|
|
41
|
+
```
|
|
42
|
+
orbit.security - WARNING - 192.168.1.10 | GET /api/data | RATE_LIMIT | 60/60 req/min
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Malformed Requests
|
|
46
|
+
```
|
|
47
|
+
orbit.security - WARNING - 192.168.1.10 | MALFORMED | No HTTP headers separator
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Payload Too Large
|
|
51
|
+
```
|
|
52
|
+
orbit.security - WARNING - 192.168.1.10 | POST /upload | PAYLOAD_TOO_LARGE | 15728640 bytes
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
#### Parse Errors (Potential Attacks)
|
|
56
|
+
```
|
|
57
|
+
orbit.security - WARNING - 192.168.1.10 | GET /../etc/passwd | PARSE_ERROR | Path traversal attempt
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## ๐ Log Output Examples
|
|
63
|
+
|
|
64
|
+
### Normal Operation
|
|
65
|
+
```
|
|
66
|
+
INFO - Orbit server starting on 0.0.0.0:8080
|
|
67
|
+
INFO - 127.0.0.1 | GET / | 200 | 2ms
|
|
68
|
+
INFO - 127.0.0.1 | GET /api/users | 200 | 15ms
|
|
69
|
+
INFO - 127.0.0.1 | POST /api/data | 201 | 8ms
|
|
70
|
+
INFO - Shutdown signal received
|
|
71
|
+
INFO - Server stopped
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### With Security Events
|
|
75
|
+
```
|
|
76
|
+
INFO - Orbit server starting on 0.0.0.0:8080
|
|
77
|
+
INFO - 192.168.1.10 | GET /api/data | 200 | 3ms
|
|
78
|
+
INFO - 192.168.1.10 | GET /api/data | 200 | 2ms
|
|
79
|
+
WARNING - 192.168.1.10 | GET /api/data | RATE_LIMIT | 60/60 req/min
|
|
80
|
+
INFO - 192.168.1.10 | GET /api/data | 429 | 1ms
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## ๐ง Technical Changes
|
|
86
|
+
|
|
87
|
+
### Modified Files
|
|
88
|
+
|
|
89
|
+
#### `orbit/http/server.py`
|
|
90
|
+
- Added `access_logger` and `security_logger`
|
|
91
|
+
- Enhanced `_process_request()` with timing and logging
|
|
92
|
+
- IP address extraction from socket
|
|
93
|
+
- Security event detection and logging
|
|
94
|
+
|
|
95
|
+
#### `orbit/core/middleware.py`
|
|
96
|
+
- Enhanced `RateLimitMiddleware` with security logging
|
|
97
|
+
- Added logger instance to middleware
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## ๐ Improvements
|
|
102
|
+
|
|
103
|
+
### Before (v1.0.1)
|
|
104
|
+
```
|
|
105
|
+
INFO - Orbit server starting on 0.0.0.0:8080
|
|
106
|
+
[No logs when requests arrive]
|
|
107
|
+
INFO - Server stopped
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
โ **Problem:** No visibility into what's happening
|
|
111
|
+
|
|
112
|
+
### After (v1.0.2)
|
|
113
|
+
```
|
|
114
|
+
INFO - Orbit server starting on 0.0.0.0:8080
|
|
115
|
+
INFO - 127.0.0.1 | GET / | 200 | 2ms
|
|
116
|
+
INFO - 127.0.0.1 | GET /api/test | 200 | 5ms
|
|
117
|
+
WARNING - 127.0.0.1 | GET /api/test | RATE_LIMIT | 5/5 req/min
|
|
118
|
+
INFO - 127.0.0.1 | GET /api/test | 429 | 1ms
|
|
119
|
+
INFO - Server stopped
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
โ
**Solution:** Full visibility with clean, structured logs
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## ๐จ Log Levels
|
|
127
|
+
|
|
128
|
+
| Level | Usage | Example |
|
|
129
|
+
|-------|-------|---------|
|
|
130
|
+
| `INFO` | Normal operations | Access logs, startup, shutdown |
|
|
131
|
+
| `WARNING` | Security events | Rate limits, suspicious activity |
|
|
132
|
+
| `ERROR` | Server errors | Processing failures, bugs |
|
|
133
|
+
|
|
134
|
+
**Note:** DEBUG level is available in debug mode but not spammy.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## ๐ Usage
|
|
139
|
+
|
|
140
|
+
No code changes needed! Logging is automatic:
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
from orbit import Orbit, Request, Response
|
|
144
|
+
|
|
145
|
+
app = Orbit(debug=False) # Production mode
|
|
146
|
+
|
|
147
|
+
def hello(request: Request) -> Response:
|
|
148
|
+
return Response.json({'message': 'Hello!'})
|
|
149
|
+
|
|
150
|
+
app.route('/hello', ['GET'], hello)
|
|
151
|
+
|
|
152
|
+
if __name__ == '__main__':
|
|
153
|
+
app.run(port=8080)
|
|
154
|
+
# Access logs will appear automatically!
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## ๐ก๏ธ Security Benefits
|
|
160
|
+
|
|
161
|
+
1. **Attack Detection**
|
|
162
|
+
- See rate limit violations
|
|
163
|
+
- Detect malformed requests
|
|
164
|
+
- Identify suspicious patterns
|
|
165
|
+
|
|
166
|
+
2. **Forensics**
|
|
167
|
+
- Track requests by IP
|
|
168
|
+
- Audit trail for compliance
|
|
169
|
+
- Incident investigation
|
|
170
|
+
|
|
171
|
+
3. **Monitoring**
|
|
172
|
+
- Response time tracking
|
|
173
|
+
- Error rate monitoring
|
|
174
|
+
- Traffic patterns
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## ๐ฆ PyPI Ready
|
|
179
|
+
|
|
180
|
+
This release is optimized for PyPI:
|
|
181
|
+
- Removed test demo files
|
|
182
|
+
- Kept only essential tests
|
|
183
|
+
- Clean package structure
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## ๐ Migration Guide
|
|
188
|
+
|
|
189
|
+
From v1.0.1 to v1.0.2:
|
|
190
|
+
|
|
191
|
+
### No Code Changes Needed! โ
|
|
192
|
+
|
|
193
|
+
Your existing code works as-is:
|
|
194
|
+
|
|
195
|
+
```python
|
|
196
|
+
# Your existing app.py
|
|
197
|
+
from orbit import Orbit, Request, Response
|
|
198
|
+
|
|
199
|
+
app = Orbit()
|
|
200
|
+
|
|
201
|
+
def home(request):
|
|
202
|
+
return Response.html('<h1>Hello</h1>')
|
|
203
|
+
|
|
204
|
+
app.route('/', ['GET'], home)
|
|
205
|
+
app.run(port=8080)
|
|
206
|
+
|
|
207
|
+
# NEW: Access logs now appear automatically!
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Optional: Customize Logging
|
|
211
|
+
|
|
212
|
+
If you want custom log format:
|
|
213
|
+
|
|
214
|
+
```python
|
|
215
|
+
import logging
|
|
216
|
+
|
|
217
|
+
# Configure before creating Orbit app
|
|
218
|
+
logging.basicConfig(
|
|
219
|
+
format='%(asctime)s | %(name)s | %(levelname)s | %(message)s',
|
|
220
|
+
level=logging.INFO
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
app = Orbit()
|
|
224
|
+
# ... rest of your code
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## ๐ Performance Impact
|
|
230
|
+
|
|
231
|
+
- **Minimal overhead** (~1ms per request)
|
|
232
|
+
- **Async-safe** logging
|
|
233
|
+
- **No blocking** on log writes
|
|
234
|
+
- **Same throughput** as v1.0.1
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## โ
Backwards Compatibility
|
|
239
|
+
|
|
240
|
+
**100% backwards compatible** with v1.0.1:
|
|
241
|
+
- No breaking changes
|
|
242
|
+
- No API modifications
|
|
243
|
+
- Existing apps work unchanged
|
|
244
|
+
- Only new features added
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## ๐งช Testing
|
|
249
|
+
|
|
250
|
+
All tests pass:
|
|
251
|
+
```bash
|
|
252
|
+
$ python test_orbit.py
|
|
253
|
+
All tests passed! โ
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## ๐ Version History
|
|
259
|
+
|
|
260
|
+
- **v1.0.2** - Access logging system (current)
|
|
261
|
+
- **v1.0.1** - Bugfix: Silent timeouts, idempotent shutdown
|
|
262
|
+
- **v1.0.0** - Initial release
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
## ๐ฏ What's Next
|
|
267
|
+
|
|
268
|
+
Planned for v1.1.0:
|
|
269
|
+
- Log file rotation
|
|
270
|
+
- Custom log formatters
|
|
271
|
+
- Metrics collection
|
|
272
|
+
- Performance dashboard
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## ๐ Documentation
|
|
277
|
+
|
|
278
|
+
Updated documentation:
|
|
279
|
+
- README.md - Updated with logging info
|
|
280
|
+
- API_REFERENCE.md - Logging configuration
|
|
281
|
+
- QUICKSTART.md - Log examples
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## ๐ Credits
|
|
286
|
+
|
|
287
|
+
Access logging designed for:
|
|
288
|
+
- Production visibility
|
|
289
|
+
- Security monitoring
|
|
290
|
+
- Developer experience
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## ๐ฅ Installation
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
# From PyPI (coming soon)
|
|
298
|
+
pip install orbit-framework
|
|
299
|
+
|
|
300
|
+
# From source
|
|
301
|
+
git clone https://github.com/yourusername/orbit.git
|
|
302
|
+
cd orbit
|
|
303
|
+
pip install -e .
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## ๐ Summary
|
|
309
|
+
|
|
310
|
+
**v1.0.2** makes Orbit production-ready with:
|
|
311
|
+
- โ
Complete access logging
|
|
312
|
+
- โ
Security event tracking
|
|
313
|
+
- โ
IP-based monitoring
|
|
314
|
+
- โ
Performance metrics
|
|
315
|
+
- โ
PyPI-ready package
|
|
316
|
+
- โ
Zero breaking changes
|
|
317
|
+
|
|
318
|
+
**Upgrade now** for better visibility and security! ๐
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
**Orbit v1.0.2** - See everything, secure everything. ๐๏ธ
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Orbit Framework
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|