GithubHelp home page GithubHelp logo

makinbacon21 / cython-hidapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trezor/cython-hidapi

0.0 0.0 0.0 2.98 MB

:snake: Python wrapper for the HIDAPI

License: Other

Python 40.34% Cython 59.66%

cython-hidapi's Introduction

cython-hidapi

A Cython interface to HIDAPI library.

This has been tested with:

  • TREZOR Hardware Wallet
  • the PIC18F4550 on the development board from CCS with their example program
  • the Fine Offset WH3081 Weather Station

It works on Linux, Windows and macOS.

cython-hidapi may be used by one of three licenses as outlined in LICENSE.txt

$ sudo apt-get install python-dev libusb-1.0-0-dev libudev-dev
$ sudo pip install --upgrade setuptools
$ sudo pip install hidapi

For other download options visit the PyPi page.

  1. Download cython-hidapi archive:

    $ git clone --recursive https://github.com/trezor/cython-hidapi.git
    $ cd cython-hidapi
    
  2. Build cython-hidapi extension module:

    $ python setup.py build
    

    On Linux, the hidraw API is now used by default, and the libusb API is not included. That is, --without-libusb is now the default behavior. To force the use of the libusb API instead, use the --with-libusb option:

    $ python setup.py build --with-libusb
    

    Or you can also use the environment variable:

    $ export HIDAPI_WITH_LIBUSB=1
    $ python setup.py build
    
  3. Install cython-hidapi module into your Python distribution:

    $ sudo python setup.py install
    

    Alternatively, you can run pip directly, which will call the necessary build and install commands:

    $ pip install -e .
    
  4. Test install:

    $ python
    >>> import hid
    >>>
    
  5. Try example script:

    $ python try.py
    

For correct functionality under Linux, you need to create a rule file similar to this one in your udev rules directory.

Also you might need to call udevadm control --reload-rules to reload the rules.

Documentation can be built using Sphinx:

$ cd docs && make html

The HTML output will be in docs/_build/html.

The documentation is extracted from the code using autodoc.

Note that the build output is used. So rebuilt the package before generating documentation.

Built documentation is also deployed to: https://trezor.github.io/cython-hidapi/.

cython-hidapi's People

Contributors

prusnak avatar claws avatar gbishop avatar jonasmalacofilho avatar qdot avatar flit avatar moreati avatar shuffle2 avatar benoit-pierre avatar youw avatar strupppi avatar admin-slush avatar robertoroos avatar sombernight avatar besser82 avatar holdersn avatar rene-dev avatar odidev avatar gruseski avatar bearsh avatar arohm-ff avatar vlotorev avatar cederom avatar morinted avatar fauxpark avatar c1728p9 avatar ulrichard avatar parautenbach avatar doc-hex avatar eclecticc 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.