lcore 0.0.2__tar.gz → 0.0.4__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.
lcore-0.0.4/PKG-INFO ADDED
@@ -0,0 +1,154 @@
1
+ Metadata-Version: 2.4
2
+ Name: lcore
3
+ Version: 0.0.4
4
+ Summary: A fast, lightweight, single-file Python WSGI framework with zero dependencies.
5
+ Author-email: Lusan Sapkota <sapkotalusan@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://lcore.lusansapkota.com.np
8
+ Project-URL: Documentation, https://lcore.lusansapkota.com.np
9
+ Project-URL: Repository, https://github.com/Lusan-sapkota/lcore
10
+ Project-URL: Issues, https://github.com/Lusan-sapkota/lcore/issues
11
+ Project-URL: Changelog, https://github.com/Lusan-sapkota/lcore/releases
12
+ Project-URL: Playground, https://play-lcore.lusansapkota.com.np
13
+ Keywords: web,framework,wsgi,microframework,api,rest,http,server,middleware,routing
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
25
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
26
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
27
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
28
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
29
+ Requires-Python: >=3.8
30
+ Description-Content-Type: text/markdown
31
+ License-File: LICENSE
32
+ Provides-Extra: ujson
33
+ Requires-Dist: ujson; extra == "ujson"
34
+ Provides-Extra: jinja2
35
+ Requires-Dist: jinja2; extra == "jinja2"
36
+ Provides-Extra: mako
37
+ Requires-Dist: mako; extra == "mako"
38
+ Provides-Extra: gunicorn
39
+ Requires-Dist: gunicorn; extra == "gunicorn"
40
+ Provides-Extra: waitress
41
+ Requires-Dist: waitress; extra == "waitress"
42
+ Provides-Extra: gevent
43
+ Requires-Dist: gevent; extra == "gevent"
44
+ Provides-Extra: eventlet
45
+ Requires-Dist: eventlet; extra == "eventlet"
46
+ Provides-Extra: watchdog
47
+ Requires-Dist: watchdog; extra == "watchdog"
48
+ Provides-Extra: dev
49
+ Requires-Dist: pytest; extra == "dev"
50
+ Requires-Dist: ujson; extra == "dev"
51
+ Dynamic: license-file
52
+
53
+ <p align="center">
54
+ <img src="https://lcore.lusansapkota.com.np/lcore.png" alt="Lcore" width="80">
55
+ </p>
56
+
57
+ <h1 align="center">Lcore</h1>
58
+
59
+ <p align="center">
60
+ A fast, lightweight, single-file Python WSGI framework with zero dependencies.<br>
61
+ Inspired by the simplicity of <a href="https://bottlepy.org">Bottle</a>.
62
+ </p>
63
+
64
+ <p align="center">
65
+ <a href="https://lcore.lusansapkota.com.np">Documentation</a> &bull;
66
+ <a href="https://lcore.lusansapkota.com.np/getting-started.html">Getting Started</a> &bull;
67
+ <a href="https://lcore.lusansapkota.com.np/api-reference.html">API Reference</a>
68
+ </p>
69
+
70
+ <p align="center">
71
+ <img src="https://img.shields.io/badge/python-3.8%2B-blue" alt="Python 3.8+">
72
+ <img src="https://img.shields.io/badge/version-0.0.4-informational" alt="v0.0.4">
73
+ <img src="https://img.shields.io/badge/license-MIT-green" alt="MIT">
74
+ <img src="https://img.shields.io/badge/dependencies-none-brightgreen" alt="Zero Dependencies">
75
+ </p>
76
+
77
+ ---
78
+
79
+ ## Installation
80
+
81
+ ```bash
82
+ uv add lcore # uv (recommended)
83
+ pip install lcore # pip
84
+ ```
85
+
86
+ ## Quick Start
87
+
88
+ ```python
89
+ from lcore import Lcore
90
+
91
+ app = Lcore()
92
+
93
+ @app.route('/hello/<name>')
94
+ def hello(name):
95
+ return {'message': f'Hello, {name}!'}
96
+
97
+ app.run()
98
+ ```
99
+
100
+ ## Key Features
101
+
102
+ - **Single file, zero dependencies** drop `lcore.py` into any project
103
+ - **Full WSGI compliance** works with Gunicorn, uWSGI, Waitress, and 17+ server adapters
104
+ - **7 built-in middleware** CORS, CSRF, security headers, compression, body limits, request ID, logging
105
+ - **Security primitives** PBKDF2 password hashing, HMAC-SHA256 signed cookies, rate limiting
106
+ - **Dependency injection** singleton, scoped, and transient lifetimes
107
+ - **Plugin system** JSON serialization, template rendering, and custom plugins
108
+ - **Request validation** JSON body and query parameter validation with type checking
109
+ - **Built-in test client** unit test routes without starting a server
110
+ - **12 lifecycle hooks** request start, auth, handler enter/exit, response build/send, and more
111
+ - **Module mounting** compose sub-applications with isolated routes and middleware
112
+
113
+ Full documentation at **[lcore.lusansapkota.com.np](https://lcore.lusansapkota.com.np)**.
114
+
115
+ ## Performance
116
+
117
+ Benchmarked with 100,000 iterations × 3 runs per framework (best run recorded), single process, no I/O, measuring pure framework overhead:
118
+
119
+ | Framework | JSON (req/s) | Plaintext (req/s) |
120
+ |-----------|-------------|-------------------|
121
+ | Lcore | 91,917 | 116,794 |
122
+ | Flask 3.1.3 | 22,757 | 25,497 |
123
+ | Bottle 0.13.4 | 138,299 | 187,334 |
124
+
125
+ Lcore processes **2.2x – 4.6x** more requests per second than Flask across 7 test scenarios (plaintext, JSON, route params, middleware stack, 404 miss, multi-route dispatch, POST JSON). See the [full benchmarks](https://lcore.lusansapkota.com.np/#performance) for details.
126
+
127
+ Run the benchmarks yourself:
128
+ ```bash
129
+ pip install flask bottle
130
+ cd benchmarks && python benchmark.py --full
131
+ ```
132
+
133
+ ## When NOT to Use Lcore
134
+
135
+ | Situation | Better choice |
136
+ |-----------|---------------|
137
+ | You need WebSockets or real-time async I/O | FastAPI, Starlette, Quart |
138
+ | You need true async concurrency (async DB drivers, hundreds of concurrent outbound HTTP calls) | FastAPI, Starlette |
139
+ | You need automatic OpenAPI / Swagger generation | FastAPI |
140
+ | You need ASGI and Uvicorn / Daphne | FastAPI, Starlette |
141
+ | You need a full MVC framework with ORM, admin panel, and migrations | Django |
142
+ | Your team is already on Flask and migration cost outweighs the benefit | Stay on Flask |
143
+
144
+ If your workload is primarily synchronous REST APIs, internal services, microservices with sync DB drivers Lcore is a strong fit.
145
+
146
+ ## License
147
+
148
+ MIT see [LICENSE](LICENSE) for details.
149
+
150
+ ---
151
+
152
+ <p align="center">
153
+ Built by <a href="https://lusansapkota.com.np">Lusan Sapkota</a> &bull; Inspired by <a href="https://bottlepy.org">Bottle</a>
154
+ </p>
lcore-0.0.4/README.md ADDED
@@ -0,0 +1,102 @@
1
+ <p align="center">
2
+ <img src="https://lcore.lusansapkota.com.np/lcore.png" alt="Lcore" width="80">
3
+ </p>
4
+
5
+ <h1 align="center">Lcore</h1>
6
+
7
+ <p align="center">
8
+ A fast, lightweight, single-file Python WSGI framework with zero dependencies.<br>
9
+ Inspired by the simplicity of <a href="https://bottlepy.org">Bottle</a>.
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="https://lcore.lusansapkota.com.np">Documentation</a> &bull;
14
+ <a href="https://lcore.lusansapkota.com.np/getting-started.html">Getting Started</a> &bull;
15
+ <a href="https://lcore.lusansapkota.com.np/api-reference.html">API Reference</a>
16
+ </p>
17
+
18
+ <p align="center">
19
+ <img src="https://img.shields.io/badge/python-3.8%2B-blue" alt="Python 3.8+">
20
+ <img src="https://img.shields.io/badge/version-0.0.4-informational" alt="v0.0.4">
21
+ <img src="https://img.shields.io/badge/license-MIT-green" alt="MIT">
22
+ <img src="https://img.shields.io/badge/dependencies-none-brightgreen" alt="Zero Dependencies">
23
+ </p>
24
+
25
+ ---
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ uv add lcore # uv (recommended)
31
+ pip install lcore # pip
32
+ ```
33
+
34
+ ## Quick Start
35
+
36
+ ```python
37
+ from lcore import Lcore
38
+
39
+ app = Lcore()
40
+
41
+ @app.route('/hello/<name>')
42
+ def hello(name):
43
+ return {'message': f'Hello, {name}!'}
44
+
45
+ app.run()
46
+ ```
47
+
48
+ ## Key Features
49
+
50
+ - **Single file, zero dependencies** drop `lcore.py` into any project
51
+ - **Full WSGI compliance** works with Gunicorn, uWSGI, Waitress, and 17+ server adapters
52
+ - **7 built-in middleware** CORS, CSRF, security headers, compression, body limits, request ID, logging
53
+ - **Security primitives** PBKDF2 password hashing, HMAC-SHA256 signed cookies, rate limiting
54
+ - **Dependency injection** singleton, scoped, and transient lifetimes
55
+ - **Plugin system** JSON serialization, template rendering, and custom plugins
56
+ - **Request validation** JSON body and query parameter validation with type checking
57
+ - **Built-in test client** unit test routes without starting a server
58
+ - **12 lifecycle hooks** request start, auth, handler enter/exit, response build/send, and more
59
+ - **Module mounting** compose sub-applications with isolated routes and middleware
60
+
61
+ Full documentation at **[lcore.lusansapkota.com.np](https://lcore.lusansapkota.com.np)**.
62
+
63
+ ## Performance
64
+
65
+ Benchmarked with 100,000 iterations × 3 runs per framework (best run recorded), single process, no I/O, measuring pure framework overhead:
66
+
67
+ | Framework | JSON (req/s) | Plaintext (req/s) |
68
+ |-----------|-------------|-------------------|
69
+ | Lcore | 91,917 | 116,794 |
70
+ | Flask 3.1.3 | 22,757 | 25,497 |
71
+ | Bottle 0.13.4 | 138,299 | 187,334 |
72
+
73
+ Lcore processes **2.2x – 4.6x** more requests per second than Flask across 7 test scenarios (plaintext, JSON, route params, middleware stack, 404 miss, multi-route dispatch, POST JSON). See the [full benchmarks](https://lcore.lusansapkota.com.np/#performance) for details.
74
+
75
+ Run the benchmarks yourself:
76
+ ```bash
77
+ pip install flask bottle
78
+ cd benchmarks && python benchmark.py --full
79
+ ```
80
+
81
+ ## When NOT to Use Lcore
82
+
83
+ | Situation | Better choice |
84
+ |-----------|---------------|
85
+ | You need WebSockets or real-time async I/O | FastAPI, Starlette, Quart |
86
+ | You need true async concurrency (async DB drivers, hundreds of concurrent outbound HTTP calls) | FastAPI, Starlette |
87
+ | You need automatic OpenAPI / Swagger generation | FastAPI |
88
+ | You need ASGI and Uvicorn / Daphne | FastAPI, Starlette |
89
+ | You need a full MVC framework with ORM, admin panel, and migrations | Django |
90
+ | Your team is already on Flask and migration cost outweighs the benefit | Stay on Flask |
91
+
92
+ If your workload is primarily synchronous REST APIs, internal services, microservices with sync DB drivers Lcore is a strong fit.
93
+
94
+ ## License
95
+
96
+ MIT see [LICENSE](LICENSE) for details.
97
+
98
+ ---
99
+
100
+ <p align="center">
101
+ Built by <a href="https://lusansapkota.com.np">Lusan Sapkota</a> &bull; Inspired by <a href="https://bottlepy.org">Bottle</a>
102
+ </p>
@@ -0,0 +1,154 @@
1
+ Metadata-Version: 2.4
2
+ Name: lcore
3
+ Version: 0.0.4
4
+ Summary: A fast, lightweight, single-file Python WSGI framework with zero dependencies.
5
+ Author-email: Lusan Sapkota <sapkotalusan@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://lcore.lusansapkota.com.np
8
+ Project-URL: Documentation, https://lcore.lusansapkota.com.np
9
+ Project-URL: Repository, https://github.com/Lusan-sapkota/lcore
10
+ Project-URL: Issues, https://github.com/Lusan-sapkota/lcore/issues
11
+ Project-URL: Changelog, https://github.com/Lusan-sapkota/lcore/releases
12
+ Project-URL: Playground, https://play-lcore.lusansapkota.com.np
13
+ Keywords: web,framework,wsgi,microframework,api,rest,http,server,middleware,routing
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
25
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
26
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
27
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
28
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
29
+ Requires-Python: >=3.8
30
+ Description-Content-Type: text/markdown
31
+ License-File: LICENSE
32
+ Provides-Extra: ujson
33
+ Requires-Dist: ujson; extra == "ujson"
34
+ Provides-Extra: jinja2
35
+ Requires-Dist: jinja2; extra == "jinja2"
36
+ Provides-Extra: mako
37
+ Requires-Dist: mako; extra == "mako"
38
+ Provides-Extra: gunicorn
39
+ Requires-Dist: gunicorn; extra == "gunicorn"
40
+ Provides-Extra: waitress
41
+ Requires-Dist: waitress; extra == "waitress"
42
+ Provides-Extra: gevent
43
+ Requires-Dist: gevent; extra == "gevent"
44
+ Provides-Extra: eventlet
45
+ Requires-Dist: eventlet; extra == "eventlet"
46
+ Provides-Extra: watchdog
47
+ Requires-Dist: watchdog; extra == "watchdog"
48
+ Provides-Extra: dev
49
+ Requires-Dist: pytest; extra == "dev"
50
+ Requires-Dist: ujson; extra == "dev"
51
+ Dynamic: license-file
52
+
53
+ <p align="center">
54
+ <img src="https://lcore.lusansapkota.com.np/lcore.png" alt="Lcore" width="80">
55
+ </p>
56
+
57
+ <h1 align="center">Lcore</h1>
58
+
59
+ <p align="center">
60
+ A fast, lightweight, single-file Python WSGI framework with zero dependencies.<br>
61
+ Inspired by the simplicity of <a href="https://bottlepy.org">Bottle</a>.
62
+ </p>
63
+
64
+ <p align="center">
65
+ <a href="https://lcore.lusansapkota.com.np">Documentation</a> &bull;
66
+ <a href="https://lcore.lusansapkota.com.np/getting-started.html">Getting Started</a> &bull;
67
+ <a href="https://lcore.lusansapkota.com.np/api-reference.html">API Reference</a>
68
+ </p>
69
+
70
+ <p align="center">
71
+ <img src="https://img.shields.io/badge/python-3.8%2B-blue" alt="Python 3.8+">
72
+ <img src="https://img.shields.io/badge/version-0.0.4-informational" alt="v0.0.4">
73
+ <img src="https://img.shields.io/badge/license-MIT-green" alt="MIT">
74
+ <img src="https://img.shields.io/badge/dependencies-none-brightgreen" alt="Zero Dependencies">
75
+ </p>
76
+
77
+ ---
78
+
79
+ ## Installation
80
+
81
+ ```bash
82
+ uv add lcore # uv (recommended)
83
+ pip install lcore # pip
84
+ ```
85
+
86
+ ## Quick Start
87
+
88
+ ```python
89
+ from lcore import Lcore
90
+
91
+ app = Lcore()
92
+
93
+ @app.route('/hello/<name>')
94
+ def hello(name):
95
+ return {'message': f'Hello, {name}!'}
96
+
97
+ app.run()
98
+ ```
99
+
100
+ ## Key Features
101
+
102
+ - **Single file, zero dependencies** drop `lcore.py` into any project
103
+ - **Full WSGI compliance** works with Gunicorn, uWSGI, Waitress, and 17+ server adapters
104
+ - **7 built-in middleware** CORS, CSRF, security headers, compression, body limits, request ID, logging
105
+ - **Security primitives** PBKDF2 password hashing, HMAC-SHA256 signed cookies, rate limiting
106
+ - **Dependency injection** singleton, scoped, and transient lifetimes
107
+ - **Plugin system** JSON serialization, template rendering, and custom plugins
108
+ - **Request validation** JSON body and query parameter validation with type checking
109
+ - **Built-in test client** unit test routes without starting a server
110
+ - **12 lifecycle hooks** request start, auth, handler enter/exit, response build/send, and more
111
+ - **Module mounting** compose sub-applications with isolated routes and middleware
112
+
113
+ Full documentation at **[lcore.lusansapkota.com.np](https://lcore.lusansapkota.com.np)**.
114
+
115
+ ## Performance
116
+
117
+ Benchmarked with 100,000 iterations × 3 runs per framework (best run recorded), single process, no I/O, measuring pure framework overhead:
118
+
119
+ | Framework | JSON (req/s) | Plaintext (req/s) |
120
+ |-----------|-------------|-------------------|
121
+ | Lcore | 91,917 | 116,794 |
122
+ | Flask 3.1.3 | 22,757 | 25,497 |
123
+ | Bottle 0.13.4 | 138,299 | 187,334 |
124
+
125
+ Lcore processes **2.2x – 4.6x** more requests per second than Flask across 7 test scenarios (plaintext, JSON, route params, middleware stack, 404 miss, multi-route dispatch, POST JSON). See the [full benchmarks](https://lcore.lusansapkota.com.np/#performance) for details.
126
+
127
+ Run the benchmarks yourself:
128
+ ```bash
129
+ pip install flask bottle
130
+ cd benchmarks && python benchmark.py --full
131
+ ```
132
+
133
+ ## When NOT to Use Lcore
134
+
135
+ | Situation | Better choice |
136
+ |-----------|---------------|
137
+ | You need WebSockets or real-time async I/O | FastAPI, Starlette, Quart |
138
+ | You need true async concurrency (async DB drivers, hundreds of concurrent outbound HTTP calls) | FastAPI, Starlette |
139
+ | You need automatic OpenAPI / Swagger generation | FastAPI |
140
+ | You need ASGI and Uvicorn / Daphne | FastAPI, Starlette |
141
+ | You need a full MVC framework with ORM, admin panel, and migrations | Django |
142
+ | Your team is already on Flask and migration cost outweighs the benefit | Stay on Flask |
143
+
144
+ If your workload is primarily synchronous REST APIs, internal services, microservices with sync DB drivers Lcore is a strong fit.
145
+
146
+ ## License
147
+
148
+ MIT see [LICENSE](LICENSE) for details.
149
+
150
+ ---
151
+
152
+ <p align="center">
153
+ Built by <a href="https://lusansapkota.com.np">Lusan Sapkota</a> &bull; Inspired by <a href="https://bottlepy.org">Bottle</a>
154
+ </p>
@@ -0,0 +1,5 @@
1
+ build
2
+ dist
3
+ lcore
4
+ production_analysis
5
+ uploads