Skip to main content

A simple wrapper for the IT Glue API

Project description

IT Glue

A Simple python wrapper for the IT Glue API.

Installation

pip install itglue

Requirements

  • Python 3.6 or higher

Setup

Authentication

For now this gem only supports API Key authentication.

Configuration

import itglue

itglue.connection.api_url = 'https://api.itglue.com'
itglue.connection.api_key = 'YOUR_API_KEY'

Usage

Basics

Get all organizations

>>> itglue.Organization.get()
[<Organization id: 123, attributes: {...}>, <Organization id: 456, attributes: {...}>, ...]

Get organizations with a filter

>>> itglue.Organization.filter(name='Happy Frog')
[<Organization id: 123, attributes: {'name': 'Happy Frog', ...}>, ...]

Get organization by id

>>> itglue.Organization.find(123)
<Organization id: 123, attributes: {...}>

Get configurations for a specific organization

>>> organization = itglue.Organization.find(123)
>>> itglue.Configuration.get(parent=organization)
[<Configuration id: 456, attributes: {...}>, <Configuration id: 789, attributes: {...}>, ...]

Client

You can also use the connection to execute requests and handle the data and response directly.

>>> itglue.connection.get('/configurations', params={ 'filter': {'name': 'HP-1'} })
[{'attributes': {'name': 'HP-1', 'id': '123', ...}, 'relationships': {} }, ...]

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/b-loyola/itglue-py.

License

The gem is available as open source under the terms of the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itglue-0.2.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

itglue-0.2.0-py2.py3-none-any.whl (10.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file itglue-0.2.0.tar.gz.

File metadata

  • Download URL: itglue-0.2.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for itglue-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f2c4dff1a9df971315e9989d987044776ff4412ef30b39ed601294a0dafd2631
MD5 0dfff9d97814101763d184b396e77af8
BLAKE2b-256 b8d81556ae5c500a3862af80f904e4f6001fa69841a5dcddf8130901e80287ad

See more details on using hashes here.

File details

Details for the file itglue-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: itglue-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for itglue-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d5d2008618509a373dd7cfa1a915a4eaa524652f8f53f2b1c9d8fe5605c92768
MD5 5009ea0f403cb34397b6222343f31bd9
BLAKE2b-256 254449c0582ac43e295c65b348f305dd85ecbd049f1b904d4ca7743e1b4a2c7e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page