## hopeit.engine
Docs: https://hopeitengine.readthedocs.io/en/latest/
### Engine development README
#### Install locally for apps or plugins development:
- Install python 3.8
- Create and activate a virtual environment (recommended)
- Run from hopeit.engine project root
```
make dev-deps && make install
```
- Now hopeit.engine package should be installed into your virtual/conda env linked to the source code in ./src
- Then you can create your apps or plugins and run the server
#### Install from Python Package Index
- Install python 3.8
- Create and activate a virtual environment (recommended)
- Install hopeit.engine
Install core hopeit.engine lib:
```
pip install "hopeit.engine"
```
Install extras needed to run as a server and command line tools:
```
pip install "hopeit.engine[web,cli]"
```
#### Configure
- Create server configuration json file
- See [configuration examples](./config/)
- Create apps configuration and python files
- See [apps examples](../apps/examples/)
- Optionally you can develop plugins, similar to apps but can be shared
- See available [plugins](../plugins/)
#### Start http server
- Example starting a single app/microservice
```
python -m hopeit.server.web --config-files=server-config.json,app-folder/config/app-config.json
```
- Additional options:
```
--config-files: comma-separated file of config files to load, starting with server config, then plugins, then apps
--api-file: path to openapi complaint json specification
--host: server host address or name, default is --host=0.0.0.0
--port: indicates to listen on another port number, default is --port=8020
--path: indicates to listen in a unix socket path, default is disabled
--start-streams: indicates to auomatically start events of type STREAM when starting server
```
- Example starting a single app that depends on plugins:
```
python engine/server/web.py --config-files=server-config.json,plugin-foler/config/plugin-config.json,app-folder/config/app-config.json
```
### Tools for Engine Development
- To install development dependencies, from engine folder run:
```
make dev
```
- To run tests
```
make test
```
- To run static code checks (types, style)
```
make check
```
- To create distribution library (hopeit.engine)
```
make dist
```
- To install engine in local python environment
```
make install
```
- Examples: to install plugin or app in virtual environment
- to use existing app and plugins, you will need to obtain also a configuration file for each app and plugin. install-app will only install source code.
```
make PLUGINFOLDER=plugins/auth/basic-auth install-plugin
make APPFOLDER=apps/examples/simple-example install-app
```
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共51个文件
py:42个
txt:5个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:hopeit.engine-0.2.0rc1.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
hopeit.engine-0.2.0rc1.tar.gz (51个子文件)
hopeit.engine-0.2.0rc1
PKG-INFO 5KB
src
hopeit.engine.egg-info
PKG-INFO 5KB
requires.txt 369B
SOURCES.txt 1KB
entry_points.txt 104B
top_level.txt 7B
dependency_links.txt 1B
hopeit
server
serialization.py 2KB
imports.py 904B
events.py 6KB
engine.py 25KB
web.py 25KB
logger.py 10KB
metrics.py 6KB
names.py 809B
errors.py 871B
streams.py 13KB
__init__.py 1KB
steps.py 15KB
config.py 7KB
api.py 24KB
collector.py 4KB
version.py 113B
compression.py 2KB
dataobjects
__init__.py 7KB
validation.py 9KB
jsonify.py 3KB
toolkit
auth.py 5KB
web.py 517B
validators.py 4KB
storage
redis.py 2KB
fs.py 3KB
__init__.py 251B
__init__.py 375B
testing
encryption.py 703B
apps.py 9KB
__init__.py 380B
hooks.py 3KB
app
events.py 4KB
logger.py 1KB
errors.py 592B
__init__.py 591B
context.py 6KB
config.py 10KB
api.py 9KB
cli
server.py 1KB
openapi.py 5KB
__init__.py 271B
setup.cfg 38B
setup.py 3KB
README.md 3KB
共 51 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功