Skip to main content

Hopeit Engine: Microservices with Streams

Project description

## hopeit.engine

Docs: https://hopeitengine.readthedocs.io/en/latest/


### Engine development README

#### Install locally for apps or plugins development:
- Install Python, versions from 3.9 to 3.12 are currently supported
- 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, versions from 3.9 to 3.12 are currently supported
- 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
```

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hopeit_engine-0.25.4.tar.gz (73.4 kB view details)

Uploaded Source

Built Distribution

hopeit.engine-0.25.4-py3-none-any.whl (85.3 kB view details)

Uploaded Python 3

File details

Details for the file hopeit_engine-0.25.4.tar.gz.

File metadata

  • Download URL: hopeit_engine-0.25.4.tar.gz
  • Upload date:
  • Size: 73.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for hopeit_engine-0.25.4.tar.gz
Algorithm Hash digest
SHA256 e70977c8122279609741480543605e7b8fa3310a4f3db4ab0eb0879238870572
MD5 fe73b88cb0afb1f15f1fa9443d12df2f
BLAKE2b-256 e2f925791048a5a4e7c9c77e288c8ce6c5161ca2b73136c9695f2c8ed0dc7581

See more details on using hashes here.

File details

Details for the file hopeit.engine-0.25.4-py3-none-any.whl.

File metadata

File hashes

Hashes for hopeit.engine-0.25.4-py3-none-any.whl
Algorithm Hash digest
SHA256 edf78dc66db66f625743242a96dcc62d1773f00bc25a8fe04bb1aaa861c558ad
MD5 f0955b566b6855f4ac985aee6d6c5a39
BLAKE2b-256 57c4535148c2dd472b32a7ebcb69cd3b45c9c5fa0f287478eb4662438ef48448

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page