import json, requests
URL = 'https://api.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
def get_api_data(url, params=''):
r = requests.get(url, params='okhttp/2.5.0')
if r.status_code == 200:
return r.text
else:
print('Ошибка загрузки данных!')
exit(1)
api_data = get_api_data(URL)
api_json = json.loads(api_data)
print(api_json)
import json
import requests
ace_data = requests.get('https://api.aceхххх.хх/хххххххххххххххх_api_key').content.decode('unicode-escape', 'ignore')
ace_json = json.dumps(ace_data)
ace_json_load = json.loads(ace_json)
print(ace_json_load)
requests.get('url')
.content.decode('unicode-escape', 'ignore')
ace_data = requests.get('https://api.aceхххх.хх/хххххххххххххххх_api_key').content.decode('unicode-escape', 'ignore')
.content.decode('unicode-escape', 'ignore')
\u04e7
command=python3.8 /root/besik.py
command=/usr/bin/python3 /root/besik.py
startsecs = 30
startretries=10
stopasgroup = true
priority = 999 (приоритет очерёдности загрузки процессов. По умолчанию 999 - авто)
stdout_logfile_maxbytes = 50MB - размер лог-файла (у меня 50, вы можете, как вам нужно), иначе будет писать файл, раздувая его до бесконечности и когда-нибудь увидите сообщение, что места нет!
sudo sh -c 'echo_supervisord_conf > /etc/supervisor/supervisord.conf'
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP
- не обязательно. Можно закомментить - ;nodaemon=true ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
minprocs=200
user=
user=root
;user=root
уже была, но была закомментена, то снять коммент - ;sudo supervisorctl reread; sudo supervisorctl update; sudo systemctl restart supervisor.service
sudo apt install supervisor
sudo sh -c 'echo_supervisord_conf > /etc/supervisor/supervisord.conf'
; supervisor config file
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
; The [include] section can just contain the "files" setting. This
; setting can list multiple files (separated by whitespace or
; newlines). It can also contain wildcards. The filenames are
; interpreted as relative to this file. Included files *cannot*
; include files themselves.
[include]
files = /etc/supervisor/conf.d/*.conf
ExecStart=/home/kokoto/uba/.venv/bin/python
python3-pip
python3-dev
python3-setuptools
python3-venv
/home/kokoto/uba/.venv/bin/python
/home/kokoto/uba/.venv/bin/python3
ace_json = requests.get(url_ace_json).content.decode('unicode-escape', 'ignore')
ace_json = requests.get(url_ace_json).content.decode('unicode-escape', 'ignore'), 'plain', 'utf-8'
я ответил это решением но хотелось бы установить через пип
sudo pip install ...........
sudo pip3 install ..........
sudo -H pip install ...........
sudo -H pip3 install ...........
sudo -H python3 -m pip install pyqt5