No project description provided
Project description
Bogir
Bogir is little library which handles sending transactions to casino cores.
Installation
$ pip install bogir
Natura currently supports only two merchants Mima and EveryMatrix.
Supported transactions: bet, win and rollback.
Example of making transactions:
example.py
from bogir 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)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bogir-0.0.6.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
bogir-0.0.6-py3-none-any.whl
(5.6 kB
view details)
File details
Details for the file bogir-0.0.6.tar.gz.
File metadata
- Download URL: bogir-0.0.6.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24e8cb063b743bef47825ac46c801c818ffd4071c6cfbe67f39b8eb4ae5744d8
|
|
| MD5 |
ecaf72a7da96958bbc88c6705e90c456
|
|
| BLAKE2b-256 |
ea285d8d614b6e69e3748f9d90613185e06cb9bf0bf4dcb8a496330f4b4f5889
|
File details
Details for the file bogir-0.0.6-py3-none-any.whl.
File metadata
- Download URL: bogir-0.0.6-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb96796d451e1e8e82c6241e744fbe51acde9fd705905a30d9b621ee6d4da31d
|
|
| MD5 |
e0b9209c5b781266a68c93711d916a69
|
|
| BLAKE2b-256 |
241ff6a89d7c80e3be01f1a4829119eb432dfffb7a273c8a4cb09aa96bbb3a22
|