semvec/pypi-packages huggingface dataset:
djungle-rulesengine-client 0.4.0
A client to Djungle Studio rulesengine API
License: MIT

# djungle-rulesengine-client
A client to Djungle Studio rulesengine API


## Tests
This project uses `tox` to run the test suite:
simply run the command `tox` in the root of the repository.

## Release
This project uses `tox` to release a version to PyPI.
Run `tox -e release -- <env>`, where `<env>` is an index identifier in
your `~/.pypirc` file.

Alternatively, push a tag to the `main` branch to make a release
using GitHub Actions.

## Usage examples
```python
from rulesengine.async_client import AsyncEngineClient
from rulesengine.client import EngineClient

engine = EngineClient(base_url="https://example.com", token="abcde")

# To push an action to the engine:
engine.push_action(subject_id="sys-1", action="my-action", payload={"key": "value"})

# To get a pluggable prop from the engine
prop_value = engine.get_pluggable_props(subject_id="sys-1", props="my-prop")

# To make a "direct" call to the engine
return_value = engine.direct_post(
    subject_id="sys-1", path="/my/path/", params={"key": "value"}, data={"my": "payload"}
)

# To push an action to the engine (async client):
async_engine = AsyncEngineClient(base_url="https://example.com", token="abcde")

await async_engine.push_action(subject_id="sys-1", action="my-action", payload={"key": "value"})
```

MIT License

Copyright (c) 2023 Djungle s.r.l.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.