Skip to main content

fshelper

FreshService API usage helper version: 0.3.0

Features

Assets Endpoint v0.1.0

Added an endpoint for working with assets

Usage

Example:

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.3.0

Filter read-only and invalid fields from being sent to the FS API when defined for an end point.

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

Release files for fshelper 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fshelper 0.3.0
File Size Uploaded
fshelper-0.3.0.tar.gz 12.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fshelper 0.3.0
File Interpreter ABI Platform
fshelper-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.2 kB

Release files / fshelper-0.3.0.tar.gz

Download URL fshelper-0.3.0.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ba4898120f2710108a98827cd11f7a2b045d8895640a4600edc5afae2a3d3a0f
BLAKE2b-256 checksum
How to use checksums
d9a9b9528c4e32d3baf7063b9d7a5a168b1ca4dda07353bdf68fcf6eb63c7371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / fshelper-0.3.0-py3-none-any.whl

Download URL fshelper-0.3.0-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
225d480e79b7d98c3428f1005fcabd3fc6a8246ce3c2b66fc1ed704f4eea4f29
BLAKE2b-256 checksum
How to use checksums
04aa1eefcba91e56b2d958aee160d75b0fbb86dd39544954a243f126514b86d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.7

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page