Merge branch 'develop'

pull/142/MERGE
13621160019@163.com 2022-03-21 17:51:48 +08:00
commit c1bba9eefe
3 changed files with 41 additions and 0 deletions

View File

@ -32,6 +32,7 @@ python-decouple
## Quick Run for Development
Quick run on Linux (NOT for production use):
```bash
cd myems/myems-api
sudo pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
@ -40,6 +41,26 @@ sudo chmod +x run.sh
./run.sh
```
Quick run on Windows (NOT for production use):
Find python path in Command Prompt:
```bash
where python
```
Assume the result is 'C:\Users\johnson\AppData\Local\Programs\Python\Python310\python.exe'
Copy fcntl.py and pwd.py to lib folder:
```bash
cp myems\myems-api\fcntl.py C:\Users\johnson\AppData\Local\Programs\Python\Python310\Lib
cp myems\myems-api\pwd.py C:\Users\johnson\AppData\Local\Programs\Python\Python310\Lib
```
Install and run with waitress:
```bash
pip install waitress
cd myems\myems-api
waitress-serve --listen=127.0.0.1:8000 app:api
```
## Installation
### Installation Option 1: Install myems-api on Docker
@ -2672,6 +2693,8 @@ curl -i -X GET {{base_url}}/reports/virtualmetercost?virtualmeterid=1&periodtype
[8]. https://foss.heptapod.net/openpyxl/et_xmlfile/
[9]. https://docs.pylonsproject.org/projects/waitress/en/latest/

17
myems-api/fcntl.py Normal file
View File

@ -0,0 +1,17 @@
def fcntl(fd, op, arg=0):
return 0
def ioctl(fd, op, arg=0, mutable_flag=True):
if mutable_flag:
return 0
else:
return ""
def flock(fd, op):
return
def lockf(fd, operation, length=0, start=0, whence=0):
return

1
myems-api/pwd.py Normal file
View File

@ -0,0 +1 @@
# left blank intentionally