Skip to content

Commit b69a35a

Browse files
committed
Pipy registry added
1 parent 37a26fe commit b69a35a

19 files changed

Lines changed: 110 additions & 39 deletions

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
__pycache__
22
.env
33
.vscode
4-
00testing
4+
configs
5+
build
6+
dist
7+
express_server.egg-info
8+
work

LICENSE

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
(The MIT License)
2+
3+
Copyright (c) 2024-2024 Avinash Tare <avinashtare.work@gmail.com>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include README.md
2+
include LICENSE
3+
include express_server/*

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Express-Server
2+
3+
Express-Server is a lightweight and fast web server for Python, inspired by the simplicity of Express.js.
4+
5+
![images](https://camo.githubusercontent.com/f6128b6a17c28ec054b7ab67e595d39f503a0e17b116901141c05e1a1016985a/68747470733a2f2f692e636c6f756475702e636f6d2f7a6659366c4c376546612d3330303078333030302e706e67)
6+
7+
**Simple Syntax**
8+
```python
9+
from express_server import express
10+
app = express()
11+
12+
def home(req,res,next):
13+
return res.send("Hello World")
14+
15+
app.get("/",home)
16+
17+
app.listen(3000)
18+
```
19+
20+
### Installation
21+
22+
This is a [Python](https://python.org/) library available through the pip registry.
23+
24+
Before installing, download and install [python](https://www.python.org/downloads/). Python 3.1 or higher is required.
25+
26+
Installation is done using the pip command:
27+
```shell
28+
$ pip install express-server
29+
```
30+
31+
#### 🛠️ **This project is currently in development! Use For Fun**
32+
33+
We are actively working on improving and expanding this project. While many features are functional, there may be bugs or incomplete functionality. If you encounter any issues or have suggestions, feel free to open an issue or contribute to the development.
34+
35+
#### Security Notice
36+
37+
🔒 **This project is not intended for production use, and it may not be secure.**
38+
39+
As a work in progress, security considerations have not been fully addressed. Avoid using this project in a production environment or with sensitive data.
40+
41+
#### Links
42+
PyPI Releases: https://pypi.org/project/express-server/
43+
Github Code: https://github.com/avinashtare/express-server-python

express.py renamed to express_server/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from lib.http_server import Server,UserRoutes
2-
from lib.utils.express import ServerListenerHandler
1+
from .lib.http_server import Server,UserRoutes
2+
from .lib.utils.express import ServerListenerHandler
33

44
class express:
55
# get request

lib/control_routes/control_routes.py renamed to express_server/lib/control_routes/control_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from lib.control_routes.route_cluster import RouteCluster
1+
from .route_cluster import RouteCluster
22

33
class ControlRoutes:
44
def __init__(self):
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from http.server import BaseHTTPRequestHandler, HTTPServer
2-
from lib.control_routes.control_routes import ControlRoutes
3-
from lib.route_handler.handle_routes import HandleRoutes
4-
from lib.utils.express import set_host__name,check_port_open
2+
from .control_routes.control_routes import ControlRoutes
3+
from .route_handler.handle_routes import HandleRoutes
4+
from .utils.express import set_host__name,check_port_open
55
from socketserver import ThreadingMixIn
66

77
# all routes

lib/route_handler/handle_routes.py renamed to express_server/lib/route_handler/handle_routes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from lib.utils.pages import Pages
2-
from lib.routes.RequestRoute import RequestRoute
3-
from lib.routes.ResponseRoute import ResponseRoute
1+
from ..utils.pages import Pages
2+
from ..routes.RequestRoute import RequestRoute
3+
from ..routes.ResponseRoute import ResponseRoute
44
import traceback
55

66
# add new pages

0 commit comments

Comments
 (0)