Git Product home page Git Product logo

doxieapi's Introduction

doxieapi

A Python library for the developer API of the Doxie Go Wi-Fi document scanner.

Installation

doxieapi is available on PyPI: https://pypi.python.org/pypi/doxieapi. Install with pip:

$ pip install doxieapi

Usage

Doxie scanners on the network can discovered automatically using SSDP:

>>> from doxieapi import DoxieScanner
>>> scanners = DoxieScanner.discover()
>>> print(scanners)
[<DoxieScanner: Doxie model DX250 (Doxie_01AFD2) at http://10.0.1.3:8080/>]

Recent and all scans can be listed:

>>> scanner = scanners[0]
>>> scanner.recent
'/DOXIE/JPEG/IMG_0074.JPG'
>>> scanner.scans[:2]
[{'modified': '2010-05-01 00:17:28', 'name': '/DOXIE/JPEG/IMG_0001.JPG', 'size': 1365552},
{'modified': '2010-05-01 00:17:44', 'name': '/DOXIE/JPEG/IMG_0002.JPG', 'size': 1362595}]

Scans can be downloaded individually or all at once:

>>> scanner.download_scan("/DOXIE/JPEG/IMG_0001.JPG", "/tmp")
'/tmp/IMG_0001.JPG'
>>> scanner.download_scans("/tmp")
['/tmp/IMG_0001.JPG', '/tmp/IMG_0002.JPG']

Scans can be deleted too:

>>> scanner.delete_scan("/DOXIE/JPEG/IMG_0001.JPG")
True
>>> scanner.delete_scans([scan['name'] for scan in scanner.scans])
True

Other attributes from the API can be queried:

>>> scanner.firmware
'0.26'
>>> scanner.network
'supersecretwifi'
>>> scanner.name
'Doxie_01AFD2'
>>> scanner.firmware_wifi
'1.29'

You can also run the module directly to download all available scans from all Doxies on the network to the current directory:

$ python -m doxieapi
Discovered Doxie model DX250 (Doxie_01AFD2) at http://10.0.1.3:8080/
Saved /Users/dave/Code/doxieapi/doxieapi/IMG_0001.JPG
Saved /Users/dave/Code/doxieapi/doxieapi/IMG_0002.JPG

Configuration

Connecting to password-protected Doxies is made possible by putting the password for each scanner in ~/.doxieapi.ini. Create sections named with the scanner's MAC address, for example:

[00:11:22:33:44:55]
password=supersecretpassword

Credits

Includes ssdp.py by Dan Krause.

doxieapi's People

Contributors

davea avatar

Watchers

James Cloos 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.