Saravanan666/pypi-org huggingface dataset:
Package: adafruit-circuitpython-json-stream
IntroductionThis library is a reimplementation and subset ofjson_stream. It enables reading JSON data from a stream rather that loading it all into memory at once. The interface works like lists and dictionaries that are usually returned fromjson.load()but require in-order access. Out of order accesses will lead to missing keys and list entries.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 PyPIThis library is on PyPI for editors that use it for CircuitPython. In CPython,
it is recommended to usejson_streamitself.Installing 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_json_streamOr the following command to update an existing version:circupupdateUsage Exampleimportsslimporttimeimportadafruit_requestsimportsocketpoolimportwifiimportadafruit_json_streamasjson_streampool=socketpool.SocketPool(wifi.radio)session=adafruit_requests.Session(pool,ssl.create_default_context())SCORE_URL="http://site.api.espn.com/apis/site/v2/sports/baseball/mlb/scoreboard"whileTrue:resp=session.get(SCORE_URL)json_data=json_stream.load(resp.iter_content(32))foreventinjson_data["events"]:if"Seattle"notinevent["name"]:continueforcompetitioninevent["competitions"]:forcompetitorincompetition["competitors"]:print(competitor["team"]["displayName"],competitor["score"])resp.close()time.sleep(60)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-jwt
IntroductionJSON Web Token (JWT) Authentication module for CircuitPython. JSON Web Tokens are an open, industry standardRFC 7519method for representing claims securely between two parties.This library currently supports the following signature algorithms for JWT generation and verification:No encoding (“none”)RS256/SHA-256 (viaAdafruit_CircuitPython_RSA)RS384/SHA-384 (viaAdafruit_CircuitPython_RSA)RS512/SHA-512 (viaAdafruit_CircuitPython_RSA)DependenciesThis driver depends on:Adafruit CircuitPythonAdafruit_CircuitPython_RSAAdafruit_CircuitPython_binasciiPlease 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-jwtTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-jwtTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-jwtUsage ExampleGenerating encoded JWTimportadafruit_jwt# Import Private RSA key from a secrets.py filetry:fromsecretsimportsecretsexceptImportError:print("WiFi secrets are kept in secrets.py, please add them there!")raise# Create JWT Claimsclaims={"iss":"joe","exp":1300819380,"name":"John Doe","admin":True}# Generate JWT, sign with RSA private key and RS-256encoded_jwt=adafruit_jwt.JWT.generate(claims,secrets["private_key"],algo="RS256")print("Encoded JWT: ",encoded_jwt)Validating a generated JWT, encoded_jwt.importadafruit_jwtdecoded_jwt=adafruit_jwt.JWT.validate(encoded_jwt)# The decoded JWT's JOSE header and claims set are returned as a tupleprint('JOSE Header:{}\nJWT Claims:{}'.format(decoded_jwt[0],decoded_jwt[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-l3gd20
IntroductionAdafruit 9-DOF Absolute Orientation IMU Fusion Breakout - L3GD20 DriverDependenciesThis driver depends on:Adafruit CircuitPythonRegisterPlease 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-l3gd20To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-l3gd20To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-l3gd20Usage ExampleOf course, you must import the library to use it:importadafruit_l3gd20This driver takes an instantiated and active I2C object as an argument
to its constructor.importboardi2c=board.I2C()Once you have the I2C object, you can create the sensor object:sensor=adafruit_l3gd20.L3GD20_I2C(i2c)And then you can start reading the measurements:print(sensor.gyro)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-lc709203f
IntroductionLibrary for I2C LC709203F battery status and fuel gaugeDependenciesThis 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 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-lc709203fTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lc709203fTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lc709203fUsage ExampleExamples of using this module are in 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.
Package: adafruit-circuitpython-led-animation
IntroductionPerform a variety of LED animation tasksDependenciesThis 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-led-animationTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-led-animationTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-led-animationUsage Exampleimportboardimportneopixelfromadafruit_led_animation.animation.blinkimportBlinkimportadafruit_led_animation.colorascolor# Works on Circuit Playground Express and Bluefruit.# For other boards, change board.NEOPIXEL to match the pin to which the NeoPixels are attached.pixel_pin=board.NEOPIXEL# Change to match the number of pixels you have attached to your board.num_pixels=10pixels=neopixel.NeoPixel(pixel_pin,num_pixels)blink=Blink(pixels,0.5,color.PURPLE)whileTrue:blink.animate()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.Building locallyZip release filesTo build this library locally you’ll need to install thecircuitpython-build-toolspackage.python3-mvenv.venvsource.venv/bin/activatepipinstallcircuitpython-build-toolsOnce installed, make sure you are in the virtual environment:source.venv/bin/activateThen run the build:circuitpython-build-bundles--filename_prefixcircuitpython-led_animation--library_location.Sphinx documentationSphinx is used to build the documentation based on rST files and comments in the code. First,
install dependencies (feel free to reuse the virtual environment from above):python3-mvenv.venvsource.venv/bin/activatepipinstallSphinxsphinx-rtd-themeNow, once you have the virtual environment activated:cddocssphinx-build-E-W-bhtml._build/htmlThis will output the documentation todocs/_build/html. Open the index.html in your browser to
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
locally verify it will pass.
Package: adafruit-circuitpython-lidarlite
IntroductionA CircuitPython & Python library for Garmin LIDAR Lite sensors over I2CDoes not work with Lidar Lite v4 at this time, no ETA when it may be added - PRs accepted!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-lidarliteTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lidarliteTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lidarliteUsage ExamplesV3 Exampleimporttimeimportboardimportbusioimportadafruit_lidarlite# Create library object using our Bus I2C porti2c=busio.I2C(board.SCL,board.SDA)# Default configuration, with only i2c wiressensor=adafruit_lidarlite.LIDARLite(i2c)whileTrue:try:# We print tuples so you can plot with Mu Plotterprint((sensor.distance,))exceptRuntimeErrorase:# If we get a reading error, just print it and keep truckin'print(e)time.sleep(0.01)# you can remove this for ultra-fast measurements!V3 HP Exampleimporttimeimportbusioimportboardimportadafruit_lidarlitei2c=busio.I2C(board.SCL,board.SDA)sensor=adafruit_lidarlite.LIDARLite(i2c,sensor_type=adafruit_lidarlite.TYPE_V3HP)whileTrue:try:print(f"Sensor ID#:{sensor.unit_id}")print(f"Distance ={sensor.distance}")print(f"  Strength:{sensor.signal_strength}")exceptRuntimeErrorase:print(e)try:print(f"Status: 0b{sensor.status:b}")print(f"  Busy:{bool(sensor.status&adafruit_lidarlite.STATUS_BUSY_V3HP)}")print(f"  Overflow:{bool(sensor.status&adafruit_lidarlite.STATUS_SIGNAL_OVERFLOW_V3HP)}")print(f"  Health: 0b{sensor.health_status:b}")print(f"  Power Control: 0b{sensor.power_control:b}")print(f"  I2C Config: 0b{sensor.i2c_config:b}")print(f"  Test Command: 0b{sensor.test_command:b}")print(f"  Correlation: 0b{sensor.correlation_data}")exceptRuntimeErrorase:print(e)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-lifx
IntroductionControlLIFX devicesover the internet using CircuitPython.DependenciesThis driver depends on:Adafruit CircuitPythonYou’ll also need a library to communicate with an ESP32 as a coprocessor using a WiFiManager object. This library supports connecting an ESP32 using either SPI or UART.SPI:Adafruit CircuitPython ESP32SPIUART:Adafruit CircuitPython ESP_ATcontrolPlease 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-lifxTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lifxTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lifxUsage ExampleInitialize the LIFX API Client with a WiFiManager object and aLIFX Personal Access token:lifx=adafruit_lifx.LIFX(wifi,lifx_token)Set aLIFX selectorlabel to identify the LIFX device to communicate with.lifx_light='label:Lamp'List all connected LIFX devices:lights=lifx.list_lights()Toggle the state of a LIFX device:lifx.toggle_light(lifx_light)Set the brightness of a LIFX device to 50%:lifx.set_brightness(lifx_light,0.5)Set the color of a LIFX device to blue and the brightness to 100%:lifx.set_color(lifx_light,'on','blue',brightness=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-lis2mdl
IntroductionAdafruit CircuitPython module for the LIS2MDL 3-axis magnetometerDependenciesThis 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-lis2mdlTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lis2mdlTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lis2mdlUsage Exampleimporttimeimportboardimportadafruit_lis2mdli2c=board.I2C()# uses board.SCL and board.SDAsensor=adafruit_lis2mdl.LIS2MDL(i2c)whileTrue:mag_x,mag_y,mag_z=sensor.magneticprint('Magnetometer (uT): ({0:10.3f},{1:10.3f},{2:10.3f})'.format(mag_x,mag_y,mag_z))print('')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-lis331
IntroductionA library for the ST LIS331 family of high-g 3-axis accelerometersDependenciesThis 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-lis331To install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lis331To install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lis331Usage Exampleimporttimeimportboardimportadafruit_lis331i2c=board.I2C()# uses board.SCL and board.SDAlis=adafruit_lis331.LIS331(i2c)whileTrue:print("Acceleration : X:%.2f, Y:%.2f, Z:%.2fms^2"%lis.acceleration)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-lis3dh
IntroductionAdafruit CircuitPython module for the LIS3DH accelerometer.Note this module is made to work with CircuitPython and not MicroPython APIs.Usage ExampleSee the guide at:https://learn.adafruit.com/circuitpython-hardware-lis3dh-accelerometerDependenciesThis 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-lis3dhTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lis3dhTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lis3dhDocumentationAPI 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-lis3mdl
IntroductionCircuitPython helper library for the LIS3MDL 3-axis magnetometerDependenciesThis 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-lis3mdlTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lis3mdlTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lis3mdlUsage Exampleimporttimeimportboardimportadafruit_lis3mdli2c=board.I2C()# uses board.SCL and board.SDAsensor=adafruit_lis3mdl.LIS3MDL(i2c)whileTrue:mag_x,mag_y,mag_z=sensor.magneticprint('X:{0:10.2f}, Y:{1:10.2f}, Z:{2:10.2f}uT'.format(mag_x,mag_y,mag_z))print('')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-logging
IntroductionLogging module 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.Usage Exampleimportadafruit_loggingaslogginglogger=logging.getLogger('test')logger.setLevel(logging.ERROR)logger.info('Info message')logger.error('Error message')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-lps2x
IntroductionLibrary for the ST LPS2x family of barometric pressure 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 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-lps2xTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lps2xTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lps2xUsage Exampleimporttimeimportboardimportadafruit_lps2xi2c=board.I2C()# uncomment and comment out the line after to use with the LPS22# lps = adafruit_lps2x.LPS22(i2c)lps=adafruit_lps2x.LPS25(i2c)whileTrue:print("Pressure:%.2fhPa"%lps.pressure)print("Temperature:%.2fC"%lps.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-lps35hw
IntroductionA driver for the ST LPS35HW water resistant mems pressure 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-lps35hwTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-lps35hwTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-lps35hwUsage ExampleSee the guide at:https://learn.adafruit.comDocumentationAPI 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.