togai-client


Nametogai-client JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/TogaiHQ/togai-python-client
SummaryTogai Apis
upload_time2022-12-16 15:48:39
maintainer
docs_urlNone
authorTogai Engineering
requires_python>=3.6
licenseApache 2.0
keywords openapi openapi-generator togai apis
VCS
bugtrack_url
requirements python_dateutil setuptools urllib3
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # togai-client
![PyPI](https://img.shields.io/pypi/v/togai-client)

[Togai](https://www.togai.com/) is an end to end pricing infrastructure that enable you with metering, aggregating, pricing and billing for your application.

This is an official Typescript client library for using [Togai APIs](https://docs.togai.com/reference).

- API version: 1.0
- Package version: 1.0.2
For more information, please visit [https://docs.togai.com](https://docs.togai.com)

## Requirements.

Python >=3.6

## Installation & Usage
### pip install

```sh
pip install togai-client
```
(you may need to run `pip` with root permission: `sudo pip install togai-client`)

Then import the package:
```python
import togai_client
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import togai_client
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:
You will need a API_TOKEN to use the API. You can get one from your Togai Account

```python

import time
import togai_client
from pprint import pprint
from togai_client.api import accounts_api
from togai_client.model.account import Account
from togai_client.model.account_paginated_response import AccountPaginatedResponse
from togai_client.model.add_account_aliases_request import AddAccountAliasesRequest
from togai_client.model.associate_price_plan_request import AssociatePricePlanRequest
from togai_client.model.associate_price_plan_response import AssociatePricePlanResponse
from togai_client.model.base_success_response import BaseSuccessResponse
from togai_client.model.create_account_request import CreateAccountRequest
from togai_client.model.error_response import ErrorResponse
from togai_client.model.remove_account_aliases_request import RemoveAccountAliasesRequest
from togai_client.model.update_account_request import UpdateAccountRequest
# Defining the host is optional and defaults to https://sandbox-api.togai.com
# See configuration.py for a list of all supported configuration parameters.
configuration = togai_client.Configuration(
    host = "https://sandbox-api.togai.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (Bearer <credential>): bearerAuth
configuration = togai_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)


# Enter a context with an instance of the API client
with togai_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = accounts_api.AccountsApi(api_client)
    customer_id =  # str | 
    account_id =  # str | 
    add_account_aliases_request = AddAccountAliasesRequest(
        aliases=[
            "aliases_example",
        ],
    ) # AddAccountAliasesRequest | Payload to add aliases to account

    try:
        # Add Aliases to account
        api_response = api_instance.add_aliases(customer_id, account_id, add_account_aliases_request)
        pprint(api_response)
    except togai_client.ApiException as e:
        print("Exception when calling AccountsApi->add_aliases: %s\n" % e)
```

You can get a detailed step-by-step guide for a sample ingestion and metering at [examples directory](https://github.com/TogaiHQ/togai-python-client/tree/main/examples)
For a more detailed documentation for every api and models, please refer to the [docs directory](https://github.com/TogaiHQ/togai-python-client/tree/main/docs)

## Author

engg@togai.com





            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/TogaiHQ/togai-python-client",
    "name": "togai-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "OpenAPI,OpenAPI-Generator,Togai Apis",
    "author": "Togai Engineering",
    "author_email": "engg@togai.com",
    "download_url": "https://files.pythonhosted.org/packages/f4/14/2d1fd0527fcdd0562283a23f456b7e5c5ec01c665d3071d2fc4f7cab1964/togai-client-1.0.2.tar.gz",
    "platform": null,
    "description": "# togai-client\n![PyPI](https://img.shields.io/pypi/v/togai-client)\n\n[Togai](https://www.togai.com/) is an end to end pricing infrastructure that enable you with metering, aggregating, pricing and billing for your application.\n\nThis is an official Typescript client library for using [Togai APIs](https://docs.togai.com/reference).\n\n- API version: 1.0\n- Package version: 1.0.2\nFor more information, please visit [https://docs.togai.com](https://docs.togai.com)\n\n## Requirements.\n\nPython >=3.6\n\n## Installation & Usage\n### pip install\n\n```sh\npip install togai-client\n```\n(you may need to run `pip` with root permission: `sudo pip install togai-client`)\n\nThen import the package:\n```python\nimport togai_client\n```\n\n### Setuptools\n\nInstall via [Setuptools](http://pypi.python.org/pypi/setuptools).\n\n```sh\npython setup.py install --user\n```\n(or `sudo python setup.py install` to install the package for all users)\n\nThen import the package:\n```python\nimport togai_client\n```\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\nYou will need a API_TOKEN to use the API. You can get one from your Togai Account\n\n```python\n\nimport time\nimport togai_client\nfrom pprint import pprint\nfrom togai_client.api import accounts_api\nfrom togai_client.model.account import Account\nfrom togai_client.model.account_paginated_response import AccountPaginatedResponse\nfrom togai_client.model.add_account_aliases_request import AddAccountAliasesRequest\nfrom togai_client.model.associate_price_plan_request import AssociatePricePlanRequest\nfrom togai_client.model.associate_price_plan_response import AssociatePricePlanResponse\nfrom togai_client.model.base_success_response import BaseSuccessResponse\nfrom togai_client.model.create_account_request import CreateAccountRequest\nfrom togai_client.model.error_response import ErrorResponse\nfrom togai_client.model.remove_account_aliases_request import RemoveAccountAliasesRequest\nfrom togai_client.model.update_account_request import UpdateAccountRequest\n# Defining the host is optional and defaults to https://sandbox-api.togai.com\n# See configuration.py for a list of all supported configuration parameters.\nconfiguration = togai_client.Configuration(\n    host = \"https://sandbox-api.togai.com\"\n)\n\n# The client must configure the authentication and authorization parameters\n# in accordance with the API server security policy.\n# Examples for each auth method are provided below, use the example that\n# satisfies your auth use case.\n\n# Configure Bearer authorization (Bearer <credential>): bearerAuth\nconfiguration = togai_client.Configuration(\n    access_token = 'YOUR_BEARER_TOKEN'\n)\n\n\n# Enter a context with an instance of the API client\nwith togai_client.ApiClient(configuration) as api_client:\n    # Create an instance of the API class\n    api_instance = accounts_api.AccountsApi(api_client)\n    customer_id =  # str | \n    account_id =  # str | \n    add_account_aliases_request = AddAccountAliasesRequest(\n        aliases=[\n            \"aliases_example\",\n        ],\n    ) # AddAccountAliasesRequest | Payload to add aliases to account\n\n    try:\n        # Add Aliases to account\n        api_response = api_instance.add_aliases(customer_id, account_id, add_account_aliases_request)\n        pprint(api_response)\n    except togai_client.ApiException as e:\n        print(\"Exception when calling AccountsApi->add_aliases: %s\\n\" % e)\n```\n\nYou can get a detailed step-by-step guide for a sample ingestion and metering at [examples directory](https://github.com/TogaiHQ/togai-python-client/tree/main/examples)\nFor a more detailed documentation for every api and models, please refer to the [docs directory](https://github.com/TogaiHQ/togai-python-client/tree/main/docs)\n\n## Author\n\nengg@togai.com\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Togai Apis",
    "version": "1.0.2",
    "split_keywords": [
        "openapi",
        "openapi-generator",
        "togai apis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "c17020087826e48b603ad9e68cd7a9ce",
                "sha256": "e193c7b5c92949bd48770b9d5d7440f05a6ed996b3fc6049d654f0b2e8271087"
            },
            "downloads": -1,
            "filename": "togai-client-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c17020087826e48b603ad9e68cd7a9ce",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 78098,
            "upload_time": "2022-12-16T15:48:39",
            "upload_time_iso_8601": "2022-12-16T15:48:39.545573Z",
            "url": "https://files.pythonhosted.org/packages/f4/14/2d1fd0527fcdd0562283a23f456b7e5c5ec01c665d3071d2fc4f7cab1964/togai-client-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-16 15:48:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "TogaiHQ",
    "github_project": "togai-python-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "python_dateutil",
            "specs": [
                [
                    ">=",
                    "2.5.3"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    ">=",
                    "21.0.0"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    ">=",
                    "1.25.3"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "togai-client"
}
        
Elapsed time: 0.02220s