Py CGRrateS
Project description
Python CGRateS Api Client
WIP
See: https://github.com/cgrates/cgrates
Install
pip install py-cgrates
Usage
from cgrates import Client
from cgrates import models
api = Client(tenant="1")
api.add_account(name="AcmeWidgets")
=> <Account(AcmeWidgets)>
api.add_destination("DST_45", prefixes=["45"])
=> <Destination(DST_64, [64])>
api.add_rates(rate_id="RT_STANDARD", rates=[models.Rate(rate=0.25, rate_unit=60, rate_increment=60)])
=> [<Rate(rate=0.25, rate_unit=60s,...)>]
api.add_destination_rates(dest_rate_id="DR_64",
dest_rates=[models.DestinationRate(rate_id="RT_STANDARD", dest_id="DST_64")])
=> [<DestinationRate(rate_id=RT_STANDARD, dest_id=DST_64,...)>]
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
py-cgrates-0.0.2.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for py_cgrates-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17f042a16bc41412c6543f8d606777f7492e4f975d7e58ec50cda98aa32f6428 |
|
MD5 | 463aa932c3144b680b221362241858f4 |
|
BLAKE2b-256 | 171cab7b15b260ba9dd6251ae60a1fab7ff7c72acbf1fd6bf550d63839709046 |