togai-client


Nametogai-client JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/zuora/togai-python-client
SummaryTogai Apis
upload_time2024-12-13 07:31:39
maintainerNone
docs_urlNone
authorTogai Engineering
requires_pythonNone
licenseApache 2.0
keywords openapi openapi-generator togai apis
VCS
bugtrack_url
requirements urllib3 python_dateutil pydantic typing-extensions
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.3
For more information, please visit [https://docs.togai.com](https://docs.togai.com)

## Requirements.

Python 3.8+

## 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 datetime import datetime
from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr
from typing import Optional, Union
from typing_extensions import Annotated
from togai_client.models.account import Account
from togai_client.models.account_aliases_paginated_response import AccountAliasesPaginatedResponse
from togai_client.models.account_paginated_response import AccountPaginatedResponse
from togai_client.models.add_account_aliases_request import AddAccountAliasesRequest
from togai_client.models.base_success_response import BaseSuccessResponse
from togai_client.models.create_account_request import CreateAccountRequest
from togai_client.models.create_proposal_request import CreateProposalRequest
from togai_client.models.create_purchase_request import CreatePurchaseRequest
from togai_client.models.edit_pricing_schedule_request import EditPricingScheduleRequest
from togai_client.models.get_proposal_response import GetProposalResponse
from togai_client.models.get_purchase_response import GetPurchaseResponse
from togai_client.models.pricing_schedule_paginated_response import PricingSchedulePaginatedResponse
from togai_client.models.proposal import Proposal
from togai_client.models.proposals_paginated_response import ProposalsPaginatedResponse
from togai_client.models.purchase import Purchase
from togai_client.models.purchase_paginated_list_data import PurchasePaginatedListData
from togai_client.models.remove_account_aliases_request import RemoveAccountAliasesRequest
from togai_client.models.update_account_request import UpdateAccountRequest
from togai_client.models.update_pricing_schedule_request_with_actions import UpdatePricingScheduleRequestWithActions
from togai_client.models.update_pricing_schedule_response import UpdatePricingScheduleResponse
from togai_client.models.update_proposal_status import UpdateProposalStatus
# Defining the host is optional and defaults to https://api.togai.com
# See configuration.py for a list of all supported configuration parameters.
configuration = togai_client.Configuration(
    host = "https://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 = os.environ["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)
    account_id = 'ACC00001' # str | account_id corresponding to an account
    add_account_aliases_request = togai_client.AddAccountAliasesRequest() # AddAccountAliasesRequest | Payload to add aliases to account

    try:
        # Add Aliases to account
        api_response = api_instance.add_aliases(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/zuora/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/zuora/togai-python-client/tree/main/docs)

## Author

engg@togai.com



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/zuora/togai-python-client",
    "name": "togai-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "OpenAPI, OpenAPI-Generator, Togai Apis",
    "author": "Togai Engineering",
    "author_email": "engg@togai.com",
    "download_url": "https://files.pythonhosted.org/packages/30/87/f4e911897e91748b3f3fe2f1df7fc943249c56a0627e646e2d3c2d7cf19d/togai_client-1.0.3.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.3\nFor more information, please visit [https://docs.togai.com](https://docs.togai.com)\n\n## Requirements.\n\nPython 3.8+\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 datetime import datetime\nfrom pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr\nfrom typing import Optional, Union\nfrom typing_extensions import Annotated\nfrom togai_client.models.account import Account\nfrom togai_client.models.account_aliases_paginated_response import AccountAliasesPaginatedResponse\nfrom togai_client.models.account_paginated_response import AccountPaginatedResponse\nfrom togai_client.models.add_account_aliases_request import AddAccountAliasesRequest\nfrom togai_client.models.base_success_response import BaseSuccessResponse\nfrom togai_client.models.create_account_request import CreateAccountRequest\nfrom togai_client.models.create_proposal_request import CreateProposalRequest\nfrom togai_client.models.create_purchase_request import CreatePurchaseRequest\nfrom togai_client.models.edit_pricing_schedule_request import EditPricingScheduleRequest\nfrom togai_client.models.get_proposal_response import GetProposalResponse\nfrom togai_client.models.get_purchase_response import GetPurchaseResponse\nfrom togai_client.models.pricing_schedule_paginated_response import PricingSchedulePaginatedResponse\nfrom togai_client.models.proposal import Proposal\nfrom togai_client.models.proposals_paginated_response import ProposalsPaginatedResponse\nfrom togai_client.models.purchase import Purchase\nfrom togai_client.models.purchase_paginated_list_data import PurchasePaginatedListData\nfrom togai_client.models.remove_account_aliases_request import RemoveAccountAliasesRequest\nfrom togai_client.models.update_account_request import UpdateAccountRequest\nfrom togai_client.models.update_pricing_schedule_request_with_actions import UpdatePricingScheduleRequestWithActions\nfrom togai_client.models.update_pricing_schedule_response import UpdatePricingScheduleResponse\nfrom togai_client.models.update_proposal_status import UpdateProposalStatus\n# Defining the host is optional and defaults to https://api.togai.com\n# See configuration.py for a list of all supported configuration parameters.\nconfiguration = togai_client.Configuration(\n    host = \"https://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 = os.environ[\"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    account_id = 'ACC00001' # str | account_id corresponding to an account\n    add_account_aliases_request = togai_client.AddAccountAliasesRequest() # AddAccountAliasesRequest | Payload to add aliases to account\n\n    try:\n        # Add Aliases to account\n        api_response = api_instance.add_aliases(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/zuora/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/zuora/togai-python-client/tree/main/docs)\n\n## Author\n\nengg@togai.com\n\n\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Togai Apis",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/zuora/togai-python-client"
    },
    "split_keywords": [
        "openapi",
        " openapi-generator",
        " togai apis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a307fbf3266d7cd00387b928728262862a612c48d476a8168355453cb0c821c",
                "md5": "2301c131dd78065fa33a28f17149d7f2",
                "sha256": "f17327e2b61e3a56c5b54bc52ef7a78e424847281aa9ebbf2df4691fc2b648ac"
            },
            "downloads": -1,
            "filename": "togai_client-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2301c131dd78065fa33a28f17149d7f2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 839311,
            "upload_time": "2024-12-13T07:31:37",
            "upload_time_iso_8601": "2024-12-13T07:31:37.368030Z",
            "url": "https://files.pythonhosted.org/packages/3a/30/7fbf3266d7cd00387b928728262862a612c48d476a8168355453cb0c821c/togai_client-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3087f4e911897e91748b3f3fe2f1df7fc943249c56a0627e646e2d3c2d7cf19d",
                "md5": "88686ee27da67ad20cdb139c39e2edee",
                "sha256": "445c0be6d8c7d1db6d30685ff004d23b72f9a5d2b5df82656d453191923f8a1b"
            },
            "downloads": -1,
            "filename": "togai_client-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "88686ee27da67ad20cdb139c39e2edee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 230570,
            "upload_time": "2024-12-13T07:31:39",
            "upload_time_iso_8601": "2024-12-13T07:31:39.376751Z",
            "url": "https://files.pythonhosted.org/packages/30/87/f4e911897e91748b3f3fe2f1df7fc943249c56a0627e646e2d3c2d7cf19d/togai_client-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-13 07:31:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "zuora",
    "github_project": "togai-python-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "urllib3",
            "specs": [
                [
                    ">=",
                    "1.25.3"
                ],
                [
                    "<",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "python_dateutil",
            "specs": [
                [
                    ">=",
                    "2.8.2"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    ">=",
                    "2"
                ]
            ]
        },
        {
            "name": "typing-extensions",
            "specs": [
                [
                    ">=",
                    "4.7.1"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "togai-client"
}
        
Elapsed time: 0.48532s