Skip to main content

bluetooth library

Project description

btpy

asciicast

how to ..

.. install

pip3 install btpy

.. to use it

Python 3.7.5rc1 (default, Oct  8 2019, 16:47:45) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.9.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from btpy import Scanner, ClassicDevice                                                                                                                                        

In [2]: Scanner.scan_for()                                                                                                                                                             
Permission Denied
Set scan parameters failed (are you root?)
found 1 devices
Out[2]: [<btpy.libs.bt.classic.ClassicDevice at 0x7f3427045210>]

In [3]: c = ClassicDevice.scan()                                                                                                                                                       

In [4]: c                                                                                                                                                                              
Out[4]: [<btpy.libs.bt.classic.ClassicDevice at 0x7f3425559d50>]

In [5]: c[0].__dict__                                                                                                                                                                  
Out[5]: 
{'address': 'A8:B8:6E:C1:6A:28',
 'timestamp': '03.11.2019 16:48:06',
 'name': 'Nexus 5X'}

or check bt.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

btpy-1.2.7.tar.gz (6.7 kB view details)

Uploaded Source

File details

Details for the file btpy-1.2.7.tar.gz.

File metadata

  • Download URL: btpy-1.2.7.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for btpy-1.2.7.tar.gz
Algorithm Hash digest
SHA256 ff7cff9708b8787a7d7030218a049b7ea9f4b64ca6d9fe5376764eff2c5397a3
MD5 a3c812bdbc452d5674a281a9888890bd
BLAKE2b-256 99ab74f6fb085c2ac0d66a1d23775303d63c273f3793cf1061dcab919174c90c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page