servicenow-utils


Nameservicenow-utils JSON
Version 0.21 PyPI version JSON
download
home_pagehttps://github.com/reese-001/servicenow-utils
SummaryA utility module for retrieving incidents from ServiceNow
upload_time2023-10-03 09:40:20
maintainer
docs_urlNone
author
requires_python
licenseMIT
keywords servicenow incidents utility
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ServiceNow Incident Retrieval Module

This module provides utilities to retrieve incidents from ServiceNow within a specified date range.

## Features

- Fetch incidents from ServiceNow based on a date range.
- Breaks down the retrieval into intervals for efficient fetching.
- Converts incident data into a Pandas DataFrame for easy data manipulation.

## Installation

```bash
pip install servicenow-utils
```

## Usage

First, ensure you have the necessary dependencies:

```bash
pip install pandas requests
```

Then, use the module as follows:

```python
from servicenow_utils import get_incidents

# Define your ServiceNow connection details
url = "YOUR_SERVICE_NOW_URL"
endpoint = "YOUR_ENDPOINT"
user_name = "YOUR_USERNAME"
password = "YOUR_PASSWORD"

df = get_incidents(
    current_day='2023-04-01', 
    end_day='2023-04-30',
    url=url,
    endpoint=endpoint,
    user_name=user_name,
    password=password
)
```

## Functions

### `day_plus_one(day: str) -> str`

Increments the given day by one.

### `day_string_to_dt(day: str) -> datetime`

Converts a string representation of a day into a datetime object.

### `get_incidents(current_day, end_day, url, endpoint, user_name, password, start_hour=0, hour_interval=8, count_limit=2000) -> pd.DataFrame`

Fetches incidents from ServiceNow within the given date range and returns them as a Pandas DataFrame.

## Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/reese-001/servicenow-utils",
    "name": "servicenow-utils",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "servicenow incidents utility",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/95/49/42cb6323ae05adc84c98502754f0ba16093f907e4d6f63562c0c840457ef/servicenow-utils-0.21.tar.gz",
    "platform": null,
    "description": "# ServiceNow Incident Retrieval Module\r\n\r\nThis module provides utilities to retrieve incidents from ServiceNow within a specified date range.\r\n\r\n## Features\r\n\r\n- Fetch incidents from ServiceNow based on a date range.\r\n- Breaks down the retrieval into intervals for efficient fetching.\r\n- Converts incident data into a Pandas DataFrame for easy data manipulation.\r\n\r\n## Installation\r\n\r\n```bash\r\npip install servicenow-utils\r\n```\r\n\r\n## Usage\r\n\r\nFirst, ensure you have the necessary dependencies:\r\n\r\n```bash\r\npip install pandas requests\r\n```\r\n\r\nThen, use the module as follows:\r\n\r\n```python\r\nfrom servicenow_utils import get_incidents\r\n\r\n# Define your ServiceNow connection details\r\nurl = \"YOUR_SERVICE_NOW_URL\"\r\nendpoint = \"YOUR_ENDPOINT\"\r\nuser_name = \"YOUR_USERNAME\"\r\npassword = \"YOUR_PASSWORD\"\r\n\r\ndf = get_incidents(\r\n    current_day='2023-04-01', \r\n    end_day='2023-04-30',\r\n    url=url,\r\n    endpoint=endpoint,\r\n    user_name=user_name,\r\n    password=password\r\n)\r\n```\r\n\r\n## Functions\r\n\r\n### `day_plus_one(day: str) -> str`\r\n\r\nIncrements the given day by one.\r\n\r\n### `day_string_to_dt(day: str) -> datetime`\r\n\r\nConverts a string representation of a day into a datetime object.\r\n\r\n### `get_incidents(current_day, end_day, url, endpoint, user_name, password, start_hour=0, hour_interval=8, count_limit=2000) -> pd.DataFrame`\r\n\r\nFetches incidents from ServiceNow within the given date range and returns them as a Pandas DataFrame.\r\n\r\n## Contributing\r\n\r\nIf you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A utility module for retrieving incidents from ServiceNow",
    "version": "0.21",
    "project_urls": {
        "Homepage": "https://github.com/reese-001/servicenow-utils"
    },
    "split_keywords": [
        "servicenow",
        "incidents",
        "utility"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "954942cb6323ae05adc84c98502754f0ba16093f907e4d6f63562c0c840457ef",
                "md5": "2b2a5cfd8ba32775ee8cef1b727748a9",
                "sha256": "6a8b91f7d5a12a8a7f8e4cd1c0d9886093186c9962be3f8faaaef9cfb84e25c9"
            },
            "downloads": -1,
            "filename": "servicenow-utils-0.21.tar.gz",
            "has_sig": false,
            "md5_digest": "2b2a5cfd8ba32775ee8cef1b727748a9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3519,
            "upload_time": "2023-10-03T09:40:20",
            "upload_time_iso_8601": "2023-10-03T09:40:20.776497Z",
            "url": "https://files.pythonhosted.org/packages/95/49/42cb6323ae05adc84c98502754f0ba16093f907e4d6f63562c0c840457ef/servicenow-utils-0.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-03 09:40:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "reese-001",
    "github_project": "servicenow-utils",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "servicenow-utils"
}
        
Elapsed time: 0.15181s