Expross is a lightweight web server to introduce JavaScript developers familiar with Express to Python.
Explore the docs »
Example app
·
Report Bug
·
Request Feature
NOTE: for obvious reasons, it will not be exactly the same (maybe because of language resctrictions or because it is not implemented).
Theres a lot of people that work with express.js and they whant to change to python for many diferent reasons. That is why Expross it created. To give web development from express.js users a nice and clean introduction to web development in python.
Here's why:
- Function names are very similar to express.js
- It is faster than other web frameworks
- Secure and continuesly maintained 😄
Of course, this is not a perfect project but. We have shown people with no idea of web development for python how to use this framework. They said it is the most easy framework to learn because it's similarities with express.js
Here, we will show you how easy is to run a web server in expros To get a local copy up and running follow these simple example steps.
You will need to install the package (obviously) with pip3
and run the application with python3
(wich normally comes with pip3 integrated).
Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.
- Install Expross
pip3 install Expross
... is that simple
This is an example of a hello world with Expross
# Import expross with capital leter
from expross import Expross
app = Expross()
def main(req, res):
return "<h1>Hello, world!</h1>"
def listening():
print("server live!")
app.get("/", main)
app.listen(cb=listening) # Can include a host name and port
- then, run
python3 [file].py
That is all....
For more examples, please refer to the Documentation
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.md
for more information.
Mauro Baladés - mauro.balades@tutanota.com
Project Link: https://github.com/mauro-balades/expross/