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.1.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for py_cgrates-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d929e56dd7622d2a2c31eeb0366a3e66dae0e0196717b0a4856f57884976ba1b |
|
MD5 | 2b98158da36badb7404fff9a9fb302bc |
|
BLAKE2b-256 | 84f352241e8d97a670480e57311b536a24a692ff5b4fcac15411afb67b930af2 |