Skip to main content

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)

Uploaded Source

Built Distribution

py_cgrates-0.0.3-py3-none-any.whl (5.8 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