ubersmith-api


Nameubersmith-api JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryVersion-specific Python 3 wrapper for the Ubersmith API
upload_time2025-10-07 02:35:10
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords api wrapper ubersmith client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python Ubersmith
[![Pypi](https://img.shields.io/pypi/v/ubersmith-api)](https://pypi.org/project/ubersmith-api)
[![MIT licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://raw.githubusercontent.com/bnassif/ubersmith-api/main/LICENSE)
![GitHub Release Date](https://img.shields.io/github/release-date/bnassif/ubersmith-api)

A fully-featured API wrapper for the [Ubersmith](https://ubersmith.com/) API

Python wrappers exist on PyPI and across GitHub for interacting with the Ubersmith API, but each of them fails to provide full compatibility.

In comes `ubersmith-api`...

## Overview

At its core, this package provides a generic API wrapper class, `UbersmithClient` which allows for uncontrolled calls to an Ubersmith instance.

Built atop this wrapper, a templating suite is available for generating classes for each API section in Ubersmith, specific to each Ubersmith version to maximize compatibility.

## Installation

```bash
# PyPi Installation
pip install ubersmith-api
# GitHub Installation
pip install git+'https://github.com/bnassif/ubersmith-api.git'
```

## Getting Started

### Instantiating the Base Client
```python
from ubersmith import *

config = UbersmithConfig(
    host='target-hostname-or-address',
    username='username-to-use',
    password='api-token-for-user',
)

client = UbersmithClient(config)
```

### Making Calls

```python
response_obj = client.request(
    'uber.method_get',
    data={
        'method_name': 'client.get',
    },
    #raw=True,
)
```

By default, the `request()` method will parse the response from the API, checking for HTTP error codes, as well as error messages from Ubersmith itself. If no errors are found, the returned `data` field is returned.

Alternatively, you can parse `raw=True` to return the `requests.Response` object for manual parsing and error checking.

### Shipped Methods
The `UbersmithClient` class comes with three (3) core methods shipped.  
These offer a simplified entrypoint to gathering parsed information of an Ubersmith system.

```python
# Get system information: calls `uber.system_info`
sys_info = client.system_info()

# Get all available methods: calls `uber.method_list`
all_methods = client.method_list()

# Get details of one method: calls `uber.method_get`
method_details = client.method_get('client.get')
```

## Future Compatibility

**NOTE**: 

Additional code is shipped in this repository, along with version-specific schemas for the Ubersmith API.  
These features will be enabled in later releases of the package.

## License
MIT - Feel free to use, extend, and contribute.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ubersmith-api",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "api, wrapper, ubersmith, client",
    "author": null,
    "author_email": "Ben Nassif <bennassif@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/6d/44/cbc4869f944d5eccaac1597c87934c62c3011df99f83a17d3cb59447ab73/ubersmith_api-1.0.1.tar.gz",
    "platform": null,
    "description": "# Python Ubersmith\n[![Pypi](https://img.shields.io/pypi/v/ubersmith-api)](https://pypi.org/project/ubersmith-api)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://raw.githubusercontent.com/bnassif/ubersmith-api/main/LICENSE)\n![GitHub Release Date](https://img.shields.io/github/release-date/bnassif/ubersmith-api)\n\nA fully-featured API wrapper for the [Ubersmith](https://ubersmith.com/) API\n\nPython wrappers exist on PyPI and across GitHub for interacting with the Ubersmith API, but each of them fails to provide full compatibility.\n\nIn comes `ubersmith-api`...\n\n## Overview\n\nAt its core, this package provides a generic API wrapper class, `UbersmithClient` which allows for uncontrolled calls to an Ubersmith instance.\n\nBuilt atop this wrapper, a templating suite is available for generating classes for each API section in Ubersmith, specific to each Ubersmith version to maximize compatibility.\n\n## Installation\n\n```bash\n# PyPi Installation\npip install ubersmith-api\n# GitHub Installation\npip install git+'https://github.com/bnassif/ubersmith-api.git'\n```\n\n## Getting Started\n\n### Instantiating the Base Client\n```python\nfrom ubersmith import *\n\nconfig = UbersmithConfig(\n    host='target-hostname-or-address',\n    username='username-to-use',\n    password='api-token-for-user',\n)\n\nclient = UbersmithClient(config)\n```\n\n### Making Calls\n\n```python\nresponse_obj = client.request(\n    'uber.method_get',\n    data={\n        'method_name': 'client.get',\n    },\n    #raw=True,\n)\n```\n\nBy default, the `request()` method will parse the response from the API, checking for HTTP error codes, as well as error messages from Ubersmith itself. If no errors are found, the returned `data` field is returned.\n\nAlternatively, you can parse `raw=True` to return the `requests.Response` object for manual parsing and error checking.\n\n### Shipped Methods\nThe `UbersmithClient` class comes with three (3) core methods shipped.  \nThese offer a simplified entrypoint to gathering parsed information of an Ubersmith system.\n\n```python\n# Get system information: calls `uber.system_info`\nsys_info = client.system_info()\n\n# Get all available methods: calls `uber.method_list`\nall_methods = client.method_list()\n\n# Get details of one method: calls `uber.method_get`\nmethod_details = client.method_get('client.get')\n```\n\n## Future Compatibility\n\n**NOTE**: \n\nAdditional code is shipped in this repository, along with version-specific schemas for the Ubersmith API.  \nThese features will be enabled in later releases of the package.\n\n## License\nMIT - Feel free to use, extend, and contribute.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Version-specific Python 3 wrapper for the Ubersmith API",
    "version": "1.0.1",
    "project_urls": {
        "homepage": "https://github.com/bnassif/ubersmith-api",
        "issues": "https://github.com/bnassif/ubersmith-api/issues"
    },
    "split_keywords": [
        "api",
        " wrapper",
        " ubersmith",
        " client"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2d3b9452b2b0e60f31b7036124c33e1e30391019fad075fb927ac1498f24ba58",
                "md5": "4cc83678949e3e9ebd926421150475e3",
                "sha256": "ec9c1585ae1970c766ff9bd166b8a0bc4858ecb0d35be59c451983bed02c97e1"
            },
            "downloads": -1,
            "filename": "ubersmith_api-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4cc83678949e3e9ebd926421150475e3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 11087,
            "upload_time": "2025-10-07T02:35:09",
            "upload_time_iso_8601": "2025-10-07T02:35:09.644621Z",
            "url": "https://files.pythonhosted.org/packages/2d/3b/9452b2b0e60f31b7036124c33e1e30391019fad075fb927ac1498f24ba58/ubersmith_api-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6d44cbc4869f944d5eccaac1597c87934c62c3011df99f83a17d3cb59447ab73",
                "md5": "91273e5a04503ea81dd019fbdf2add7a",
                "sha256": "21c30b18968db778a4a3f014699266fe6c87714058e7444248cffbf8bd4cd191"
            },
            "downloads": -1,
            "filename": "ubersmith_api-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "91273e5a04503ea81dd019fbdf2add7a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 9845,
            "upload_time": "2025-10-07T02:35:10",
            "upload_time_iso_8601": "2025-10-07T02:35:10.987475Z",
            "url": "https://files.pythonhosted.org/packages/6d/44/cbc4869f944d5eccaac1597c87934c62c3011df99f83a17d3cb59447ab73/ubersmith_api-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-07 02:35:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bnassif",
    "github_project": "ubersmith-api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ubersmith-api"
}
        
Elapsed time: 0.57553s