Skip to main content

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 hashes)

Uploaded Source

Built Distribution

bogir-0.0.6-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

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