Code Monkey home page Code Monkey logo

inqry's Introduction

InQRy

A robust, cross-platform utility that generates a QR code containing hardware specs of the target machine or device.

โš ๏ธ InQRy is not actively maintained. However, pull requests will not be ignored.

Requirements

  • Python 3.4 and later

Supported platforms

  • OS X 10.10 and later
  • Windows 10
  • Windows Server 2012 R2 and later

About

Written in pure Python, InQRy is designed to obtain asset information both quickly and accurately, without having to rely on data imports or asset-owner participation during physical inventory. The QR code contains detailed information about the client machine or device, which can then be scanned to quickly add the asset into a web-based inventory system, such as Snipe-IT.

Though originally designed to work on only laptop and desktop computers, it is now capable of obtaining the hardware specs of any number of attached iOS devices, pending that Apple's command-line utility cfgutil is installed via Apple Configurator 2.

Install and run

pip3 install inqry
python3 -m inqry

Build on macOS

Requirements

Instructions

Run the following command to build the InQRy app. The output will be under dist/

python3 setup.py py2app --iconfile icon/Icon.icns

Build on Windows

Requirements

Instructions

Run the following command to build the InQRy app. The output will be under dist/

pyinstaller --onefile --icon icon/Icon.ico inqry/__main__.py

How it works

InQRy obtains hardware specs using platform-specific shell commands and Python modules. Data is parsed and given to SystemSpecs object, where it is homogenized and passed to the FormInstructions class, where even more data is added and manipulated to work with the Snipe-IT inventory system. Instructions containing that data are used to create a python-qrcode-generated code, which is displayed on the screen for scanning.

InQRy determines which instructions to follow based on a combination of user input and the machine itself. Those instructions contain other important information that allow it to move fluidly through different types of fields in the Snipe-IT asset entry form.

Usage

Example usage of an InQRy SystemSpecs object:

>>> from inqry.system_specs import systemspecs
>>> ss = systemspecs.SystemSpecs()
>>> ss.os_type
'Darwin'
>>> ss.memory
'8 GB'
>>> ss.storage
{'Drive 1': '251.0 GB SSD (APPLE SSD AP0256J)'}

Screenshot

InQRy GUI

Limitations

  • The CR1400 series QR code reader is required to use the QR code with an entry form. See the barcode scanner README for more information.

  • The FormInstructions class is written to support our own custom fields and fieldsets for Snipe-IT. You may need to modify the FormInstructions class in order to use this in your environment. However, most of its attributes should be compatible with similar asset-entry forms.

  • Obtaining mobile device hardware specs is limited to iOS devices, and contingent upon having installed cfgutil via Apple Configurator 2.

Issues

Microsoft Internal Only

inqry's People

Contributors

americanhanko avatar brownmike avatar jazaval avatar julienc91 avatar microsoft-github-policy-service[bot] avatar nea89o avatar psyonara avatar sangamcse avatar tommycox avatar v-anshie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

inqry's Issues

conftest.py: usage of Function.Function is deprecated

The pytest dependency has no specific version or a range of versions which results in the installation of latest pytest version. When I installed InQRy using pip install -e ., pip installed pytest 3.9.2.
Here is the list of dependency installed for test from this repo:

  • platform darwin -- Python 3.6.7, pytest-3.9.2, py-1.7.0, pluggy-0.8.0

The new pytest feature deprecated the usage of Function.Function which causes 134 warnings beacuse of item.Function.

134 warnings has same message. i.e,

InQRy/conftest.py:8: RemovedInPytest4Warning: usage of Function.Function is deprecated, please use pytest.Function instead
  if isinstance(item, item.Function):

Cannot install with pip

$ pip3 install inqry
Collecting inqry
  Using cached inqry-1.3.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/7w/yzqmnn5128gf_ww4zg7mz07w0000gp/T/pip-build-uz17_p7k/inqry/setup.py", line 23, in <module>
        plist = Plist.fromFile('Info.plist')
      File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/plistlib.py", line 140, in fromFile
        with _maybe_open(pathOrFile, 'rb') as fp:
      File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 81, in __enter__
        return next(self.gen)
      File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/plistlib.py", line 120, in _maybe_open
        with open(pathOrFile, mode) as fp:
    FileNotFoundError: [Errno 2] No such file or directory: 'Info.plist'

pip install throws error

I'm trying to install InQRy on my machine, my python version is 3.8, running on Windows 10. I'm getting this error:

Collecting inqry
  Using cached https://files.pythonhosted.org/packages/ee/aa/e7d3cc708da97e063490e48a8cc464331603615b9cd7ca2bc0ea4da3d1a0/inqry-1.3.2.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Saurabh\\AppData\\Local\\Temp\\pip-install-q53ry7jv\\inqry\\setup.py'"'"'; __file__='"'"'C:\\Users\\Saurabh\\AppData\\Local\\Temp\\pip-install-q53ry7jv\\inqry\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\Saurabh\AppData\Local\Temp\pip-install-q53ry7jv\inqry\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Saurabh\AppData\Local\Temp\pip-install-q53ry7jv\inqry\setup.py", line 1, in <module>
        from plistlib import Plist
    ImportError: cannot import name 'Plist' from 'plistlib' (c:\python38\lib\plistlib.py)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.0.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Outdated screenshot

The screenshot in README.md does not reflect the UI of the latest version.

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.