Saravanan666/pypi-org huggingface dataset:
Package: adafruit-circuitpython-ble-apple-media
IntroductionSupport for the Apple Media Service which provides media playback info and control.DependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-apple-mediaTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-apple-mediaTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-apple-mediaUsage Exampleimportadafruit_blefromadafruit_ble.advertising.standardimportSolicitServicesAdvertisementfromadafruit_ble_apple_mediaimportAppleMediaServiceradio=adafruit_ble.BLERadio()a=SolicitServicesAdvertisement()a.solicited_services.append(AppleMediaService)radio.start_advertising(a)whilenotradio.connected:passprint("connected")known_notifications=set()i=0whileradio.connected:forconnectioninradio.connections:ifnotconnection.paired:connection.pair()print("paired")ams=connection[AppleMediaService]print("App:",ams.player_name)print("Title:",ams.title)print("Album:",ams.album)print("Artist:",ams.artist)ifams.playing:print("Playing")elifams.paused:print("Paused")ifi>3:ams.toggle_play_pause()i=0print()time.sleep(3)i+=1print("disconnected")DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-apple-notification-center
IntroductionBLE library for the Apple Notification CenterDependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPINoteThis library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-apple-notification-centerTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-apple-notification-centerTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-apple-notification-centerUsage ExampleDocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-beacon
IntroductionBLE Location Beacon for CircuitPythonDependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundleor individual libraries can be installed usingcircup.Purchase one from the Adafruit shopInstalling from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI.
To install for current user:pip3installadafruit-circuitpython-ble-beaconTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-beaconTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.env/bin/activatepip3installadafruit-circuitpython-ble-beaconInstalling to a Connected CircuitPython Device with CircupMake sure that you havecircupinstalled in your Python environment.
Install it with the following command if necessary:pip3installcircupWithcircupinstalled and your CircuitPython device connected use the
following command to install:circupinstalladafruit_ble_beaconOr the following command to update an existing version:circupupdateUsage ExampleSee theexamples/folder for more usage examples.DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-berrymed-pulse-oximeter
IntroductionBLE support for BerryMed Pulse OximetersDependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-berrymed-pulse-oximeterTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-berrymed-pulse-oximeterTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-berrymed-pulse-oximeterDocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-broadcastnet
IntroductionBasic IOT over BLE advertisements.DependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPINoteOnly the bridge examples work on Raspberry Pi because Blinka_bleiodoesn’t support
advertising, only scanning.On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-broadcastnetTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-broadcastnetTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-broadcastnetUsage ExampleAdd a secrets.py file and then runble_broadcastnet_blinka_bridge.py.DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-creation
IntroductionFriendlier device discovery using Creation IDsDependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundleor individual libraries can be installed usingcircupPurchase one from the Adafruit shopInstalling from PyPINoteThis library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI.
To install for current user:pip3installadafruit-circuitpython-ble-creationTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-creationTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-creationUsage ExampleSee examples in the directory.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.DocumentationFor information on building library documentation, please check outthis guide.
Package: adafruit-circuitpython-ble-cycling-speed-and-cadence
IntroductionBLE Cycling Speed and Cadence ServiceDependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPINoteThis library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-cycling-speed-and-cadenceTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-cycling-speed-and-cadenceTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-cycling-speed-and-cadenceDocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-eddystone
IntroductionCircuitPython BLE library for Google’s open “physical web” Eddystone.DependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-eddystoneTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-eddystoneTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-eddystoneUsage Example"""This example broadcasts our Mac Address as our Eddystone ID and a link to the Adafruit Discord
   server."""importtimeimportadafruit_blefromadafruit_ble_eddystoneimportuid,urlradio=adafruit_ble.BLERadio()# Reuse the BLE address as our Eddystone instance id.eddystone_uid=uid.EddystoneUID(radio.address_bytes)eddystone_url=url.EddystoneURL("https://adafru.it/discord")whileTrue:# Alternate between advertising our ID and our URL.radio.start_advertising(eddystone_uid)time.sleep(0.5)radio.stop_advertising()radio.start_advertising(eddystone_url)time.sleep(0.5)radio.stop_advertising()time.sleep(4)DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-heart-rate
