Metadata-Version: 2.1
Name: khidi
Version: 0.0.1
Author: MIMA GAMES
Author-email: 
License: MIT
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.11.0
Description-Content-Type: text/markdown
Requires-Dist: pyhumps (==3.8.0)
Requires-Dist: requests (==2.28.1)


# Natura


Natura is little library which handles sending transactions to casino cores.

## Installation


```console
$ pip install khidi
```

Natura currently supports only two merchants Mima and EveryMatrix.

Supported transactions: bet, win and rollback.


Example of making transactions:

**example.py**

```python

from khidi import MerchantFactory

"""
First argument in MerchantFactory is merchant_name currently you have only two options: mima and everymatrix.
Second argument is schema_type you have four options here:

'decamelize': [{"attrOne": "foo"}, {"attrOne": "bar"}] ->  [{"attr_one": "foo"}, {"attr_one": "bar"}]
'camelize': [{"attr_one": "foo"}, {"attr_one": "bar"}] -> [{"attrOne": "foo"}, {"attrOne": "bar"}]
'kebabize': [{'attr_one': 'foo'}, {'attr_one': 'bar'}] -> [{'attr-one': 'foo'}, {'attr-one': 'bar'}]
'pascalize': [{"attr_one": "foo"}, {"attr_one": "bar"}] -> [{"AttrOne": "foo"}, {"AttrOne": "bar"}]
"""

player_obj = {
	"_id":"507f1f77bcf86cd799439011",
	"bet": 100,
	"round_id": "test_round",
	"game_id": "test_game_id"
}

merchant = MerchantFactory.build_merchant("everymatrix", "camelize")
merchant.send_bet("https://merchant/bet", 100, player)
merchant.send_win("https://merchant/win", 100, player)
merchant.send_rollback("https://merchant/rollback", 100, player)
```
