https://github.com/csssuf/ibutton2uid_lib
ibutton2uid library
https://github.com/csssuf/ibutton2uid_lib
csh ibutton
Last synced: 4 months ago
JSON representation
ibutton2uid library
- Host: GitHub
- URL: https://github.com/csssuf/ibutton2uid_lib
- Owner: csssuf
- License: gpl-3.0
- Created: 2016-12-04T04:09:00.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-04T05:34:07.000Z (over 9 years ago)
- Last Synced: 2025-09-22T15:47:31.161Z (8 months ago)
- Topics: csh, ibutton
- Language: Python
- Size: 13.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ibutton2uid
===========
Takes a user's iButton and returns their uid. Optionally also takes a url to use
for the actual ibutton2uid operation.
```
james:tmp/ $ source .venv/bin/activate
(.venv) james:tmp/ $ pip install ibutton2uid
Collecting ibutton2uid
Using cached ibutton2uid-1.0.0-py2.py3-none-any.whl
Collecting requests (from ibutton2uid)
Using cached requests-2.12.3-py2.py3-none-any.whl
Installing collected packages: requests, ibutton2uid
Successfully installed ibutton2uid-1.0.0 requests-2.12.3
(.venv) james:tmp/ $ python
Python 3.4.5 (default, Nov 30 2016, 17:35:49)
[GCC 5.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ibutton2uid import ibutton2uid
>>> ibutton2uid("")
Traceback (most recent call last):
File "", line 1, in
File "/home/james/projects/tmp/.venv/lib/python3.4/site-packages/ibutton2uid.py", line 6, in ibutton2uid
raise Exception("Zero or more than one result for iButton %s" % ibutton)
Exception: Zero or more than one result for iButton
>>> ibutton2uid("3D00244B9CCE")
'jmf'
>>>
(.venv) james:tmp/ $
```