IntroductionBLE Heart Rate ServiceDependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPINoteThis library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-heart-rateTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-heart-rateTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-heart-rateDocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-ibbq
IntroductionBLE support for iBBQ thermometersDependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPINoteThis library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-ibbqTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-ibbqTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-ibbqDocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-lywsd03mmc
IntroductionBLE Support for Xiaomi LYWSD03MMC Thermometer/HygrometerDependenciesThis driver depends on:Adafruit CircuitPythonadafruit_blePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-lywsd03mmcTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-lywsd03mmcTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-lywsd03mmcDocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-magic-light
IntroductionBLE service for Magic Light BLE RGB bulbs. Available from Amazonhere.DependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPINoteThis library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-magic-lightTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-magic-lightTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-magic-lightUsage Example"""This demo connects to a magic light and has it do a colorwheel."""importadafruit_bleimport_bleiofromadafruit_ble.advertising.standardimportProvideServicesAdvertisementfromadafruit_ble_magic_lightimportMagicLightService# CircuitPython <6 uses its own ConnectionError type. So, is it if available. Otherwise,# the built in ConnectionError is used.connection_error=ConnectionErrorifhasattr(_bleio,"ConnectionError"):connection_error=_bleio.ConnectionErrordeffind_connection():forconnectioninradio.connections:ifMagicLightServicenotinconnection:continuereturnconnection,connection[MagicLightService]returnNone,None# Start advertising before messing with the display so that we can connect immediately.radio=adafruit_ble.BLERadio()active_connection,pixels=find_connection()current_notification=Noneapp_icon_file=NonewhileTrue:ifnotactive_connection:print("Scanning for Magic Light")forscaninradio.start_scan(ProvideServicesAdvertisement):ifMagicLightServiceinscan.services:active_connection=radio.connect(scan)try:pixels=active_connection[MagicLightService]exceptconnection_error:print("disconnected")continuebreakradio.stop_scan()i=0whileactive_connection.connected:pixels[0]=colorwheel(i%256)i+=1active_connection=NoneDocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-midi
IntroductionBLE MIDI service for CircuitPythonDependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPINoteThis library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-midiTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-midiTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ble-midiUsage Example"""
This example sends MIDI out. It sends NoteOn and then NoteOff with a random pitch bend.
"""importtimeimportrandomimportadafruit_blefromadafruit_ble.advertising.standardimportProvideServicesAdvertisementimportadafruit_ble_midiimportadafruit_midifromadafruit_midi.control_changeimportControlChangefromadafruit_midi.note_offimportNoteOfffromadafruit_midi.note_onimportNoteOnfromadafruit_midi.pitch_bendimportPitchBend# Use default HID descriptormidi_service=adafruit_ble_midi.MIDIService()advertisement=ProvideServicesAdvertisement(midi_service)# advertisement.appearance = 961ble=adafruit_ble.BLERadio()ifble.connected:forcinble.connections:c.disconnect()midi=adafruit_midi.MIDI(midi_out=midi_service,out_channel=0)print("advertising")ble.start_advertising(advertisement)whileTrue:print("Waiting for connection")whilenotble.connected:passprint("Connected")whileble.connected:midi.send(NoteOn(44,120))# G sharp 2nd octavetime.sleep(0.25)a_pitch_bend=PitchBend(random.randint(0,16383))midi.send(a_pitch_bend)time.sleep(0.25)# note how a list of messages can be usedmidi.send([NoteOff("G#2",120),ControlChange(3,44)])time.sleep(0.5)print("Disconnected")print()ble.start_advertising(advertisement)DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.
Package: adafruit-circuitpython-ble-pulse-oximeter
IntroductionBLE support for BerryMed Pulse OximetersDependenciesThis driver depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Installing from PyPINoteThis library is not available on PyPI yet. Install documentation is included
as a standard element. Stay tuned for PyPI availability!On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-ble-berrymed-pulse-oximeterTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ble-berrymed-pulse-oximeterTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.envsource.env/bin/activatepip3installadafruit-circuitpython-ble-berrymed-pulse-oximeterContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.DocumentationFor information on building library documentation, please check outthis guide.
Package: adafruit-circuitpython-ble-radio
IntroductionThis library provides simple byte and string based inter-device communication
via BLE.It works like a walkie-talkie: configure your device to use a certain channel
(numbered 0-255, default being 42) and it will broadcast on that channel and
receive any messages from other devices using that channel.DependenciesThis library depends on:Adafruit CircuitPythonPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Usage ExampleAll the functionality is exposed via the very simpleRadioclass:from adafruit_ble_radio import Radio


# A radio instance listens/broadcasts on a numbered channel.
r = Radio(channel=7)

# Update radio instance settings.
r.configure(channel=9)

# Broadcast a simple string message.
r.send("Hello")

# Broadcast raw bytes.
r.send_bytes(b"Hello")

# A loop to listen for incoming string based messages...
while True:
    msg = r.receive()
    if msg:
        print(msg)

# Alternatively, to get the raw bytes and other details...
while True:
    msg = r.receive_full()
    if msg:
        msg_bytes = msg[0]
        msg_strength = msg[1]
        msg_time = msg[2]
        print("Recieved {} (strength {}, at time {})".format(
              msg_bytes,
              msg_strength,
              msg_time))Unit TestsTo run the test suite you should havepytestandpytest-coverageinstalled (pip install pytestpytest-coverage).Run the unit tests with the following command:$ pytest --cov-report term-missing --cov=adafruit_ble_radio tests/DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.