Saravanan666/pypi-org huggingface dataset:
Package: adafruit-circuitpython-fxos8700
IntroductionCircuitPython module for the NXP FXOS8700 accelerometer and magnetometer.DependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease 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-fxos8700To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-fxos8700To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-fxos8700Usage Exampleimporttimeimportboardimportadafruit_fxos8700i2c=board.I2C()# uses board.SCL and board.SDAsensor=adafruit_fxos8700.FXOS8700(i2c)whileTrue:accel_x,accel_y,accel_z=sensor.accelerometermag_x,mag_y,mag_z=sensor.magnetometerprint('Acceleration (m/s^2): ({0:0.3f},{1:0.3f},{2:0.3f})'.format(accel_x,accel_y,accel_z))print('Magnetometer (uTesla): ({0:0.3f},{1:0.3f},{2:0.3f})'.format(mag_x,mag_y,mag_z))time.sleep(1.0)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-gc-iot-core
IntroductionGoogle Cloud IoT Core Client for CircuitPythonDependenciesThis driver depends on:Adafruit CircuitPythonAdafruit CircuitPython JWTAdafruit CircuitPython LoggingPlease 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-gc-iot-coreTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-gc-iot-coreTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-gc-iot-coreUsage ExampleUsage example within examples/ folder.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.LicenseThis library was written by Google for MicroPython. We’ve converted it to
work with CircuitPython and made changes so it works with boards supported by
CircuitPython and the CircuitPython API.We’ve added examples for using this library to transmit board telemetry data along
with sensor data to Google’s Cloud Platform.This open source code is licensed under the Apache license (see LICENSE) for details.
Package: adafruit-circuitpython-gfx
IntroductionCircuitPython pixel graphics drawing library.Important: This library will likely be deprecated soon. If you are looking to use a specific display, search the product name (i.e. ssd1322 or ili9341) athttps://github.com/adafruit/, or find it in thecircuitpython bundle.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.Usage ExampleSee example in /examples/gfx_simpletest.pyMost displays now use displayio. You can find simpletests for specific displays in their respective repositories or in the examples section of thecircuitpython bundleContributingContributions 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-gizmo
IntroductionCircuitPython classes for Adafruit GizmosDependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.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-gps
IntroductionGPS parsing module.  Can send commands to, and parse simple NMEA data sentences
from serial and I2C GPS modules to read latitude, longitude, and more.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-gpsTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-gpsTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-gpsUsage ExampleSee examples/gps_simpletest.py for a demonstration of parsing and printing GPS location.Important:
Feather boards and many other circuitpython boards will round to two decimal places like this:>>>float('1234.5678')1234.57This isn’t ideal for GPS data as this lowers the accuracy from 0.1m to 11m.This can be fixed by using string formatting when the GPS data is output.An implementation of this can be found in examples/gps_simpletest.pyimporttimeimportboardimportbusioimportadafruit_gpsRX=board.RXTX=board.TXuart=busio.UART(TX,RX,baudrate=9600,timeout=30)gps=adafruit_gps.GPS(uart,debug=False)gps.send_command(b'PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0')gps.send_command(b'PMTK220,1000')last_print=time.monotonic()whileTrue:gps.update()current=time.monotonic()ifcurrent-last_print>=1.0:last_print=currentifnotgps.has_fix:print('Waiting for fix...')continueprint('='*40)# Print a separator line.print('Latitude:{0:.6f}degrees'.format(gps.latitude))print('Longitude:{0:.6f}degrees'.format(gps.longitude))These two lines are the lines that actually solve the issue:print('Latitude:{0:.6f}degrees'.format(gps.latitude))print('Longitude:{0:.6f}degrees'.format(gps.longitude))Note: Sending multiple PMTK314 packets withgps.send_command()will not
work unless there is a substantial amount of time in-between each timegps.send_command()is called. Atime.sleep()of 1 second or more
should fix this.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-guvx-i2c
IntroductionPython drivers for the GUVA-C32SM and GUVB-C31SM I2C UV sensorsDependenciesThis driver depends on:Adafruit CircuitPythonBus DeviceRegisterPlease 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.Works with the GUVx family of I2C UV light sensorsPurchase 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-guvx-i2cTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-guvx-i2cTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.envsource.env/bin/activatepip3installadafruit-circuitpython-guvx-i2cInstalling 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_guvx_i2cOr the following command to update an existing version:circupupdateUsage ExampleSee theexamples/folder for 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-hashlib
IntroductionThis module implements a common interface to many different secure hash and message digest algorithms.
Included are the FIPS secure hash algorithms SHA1, SHA224, SHA256, SHA384, and SHA512 (defined in FIPS 180-2)
as well as RSA’s MD5 algorithm (defined in Internet RFC 1321).The SHA1 algorithm is not supported by the CircuitPython module.This library is based on the work performed in the micropython-lib hashlib module by Paul SokolovskyDependenciesThis 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-hashlibTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-hashlibTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-hashlibUsage Exampleimportadafruit_hashlibashashlibm=hashlib.sha256()m.update(b"CircuitPython")print("Msg Hex Digest:{}\nMsg Digest Size:{}\nMsg Block Size:{}".format(m.hexdigest(),m.digest_size,m.block_size))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-hcsr04
IntroductionThe HC-SR04 is an inexpensive solution for measuring distances using microcontrollers. This library provides a simple
driver for controlling these sensors from CircuitPython.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-hcsr04To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-hcsr04To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-hcsr04Usage ExampleWarningThe HC-SR04 uses 5V logic, so you will have to use alevel shifterbetween it
and your CircuitPython board (which uses 3.3V logic).NoteIf you want to use an HC-SR04 withMicroPython, I recommend checking outthis library.You’ll need to dedicate two pins to communicating with the HC-SR04. The sensor communicates in a very rudimentary
manner, so it doesn’t matter which pins you choose, as long as they’re digital IO pins (pins that start with “D”
are digital).There are two ways of instantiating aHCSR04object: with or without using a context manager.NoteIt is technically possible to communicate with the HC-SR04 using only one wire since the trigger and echo signals
aren’t ever active at the same time. Once I have a chance to determine a safe way to do this, I plan to add this as
a feature to the library.See Also:Adafruit’s guide on Lifetime and ContextManagersGives more info on using context managers with CircuitPython drivers.boardA list of pins available on your device. To view this list, firstget a REPL(the guide linked was written
for the pyboard, but it still works), then input the following:importboarddir(board)Without a Context ManagerIn the example below, we create theHCSR04object directly, get the distance every 2 seconds.importtimeimportboardimportadafruit_hcsr04sonar=adafruit_hcsr04.HCSR04(trigger_pin=board.D5,echo_pin=board.D6)whileTrue:try:print((sonar.distance,))exceptRuntimeError:print("Retrying!")time.sleep(2)With a Context ManagerIn the example below, we use a context manager (thewithstatement) to create theHCSR04instance, again get the distance every 2 seconds, but then the context manager handles de-initializing the device for
us.importboardfromadafruit_hcsr04importHCSR04withHCSR04(trigger_pin=board.D5,echo_pin=board.D6)assonar:try:whileTrue:print(sonar.distance)sleep(2)exceptKeyboardInterrupt:passDocumentationAPI 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-ht16k33
﻿IntroductionThis is a library for using the I²C-based LED matrices with the HT16K33 chip.
It supports both 16x8 and 8x8 matrices, as well as 7- and 14-segment displays.NotesThis library is intended for Adafruit CircuitPython’s API.  For a library compatible with MicroPython machine API see thislibrary.This library does not work with the Trellis 4x4 LED+Keypad board. For that product use:CircuitPython Trellis LibraryDependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease 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-ht16k33To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-ht16k33To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-ht16k33Usage Example# Import all board pins and bus interface.importboardimportbusio# Import the HT16K33 LED matrix module.fromadafruit_ht16k33importmatrix# Create the I2C interface.i2c=busio.I2C(board.SCL,board.SDA)# Create the matrix class.# This creates a 16x8 matrix:matrix=matrix.Matrix16x8(i2c)# Or this creates a 8x8 matrix:#matrix = matrix.Matrix8x8(i2c)# Or this creates a 8x8 bicolor matrix:#matrix = matrix.Matrix8x8x2# Finally you can optionally specify a custom I2C address of the HT16k33 like:#matrix = matrix.Matrix16x8(i2c, address=0x70)# Clear the matrix.matrix.fill(0)# Set a pixel in the origin 0,0 position.matrix[0,0]=1# Set a pixel in the middle 8, 4 position.matrix[8,4]=1# Set a pixel in the opposite 15, 7 position.matrix[15,7]=1matrix.show()# Change the brightnessmatrix.brightness=8# Set the blink ratematrix.blink_rate=2DocumentationAPI 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-hts221
IntroductionHelper library for the HTS221 Humidity and Temperature SensorDependenciesThis driver depends on:Adafruit CircuitPythonBus DeviceRegisterPlease 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-hts221To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-hts221To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-hts221Usage Exampleimporttimeimportboardimportadafruit_hts221i2c=board.I2C()hts=adafruit_hts221.HTS221(i2c)whileTrue:print("Relative Humidity:%.2fpercent rH"%hts.relative_humidity)print("Temperature:%.2fC"%hts.temperature)time.sleep(1)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-httpserver
IntroductionHTTP Server for CircuitPython.Supportssocketpoolorsocketas a source of sockets; can be used in CPython.HTTP 1.1.Serves files from a designated root.Routing for serving computed responses from handlers.Gives access to request headers, query parameters, form data, body and client’s address (the one from which the request came).Supports chunked transfer encoding.Supports URL parameters and wildcard URLs.Supports HTTP Basic and Bearer Authentication on both server and route per level.Supports Websockets and Server-Sent Events.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 bundleor individual libraries can be installed usingcircup.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-httpserverTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-httpserverTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-httpserverInstalling 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_httpserverOr the following command to update an existing version:circupupdateSecurityThe HTTP server implementation in this package is not robust and should only be deployed on trusted networks.
For instance, there are trivial denial of service attacks against adafruit_httpserver.
Pull requests that improve the server’s security and robustness are of course welcome.ContributingContributions are welcome! Please read ourCode of Conductbefore contributing to help this project stay welcoming.DocumentationAPI documentation for this library can be found onRead the Docs.For information on building library documentation, please check outthis guide.
Package: adafruit-circuitpython-HTU21D
IntroductionThis driver enables you to use the Adafruit HTU21D-F temperature and
humidity breakout with CircuitPyton.DependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease 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-htu21dTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-htu21dTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-htu21dUsage Exampleimporttimeimportboardfromadafruit_htu21dimportHTU21D# Create sensor object, communicating over the board's default I2C busi2c=board.I2C()# uses board.SCL and board.SDAsensor=HTU21D(i2c)whileTrue:print("\nTemperature:%0.1fC"%sensor.temperature)print("Humidity:%0.1f%%"%sensor.relative_humidity)time.sleep(2)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-htu31d
IntroductionPython library for TE HTU31D temperature and humidity sensorsDependenciesThis driver depends on:Adafruit CircuitPythonBus DevicePlease 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-htu31dTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-htu31dTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-htu31dUsage Exampleimporttimeimportboardimportadafruit_htu31di2c=board.I2C()# uses board.SCL and board.SDAhtu=adafruit_htu31d.HTU31D(i2c)print("Found HTU31D with serial number",hex(htu.serial_number))htu.heater=Trueprint("Heater is on?",htu.heater)htu.heater=Falseprint("Heater is on?",htu.heater)whileTrue:temperature,relative_humidity=htu.measurementsprint("Temperature:%0.1fC"%temperature)print("Humidity:%0.1f%%"%relative_humidity)print("")time.sleep(1)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-hue
IntroductionCircuitPython helper library for Philips Hue Lights.DependenciesThis driver depends on:Adafruit CircuitPythonAdafruit CircuitPython SimpleIOAdafruit CircuitPython ESP32SPIPlease 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-hueTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-hueTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-hueUsage ExampleLoad bridge username and IP Address from secrets.py file:username=secrets['hue_username']bridge_ip=secrets['bridge_ip']my_bridge=Bridge(wifi,bridge_ip,username)Enumerate all lights on the bridgelights=my_bridge.get_lights()Turn on a lightmy_bridge.set_light(1,on=True)Turn off a lightmy_bridge.set_light(1,on=False)Set a light to the color yellow (RGB)color=my_bridge.rgb_to_hsb([255,255,0])my_bridge.set_light(1,hue=int(color[0]),sat=int(color[1]),bri=int(color[2]))Set a group of lights to a predefined scenemy_bridge.set_group(1,scene='AB34EF5')Set a group of lights to a predefined colormy_bridge.set_group(1,color)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.