iToppy


NameiToppy JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/scheiblingcopip3/iToppy
SummaryPython package for the iTop CMDB/Service Management Rest API
upload_time2022-12-26 19:14:07
maintainer
docs_urlNone
authorLars Scheibling
requires_python>=3.6
licenseGnuPG 3.0
keywords python itop itopy itoppy rest api cmdb service management
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # iTop Library for Python
iTop CMDB/Service Management Rest API library for Python

## Todo
- base (__init__.yml)
- models.py


# Usage
## Authentication
Authentication can be performed two ways:

### Form
This method works only when iTop doesn't have the form login disabled (e.g. direct auth when using the itop-saml extension).

### Basic
This method can be used if you have the SAML plugin and want users to be automatically forwarded to the IDP when loading the page, but still want to be able to use the API. Make sure that basic is the first authentication method in the list in the configuration file, e.g.
```php
	'allowed_login_types' => 'basic|saml|external',
```
### Examples
```python
from iToppy import iTop, iTopAuth

# Form Authentication (default)
connection = iTop(
    url='https://itop.example.com/webservices/rest.php', 
    username='username', 
    password='password', 
    version='1.3',
    auth=iTopAuth.FORM
)

# Basic Authentication
connection = iTop(
    url='https://itop.example.com/webservices/rest.php', 
    username='username', 
    password='password', 
    version='1.3',
    auth=iTopAuth.BASIC
)
```

## Querying
### Get objects
```python
# Get all objects of class UserRequest
user_requests = connection.get('UserRequest')

# Full Get syntax
connection.get(
    
    # The class of object/objects to receive
    itop_class="UserRequest",
    
    # A string representing the key, OQL query in string form or iTopOQLQuery object
    key="1",
    
    # The fields to retrieve
    fields=["title", "description"]
    
    # Limit the number of results per page
    ,limit=10,

    # The page to retrieve
    page=1
)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/scheiblingcopip3/iToppy",
    "name": "iToppy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "python itop itopy itoppy rest api cmdb service management",
    "author": "Lars Scheibling",
    "author_email": "lars@scheibling.se",
    "download_url": "https://files.pythonhosted.org/packages/a8/e4/001b02e691bef0f73f6fca91f48c755601efa898bb543218d83c7ffb5e32/iToppy-0.1.1.tar.gz",
    "platform": null,
    "description": "# iTop Library for Python\niTop CMDB/Service Management Rest API library for Python\n\n## Todo\n- base (__init__.yml)\n- models.py\n\n\n# Usage\n## Authentication\nAuthentication can be performed two ways:\n\n### Form\nThis method works only when iTop doesn't have the form login disabled (e.g. direct auth when using the itop-saml extension).\n\n### Basic\nThis method can be used if you have the SAML plugin and want users to be automatically forwarded to the IDP when loading the page, but still want to be able to use the API. Make sure that basic is the first authentication method in the list in the configuration file, e.g.\n```php\n\t'allowed_login_types' => 'basic|saml|external',\n```\n### Examples\n```python\nfrom iToppy import iTop, iTopAuth\n\n# Form Authentication (default)\nconnection = iTop(\n    url='https://itop.example.com/webservices/rest.php', \n    username='username', \n    password='password', \n    version='1.3',\n    auth=iTopAuth.FORM\n)\n\n# Basic Authentication\nconnection = iTop(\n    url='https://itop.example.com/webservices/rest.php', \n    username='username', \n    password='password', \n    version='1.3',\n    auth=iTopAuth.BASIC\n)\n```\n\n## Querying\n### Get objects\n```python\n# Get all objects of class UserRequest\nuser_requests = connection.get('UserRequest')\n\n# Full Get syntax\nconnection.get(\n    \n    # The class of object/objects to receive\n    itop_class=\"UserRequest\",\n    \n    # A string representing the key, OQL query in string form or iTopOQLQuery object\n    key=\"1\",\n    \n    # The fields to retrieve\n    fields=[\"title\", \"description\"]\n    \n    # Limit the number of results per page\n    ,limit=10,\n\n    # The page to retrieve\n    page=1\n)\n```\n",
    "bugtrack_url": null,
    "license": "GnuPG 3.0",
    "summary": "Python package for the iTop CMDB/Service Management Rest API",
    "version": "0.1.1",
    "split_keywords": [
        "python",
        "itop",
        "itopy",
        "itoppy",
        "rest",
        "api",
        "cmdb",
        "service",
        "management"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "c7cb2915705b1b21ec4572fdca073202",
                "sha256": "9d076e80bb2f77eb662c5ff971fe45f218d7b22f97b530470864465b975a0efa"
            },
            "downloads": -1,
            "filename": "iToppy-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c7cb2915705b1b21ec4572fdca073202",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 18275,
            "upload_time": "2022-12-26T19:14:06",
            "upload_time_iso_8601": "2022-12-26T19:14:06.314511Z",
            "url": "https://files.pythonhosted.org/packages/ce/a5/d2969719c54d68778ede1a4c4e27874e6fad9f4ed74c3c2be6cadb684e59/iToppy-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "d1ce1971f17f5bba4502ccea5084a167",
                "sha256": "4d4185a56ea426d1ff625e668cc69446642eb59d0ab175053d27d76f17a29d2c"
            },
            "downloads": -1,
            "filename": "iToppy-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d1ce1971f17f5bba4502ccea5084a167",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 17859,
            "upload_time": "2022-12-26T19:14:07",
            "upload_time_iso_8601": "2022-12-26T19:14:07.908262Z",
            "url": "https://files.pythonhosted.org/packages/a8/e4/001b02e691bef0f73f6fca91f48c755601efa898bb543218d83c7ffb5e32/iToppy-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-26 19:14:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "scheiblingcopip3",
    "github_project": "iToppy",
    "lcname": "itoppy"
}
        
Elapsed time: 0.03966s