-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
60 lines (37 loc) · 1.47 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Xaspy's webserver Xio version 1 02/01/2021
GENERAL USAGE NOTES:
--------------------
This is a simple web-framework, which realised routes.
This program can handle requests.
For using web-framework you should:
from webserver import Xio
Further create object of webserver with his name by first argument:
app = Xio(__name__)
Create routes to your project, firstly choose path to thing, secondly choose
methods available for this (default: methods= ('GET', 'POST', 'DELETE', 'PUT')):
@app.route('/some-path', ['GET'])
async def some_throw():
return 'Hello, my friend!'
You can create parametric routes:
@app.route('/lol/<key>')
async def get_second_argument(key):
return key
Nextly runs server!:
app.run(port=80, host='localhost', is_debug=False,
is_comp=False, is_ssl=False, cert='selfsigned.cert',
key='selfsigned.key', connection_timeout=0.0001)
port - port of server
host - address of server
is_debug - debug mode which can give you more information about working server
is_comp - compress mode which can compress data by gzip
is_ssl - creates https server
cert - cert file for ssl
key - key file for ssl
connection_timeout - set timeout for connection
----------------------------------------------------------------
This script works under Linux, MacOS, Windows by Python 3.
================================================================
Contacts:
Voice: +79527326662
VK: vk.com/xaspy
E-mail: [email protected]