Saravanan666/pypi-org huggingface dataset:
Package: adafruit-circuitpython-charlcd
IntroductionThis library is compatible with standard Character LCDs such as:Adafruit Standard LCD 16x2Adafruit RGB backlight negative LCD 16x2Adafruit RGB backlight negative LCD 20x4Installing from PyPIOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locallyfrom
PyPI. To install for current user:pip3installadafruit-circuitpython-charlcdTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-charlcdTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-charlcdDependenciesThis driver depends on:Adafruit CircuitPythonAdafruit CircuitPython BusDeviceAdafruit CircuitPython MCP230xxAdafruit CircuitPython 74HC595I2C & SPI displays also depend on:Bus DevicePlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading theAdafruit library and driver bundle.Usage ExampleTheCharacter_LCDclass interfaces a predefined Character LCD display with CircuitPython.importboardimportdigitalioimportadafruit_character_lcd.character_lcdascharacter_lcdYou must define the data pins (RS,EN,D4,D5,D6,D7) in your code before using theCharacter_LCDclass.
If you want to have on/offbacklightfunctionality, you can also define your backlight aslcd_backlight. Otherwise, the backlight
will always remain on. The following is an example setup.lcd_rs=digitalio.DigitalInOut(board.D7)lcd_en=digitalio.DigitalInOut(board.D8)lcd_d7=digitalio.DigitalInOut(board.D12)lcd_d6=digitalio.DigitalInOut(board.D11)lcd_d5=digitalio.DigitalInOut(board.D10)lcd_d4=digitalio.DigitalInOut(board.D9)lcd_backlight=digitalio.DigitalInOut(board.D13)You must also define the size of the CharLCD by specifying itslcd_columnsandlcd_rows:lcd_columns=16lcd_rows=2After you have set up your LCD, we can make the device by calling itlcd=character_lcd.Character_LCD_Mono(lcd_rs,lcd_en,lcd_d4,lcd_d5,lcd_d6,lcd_d7,lcd_columns,lcd_rows,lcd_backlight)To verify that your pins are correct, print a hello message to the CharLCD:lcd.message="Hello\nCircuitPython"Custom character example withcreate_char()is provided within /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-circuitplayground
IntroductionThis high level library provides objects that represent Circuit Playground Express and Bluefruit hardware.InstallationFor Circuit Playground Express, simply install CircuitPython to use this library - the library itself and
all of its dependencies are built into CircuitPython for Circuit Playground Express.For Circuit Playground Bluefruit, you must install this library and all of its dependencies. Please downloadthe latest Adafruit CircuitPython library bundle. Open the resulting
zip file, open the lib folder within, and copy the following folders and files to the lib folder on your
CIRCUITPY drive:adafruit_bus_device/adafruit_circuitplayground/adafruit_lis3dh.mpyadafruit_thermistor.mpyneopixel.mpyUsage ExampleUsing this library is super simple. Simply import thecpvariable from the module and then use it.fromadafruit_circuitplaygroundimportcpwhileTrue:ifcp.button_a:print("Temperature:",cp.temperature)cp.red_led=cp.button_bTo learn more about all the features of this library, check out theCircuitPython Made Easy on Circuit Playground Express and Bluefruit guideon the Adafruit Learn System.Circuit Playground Library DetailsFor a detailed explanation of how the Circuit Playground library functions, seeThe Technical Side pageof the CircuitPython Made Easy on Circuit Playground Express and Bluefruit guide.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-clue
IntroductionA high level library representing all the features of the Adafruit CLUEDependenciesThis driver depends on:Adafruit CircuitPythonBus DeviceRegisterAdafruit LSM6DSAdafruit LIS3MDLAdafruit APDS9960Adafruit BMP280Adafruit SHT31DAdafruit NeoPixelAdafruit Display TextPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Demos may require libraries not listed here.Usage ExampleThis example displays sensor and input data on the CLUE display.fromadafruit_clueimportclueclue.sea_level_pressure=1020clue_data=clue.simple_text_display(title="CLUE Sensor Data!",title_scale=2,num_lines=15)whileTrue:clue_data[0].text="Acceleration:{:.2f}{:.2f}{:.2f}".format(*clue.acceleration)clue_data[1].text="Gyro:{:.2f}{:.2f}{:.2f}".format(*clue.gyro)clue_data[2].text="Magnetic:{:.3f}{:.3f}{:.3f}".format(*clue.magnetic)clue_data[3].text="Pressure:{:.3f}hPa".format(clue.pressure)clue_data[4].text="Altitude:{:.1f}m".format(clue.altitude)clue_data[5].text="Temperature:{:.1f}C".format(clue.temperature)clue_data[6].text="Humidity:{:.1f}%".format(clue.humidity)clue_data[7].text="Proximity:{}".format(clue.proximity)clue_data[8].text="Gesture:{}".format(clue.gesture)clue_data[9].text="Color: R:{}G:{}B:{}C:{}".format(*clue.color)clue_data[10].text="Button A:{}".format(clue.button_a)clue_data[11].text="Button B:{}".format(clue.button_b)clue_data[12].text="Touch 0:{}".format(clue.touch_0)clue_data[13].text="Touch 1:{}".format(clue.touch_1)clue_data[14].text="Touch 2:{}".format(clue.touch_2)clue_data.show()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-colorsys
IntroductionCPython module Colorsys made available for 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.Usage ExampleSee example in docs/examples.rst.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-connectionmanager
IntroductionA urllib3.poolmanager/urllib3.connectionpool-like library for managing sockets and connectionsDependenciesThis 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 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-connectionmanagerTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-connectionmanagerTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.env/bin/activatepip3installadafruit-circuitpython-connectionmanagerInstalling 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_connectionmanagerOr the following command to update an existing version:circupupdateUsage ExampleThis library is used internally by libraries likeAdafruit_CircuitPython_RequestsandAdafruit_CircuitPython_MiniMQTTUsage examples are within theexamplessubfolder of this library.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-crickit
IntroductionThis convenience library makes coding for the Crickit robotics boards simpler and shorter.DependenciesThis driver depends on:Adafruit seesaw libraryAdafruit Motor libraryPlease 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-crickitTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-crickitTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-crickitUsage ExampleThis examples shows how to control all the devices supported by the library.
In most cases you just need a couple of imports.# This is a mock example showing typical usage of the library for each kind of device.fromadafruit_crickitimportcrickit# Add this import if using stepper motors.# It will expose constants saying how to step: stepper.FORWARD, stepper.BACKWARD, etc.fromadafruit_motorimportstepper# Set servo 1 to 90 degreescrickit.servo_1.angle=90# Change servo settings.crickit.servo_1.actuation_range=135crickit.servo_1.set_pulse_width_range(min_pulse=850,max_pulse=2100)# You can assign a device to a variable to get a shorter name.servo_2=crickit.servo_2servo_2.throttle=0# Run a continous servo on Servo 2 backwards at half speed.crickit.continuous_servo_2.throttle=-0.5# Run the motor on Motor 1 terminals at half speed.crickit.dc_motor_1.throttle=0.5# Set Drive 1 terminal to 3/4 strength.crickit.drive_1.fraction=0.75ifcrickit.touch_1.value:print("Touched terminal Touch 1")# A single stepper motor uses up all the motor terminals.crickit.stepper_motor.onestep(direction=stepper.FORWARD)# You can also use the Drive terminals for a stepper motorcrickit.drive_stepper_motor.onestep(direction=stepper.BACKWARD)# Note: On CPX Crickit, NeoPixel pin is normally connected to A1, not to seesaw,# so this part of the demo cannot control the NeoPixel terminal.# Strip or ring of 8 NeoPixelscrickit.init_neopixel(8)crickit.neopixel.fill((100,100,100))# Set the Crickit's on-board NeoPixel to a dim purple.crickit.onboard_pixel.brightness=0.01crickit.onboard_pixel[0]=(255,24,255)# orcrickit.onboard_pixel.fill((255,24,255))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-cst8xx
IntroductionCST8xx capacitive touch driver for CircuitPythonDependenciesThis 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 bundleor individual libraries can be installed usingcircup.Round RGB 666 TTL TFT Display - 2.1” 480x480 - Capacitive Touch - TL021WVC02CT-B1323Purchase 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-cst8xxTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-cst8xxTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.env/bin/activatepip3installadafruit-circuitpython-cst8xxInstalling 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_cst8xxOr the following command to update an existing version:circupupdateUsage Exampleimportboardimportadafruit_cst8xxctp=adafruit_cst8xx.Adafruit_CST8XX(board.I2C())events=adafruit_cst8xx.EVENTSwhileTrue:ifctp.touched:fortouch_id,touchinenumerate(ctp.touches):x=touch["x"]y=touch["y"]event=events[touch["event_id"]]print(f"touch_id:{touch_id}, x:{x}, y:{y}, event:{event}")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-cursorcontrol
IntroductionMouse cursor for interaction with CircuitPython UI elements such asbuttons.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-cursorcontrolTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-cursorcontrolTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-cursorcontrolUsage ExampleSee examples 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-dash-display
IntroductionCircuitPython library for creating Adafruit IO dashboards.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.Usage ExampleimporttimeimportsslimportboardfromdigitalioimportDigitalInOut,Direction,Pullimporttouchioimportsocketpoolimportwifiimportadafruit_minimqtt.adafruit_minimqttasMQTTfromadafruit_io.adafruit_ioimportIO_MQTTfromadafruit_dash_displayimportHubup=DigitalInOut(board.BUTTON_UP)up.direction=Direction.INPUTup.pull=Pull.DOWNselect=DigitalInOut(board.BUTTON_SELECT)select.direction=Direction.INPUTselect.pull=Pull.DOWNdown=DigitalInOut(board.BUTTON_DOWN)down.direction=Direction.INPUTdown.pull=Pull.DOWNback=touchio.TouchIn(board.CAP7)submit=touchio.TouchIn(board.CAP8)try:fromsecretsimportsecretsexceptImportError:print("WiFi secrets are kept in secrets.py, please add them there!")raisedisplay=board.DISPLAY# Set your Adafruit IO Username and Key in secrets.py# (visit io.adafruit.com if you need to create an account,# or if you need your Adafruit IO key.)aio_username=secrets["aio_username"]aio_key=secrets["aio_key"]print("Connecting to%s"%secrets["ssid"])wifi.radio.connect(secrets["ssid"],secrets["password"])print("Connected to%s!"%secrets["ssid"])# Create a socket poolpool=socketpool.SocketPool(wifi.radio)# Initialize a new MQTT Client objectmqtt_client=MQTT.MQTT(broker="io.adafruit.com",username=secrets["aio_username"],password=secrets["aio_key"],socket_pool=pool,ssl_context=ssl.create_default_context(),)# Initialize an Adafruit IO MQTT Clientio=IO_MQTT(mqtt_client)defpub_lamp(lamp):iftype(lamp)==str:lamp=eval(lamp)# pylint: disable=eval-usediot.publish("lamp",str(notlamp))# funhouse.set_text(f"Lamp: {not lamp}", 0)time.sleep(0.3)iot=Hub(display=display,io=io,nav=(up,select,down,back,submit))iot.add_device(feed_key="lamp",default_text="Lamp: ",formatted_text="Lamp:{}",pub_method=pub_lamp,)iot.add_device(feed_key="temperature",default_text="Temperature: ",formatted_text="Temperature:{:.1f}C",)iot.add_device(feed_key="humidity",default_text="Humidity: ",formatted_text="Humidity:{:.2f}%")iot.get()whileTrue:iot.loop()time.sleep(0.01)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-datetime
IntroductionBasic date and time types. Implements a subset of theCPython datetime module.NOTE: This library has a large memory footprint and is intended for hardware such as the SAMD51, ESP32-S2, and nRF52.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-datetimeTo install system-wide (this may be required in some cases):sudopip3installadafruit-circuitpython-datetimeTo install in a virtual environment in your current project:mkdirproject-name&&cdproject-namepython3-mvenv.venvsource.venv/bin/activatepip3installadafruit-circuitpython-datetimeUsage Example# Example of working with a `datetime` object# from https://docs.python.org/3/library/datetime.html#examples-of-usage-datetimefromadafruit_datetimeimportdatetime,date,time# Using datetime.combine()d=date(2005,7,14)print(d)t=time(12,30)print(datetime.combine(d,t))# Using datetime.now()print("Current time (GMT +1):",datetime.now())# Using datetime.timetuple() to get tuple of all attributesdt=datetime(2006,11,21,16,30)tt=dt.timetuple()foritintt:print(it)print("Today is: ",dt.ctime())iso_date_string="2020-04-05T05:04:45.752301"print("Creating new datetime from ISO Date:",iso_date_string)isodate=datetime.fromisoformat(iso_date_string)print("Formatted back out as ISO Date: ",isodate.isoformat())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.LicenseSee LICENSE/ for details.Copyright (c) 2001-2021 Python Software Foundation. All rights reserved.Copyright (c) 2000 BeOpen.com. All rights reserved.Copyright (c) 1995-2001 Corporation for National Research Initiatives. All rights reserved.Copyright (c) 1991-1995 Stichting Mathematisch Centrum. All rights reserved.
Package: adafruit-circuitpython-debouncer
IntroductionDebounces an arbitrary predicate function (typically created as a lambda) of 0 arguments.
The constructor also accepts a digital pin as a convienence.DependenciesThis driver depends on:Adafruit CircuitPythonAdafruit TicksPlease ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloadingthe Adafruit library and driver bundle.Usage Exampleimportboardimportdigitaliofromadafruit_debouncerimportDebouncerpin=digitalio.DigitalInOut(board.D12)pin.direction=digitalio.Direction.INPUTpin.pull=digitalio.Pull.UPswitch=Debouncer(pin)whileTrue:switch.update()ifswitch.fell:print('Just pressed')ifswitch.rose:print('Just released')ifswitch.value:print('not pressed')else:print('pressed')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-debug-i2c
IntroductionWrapper library for debugging I2C.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 ExampleThis example uses the LIS3DH accelerometer. This lib can be used with any I2C device. Save
the code to your board.importadafruit_lis3dhfromadafruit_debug_i2cimportDebugI2Cimportbusioimportboardimportdigitalioi2c=DebugI2C(busio.I2C(board.SCL,board.SDA))int1=digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT)accelerometer=adafruit_lis3dh.LIS3DH_I2C(i2c,address=0x19,int1=int1)print(accelerometer.acceleration)foriinrange(2):print(accelerometer.acceleration)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_prefixadafruit-circuitpython-debug_i2c--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.