boring-1.0.2
توضیحات
A small HTTP web server for wsgi compatible apps
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | boring-1.0.2 |
| نام | boring |
| نسخه کتابخانه | 1.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Horlarwumhe |
| ایمیل نویسنده | amachiever4real@gmail.com |
| آدرس صفحه اصلی | https://github.com/horlarwumhe/boring |
| آدرس اینترنتی | https://pypi.org/project/boring/ |
| مجوز | - |
### Boring
A simple [HTTP](https://en.m.wikipedia.org/wiki/Hypertext_Transfer_Protocol) webserver for [WSGI]( https://en.m.wikipedia.org/wiki/Web_Server_Gateway_Interface) compatible web app,
support any wsgi web framework , django,flask, bottle and others. It is fairly fast .........
### installation
boring has no dependency except python standard library, so it can be installed by cloning this repository , then run python setup.py install , or install from `pypi` with `pip install boring`.
## Starting the server
`boring myapp:app` or `python -m boring myapp:app`
Assuming there is myapp.py in the current directory and and a callable object `app` in myapp.py.
Using with django
`boring yourproject.wsgi` or `python -m boring yourproject.wsgi`
you can serve current directory on http instead of web app, with `boring . ` , the current directory will be served on http
## Command Line Options
usage: boring [-h] [-p PORT] [--reload] [-b BIND] [--use-config] [-v] app
positional arguments:
app wsgi app to load
optional arguments:
-h, --help show this help message and exit
-p PORT, --port PORT port number to use, default 8000
--reload enable auto reload
-b BIND, --bind BIND bind to this address
--use-config use configuration for boring
-v, --version show program's version number and exit
## Serving Static Files
boring can be configured to serve static files (js,css,images and others). to serve static files ,create a file `boring.config` and add the following to the config file
` STATIC_URL=url # url for serving files eg /static/ for django and others`
` STATIC_ROOT=path # folder where to find static files`
then add `--use-config` to the command line argument when starting the server
### Boring In Action
[test-boring.herokuapp.com](http://test-boring.herokuapp.com) , is flask webapp copied from [miguelgrinberg blog](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world) running boring as http server
[firdawss.herokuapp.com](http://firdawss.herokuapp.com) a django powered site running boring as the webserver
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl boring-1.0.2:
pip install boring-1.0.2.whl
نصب پکیج tar.gz boring-1.0.2:
pip install boring-1.0.2.tar.gz