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.3.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for py_cgrates-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 999ef5cba79ce5623c5a4c61d2d0d0b79593065da560a50543c355fd49df1dfa |
|
MD5 | 72948805f8dfb2f6decc51ad106ffec9 |
|
BLAKE2b-256 | 1c7ddbf5ed3321df8c010615a9c6f8209a99c20fd272aa9811b1232be81654ac |