fshelper-0.2.7
توضیحات
Library for working with the FreshService API.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | fshelper-0.2.7 |
| نام | fshelper |
| نسخه کتابخانه | 0.2.7 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Matthew Larsen |
| ایمیل نویسنده | matt.larsen@connorgp.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/fshelper/ |
| مجوز | MIT License |
# fshelper
FreshService API usage helper version: 0.2.7
## Features
### Assets Endpoint v0.1.0
Added an endpoint for working with assets
## Usage
*Example:*
```python
credential = Credential('MY_API_KEY', 'X')
with RequestService(credential, "mydomain") as request_service:
asset_end_point = AssetsEndPoint(request_service)
_assets = asset_end_point.get_all("include=type_fields") # gets the type_fields in the response data
assets = []
for asset_list in _assets:
assets.extend(asset_list)
licensed_assets = [asset for asset in assets if asset.get("assigned_on") is not None]
print(f"{len(licensed_assets)} assets found")
```
### Credentials for the FreshService API
The `fshelper.Credential` class is meant to help gather the basic authentication information for the FreshService API.
Provide your FreshService API key as the username and `X` as the password to the constructor.
https://api.freshservice.com/#authentication
### RequestService
Wrapper for the `requests` package to create an authenticated requests `Session`.
Takes a `Credential` object and the company's FreshService domain (the part prior to `freshservice.com`).
Use this as a context manager or call the `RequestService.new_session()` method in a try, except, finally block with
`RequestService.session.close()` in the finally block.
### Endpoints
Different classes to work with different FreshService API endpoints.
# 0.2.7
Fixes for object create actions and delete actions for Assets
- Start on implementation of Pydantic models for Assets
- Change resource_key field to single and plural versions
# 0.2.2
Add Locations endpoint
# 0.2.1
Add Asset Types endpoint
# 0.2.0
Extended assets endpoint functionality
# 0.1.0
Delete capability for asset endpoints
# 0.0.8
Release to Azure devops
# 0.0.6
Addition of tbump
# 0.0.5
Added an endpoint for assets
نیازمندی
| مقدار | نام |
|---|---|
| - | requests |
| - | pydantic-factories |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl fshelper-0.2.7:
pip install fshelper-0.2.7.whl
نصب پکیج tar.gz fshelper-0.2.7:
pip install fshelper-0.2.7.tar.gz