Git Product home page Git Product logo

itglue-py's Introduction

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.

itglue-py's People

Contributors

b-loyola avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.