Skip to main content

No project description provided

Project description

Khidi

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

Installation

$ pip install khidi

Natura currently supports only two merchants Mima and EveryMatrix.

Supported transactions: bet, win and rollback.

Example of making transactions:

example.py

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)

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

khidi-0.0.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

khidi-0.0.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file khidi-0.0.2.tar.gz.

File metadata

  • Download URL: khidi-0.0.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for khidi-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d491cca3f9f7736fef3611264cbebdfeff68a93e2e229caef1512cac35925c5c
MD5 ec2456e3e153d03ec7af153f6b9f7d77
BLAKE2b-256 af26f315619216ecf8c466b69dcf6a7d2c45be28ca0c300cc6ec4e483b838311

See more details on using hashes here.

File details

Details for the file khidi-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: khidi-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for khidi-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9d8d3c9a42a8cf69448d0d3fbc32cb235f20b01631697a3db28f346f2a99150a
MD5 09f5950c2515ecc9269016a453965164
BLAKE2b-256 43715859c097d1a5ff37adea12927aa8aa695fd424670cc3369c3a58970e3543

See more details on using hashes here.

Supported by

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