Saravanan666/pypi-org huggingface dataset:
Package: robocorp-inspector
Robocorp InspectorRobocorp Inspector is a tool for exploring various user interfaces
and developing ways to target elements within them. An expression
that can target specific UI elemements is called alocator, and
these locators can be used to automate applications typically
used by humans.DependenciesYou might need to create a.npmrcfile at project level with contents similar to the following, but with your ownauthToken.
This is needed for private repositories.registry=https://registry.npmjs.org/
@robocorp:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXThere is a hard dependency to theInspector Commonsimplementation.
Most of the implementation resides ininspector-commonsand if you spot any misalignment then you should correct itDevelopmentThe project usesinvokefor overall project management,poetryfor
python dependencies and environments, andyarnfor Javascript dependencies
and building.Bothinvokeandpoetryshould be installed via pip:pip install poetry invokeTo see all possible tasks:invoke --listTo run the project:invoke runFor a quick build and run you can try running:inv build-js && inv build && inv runTo clean the dev environment you can useinv cleanorinv clean --forceAll source code is hosted onGitHub.Python & NPMTo launch the development environment you'll need:pyenv + virtualenv -> these will help building a dedicated python virtual environment
nvm -> will help with a contained version of node + npmIn order for everything to install and build properly use the following versions:python -> v3.8.10
node -> v16.14.2
npm -> 8.5.0UsageRobocorp Inspector is distributed as a Python package with all front-end
components compiled and included statically.If the package (and all required dependencies) is installed manually,
it can be run with the command:inspector.Code OrganizationAttention: these might change over time & hopefully they will be maintained.Inspector Class Diagramnot extremely precisecreated to show how things link together from local implementation toinspector-commons
Package: robocorp-inspector-commons
Robocorp Inspector CommonsRobocorp Inspector Commons is the commons package for Robocorp Inspector.DependenciesYou might need to create a.npmrcfile at project level with contents similar to the following, but with your ownauthToken.
This is needed for private repositories.registry=https://registry.npmjs.org/
@robocorp:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXDevelopmentThe project usesinvokefor overall project management,poetryfor
python dependencies and environments, andnpmfor Javascript dependencies
and building.Bothinvokeandpoetryshould be installed via pip:pip install poetry invokeTo see all possible tasks:invoke --listAll source code is hosted onGitHub.UsageRobocorp Inspector Commons is distributed as a Python package with all browser overlay
components compiled and included statically.Link to Automation Studio and running with Automation StudioTerminal 1:Automation Studio: runinvoke build-devInspector-commons: runinvoke linkasInspector-commons: runinvoke watchTerminal 2:Automation Studio/robotd: runinvoke startTerminal 3:Automation Studio: runinvoke start --port=<PORT robotd started in>
Package: robocorp-log
robocorp-logrobocorp-logis a library which provides comprehensible logging for Python with
a focus on Python automation, where detailed information on what happened and why a
failure occurs is of vital importance.Note: The format of the log is not a part of the API and should  not be relied
upon as it can change even between minor versions.WhyAlthough Python logging is flexible it may be hard to analyze the logging afterwards
and visualize it. Also, the format may end up using a big amount of disk space
and it may be tedious to add logging calls to all places of interest.Howrobocorp-logimproves those aspects by using a structured format which enables using less disk space
while also providing a viewer (log.html) for the generated content.Also, it provides utilities to setup logging so that logging is done automatically without having
to explicitly add calls to add content to the logging (although it's still possible to do so
when needed).UsageIt's recommended thatrobocorp-logis used throughrobocorp-tasksasrobocorp-taskswill configurerobocorp-login a streamlined way,
where you just need to worry about marking the entry point method with a@tasksdecorator and it'll automatically setup the auto-logging and provide the
log result inoutput/log.html.Configuring with pyproject.tomlrobocorp-taskstakes care of customizingrobocorp-logthroughpyproject.toml.
See therobocorp-tasksproject for more information (robocorp-logonly provides
the core logging structure and different libraries may customize it in different ways).Although the setup is done throughrobocorp-tasks, there are still
some APIs inrobocorp.logwhich are interesting to use such as:Utility methods to add a log message ascritical,warn,info,debug,exceptionUtility method to add anhtmlmessage (using thehtmlmethod).
Note that thehtmlmethod is tested for images with base64 contents in thelog.html,
other structures must be manually checked as they can break the layout. Also, keep
in mind that the provided html will be sanitized.Supressing logging throughsuppress_variables,suppress_methods,suppress.Hiding sensitive data (automatically based on variable or argument names with
names registered inadd_sensitive_variable_nameandadd_sensitive_variable_name_pattern)
or by passing the value to be hidden tohide_from_output.CaveatsThe auto import mode is done by having a pre-import hook which will change the AST
at runtime. This mostly works, but there are a couple of caveats to keep in mind:Debuggers may end up stepping into therobocorp-logcode in
many places even if such code isn't in the source code (you may want to configure
the debugger you're using to skip calls intorobocorp.logas that's usually
just an implementation detail).The logging needs to be fully setup prior to importing any module that should
be automatically logged.Working with coroutines (async,awaitandgreenlet) is not supported.GuidesDealing with sensitive dataThe.robologformatAPI ReferenceInformation on specific functions or classes:robocorp.logChangelogA list of releases and corresponding changes can be found in thechangelog.
Package: robocorp-log-pytest
robocorp-log-pytestrobocorp-log-pytestis a library which provides a pytest plugin which integratesrobocorp-logwithpytestso that auto-logging is provided for tests run withpytest.By default just having it in use without any configuration will
generate a./output/log.html(and by default at most 5.robologfiles,
each with 50MB may be created).It's possible to configure the output directory and html output name
as well as the maximum number of files and the max log file size.Note that if the logs actually start rotating information on
previous tests may be lost (so, in the testing case it's recommended
that the log files always cover the whole test run, which is why the
default limits are set to be 50MB * 5).Ideally for the testing use-case logs would keep the failures, but
this isn't currently implemented for robocorp-log (these would need
heuristics when removing old files to strip them instead of just remove them).ChangelogA list of releases and corresponding changes can be found in thechangelog.
Package: robocorp-planhat
Robocorp-Planhat: A Planhat API SDK integrated with Robocorp's Python Automation FrameworkThis automation library is designed for use withRobocorp's Python Automation Framework. It includes data modeling for the base Planhat API object types and a customized client and associated session for use in authenticating, retrieving, and updating those objects.InstallationThis project should be installed via yourconda.yamlwithin a Robocorp automation task package under your pip dependancies.ExperimentalWARNING: This library is currently experimental and missing several features such as full unit tests and documentation.
Package: robocorp-storage
robocorp-storagerobocorp-storageis a library which provides read and write access to theAsset Storagein Robocorp Control Room.Getting startedfromrobocorpimportstoragedefstore_email():storage.set_text("cosmin","cosmin@robocorp.com")print("E-mail:",storage.get_text("cosmin"))storage.delete_asset("cosmin")GuidesHandling different asset typesFurther user guides and tutorials can be found inRobocorp Docs.API ReferenceInformation on specific functions or classes:robocorp.storageChangelogA list of releases and corresponding changes can be found in thechangelog.
Package: robocorp-tasks
robocorp-tasksrobocorp-tasksis a Python framework designed to simplify the development
of Python automations.WhyWhile Python is widely used in the automation world, many solutions end up being
ad-hoc, making it difficult to navigate different projects and keep up with the
features required for analysing the results of such automations afterwards.Howrobocorp-tasksprovides a runner for running tasks that offers logging
out of the box for Python code (showing method calls, arguments, assigns, etc)
by leveragingrobocorp-log, and managing the lifecycle for running such tasks.Getting startedReplace the code in your__main__with a method that has the name of your task
(which should not have parameters) and decorate it with the@taskdecorator, like this:i.e.:from robocorp.tasks import task

@task
def my_task():
    ...Call your task using the command line below, customizing the directory and task name as needed:python -m robocorp.tasks run <path/to/file.py or directory> -t <task_name>Note: if you have only one defined task in your target, the-t <task_name>option is not needed.Note: the task name is the name of the method decorated with@task.Note: if a directory is given, only files named*task*.pywill be used for collection.Note: in the current version only one task can be run per invocation. If more than one task
is found an error will be given and no tasks will be run.View the log results inoutput/log.html.GuidesLogging customizationOutput customizationAPI ReferenceInformation on specific functions or classes:robocorp.tasksChangelogA list of releases and corresponding changes can be found in thechangelog.
Package: robocorp-truststore
TruststoreNoteThis is a fork of thetruststorepackage,
which adds additional configuration options for Robocorp projectsTruststore is a library which exposes native system certificate stores (ie "trust stores")
through anssl.SSLContext-like API. This means that Python applications no longer need to
rely on certifi as a root certificate store. Native system certificate stores
have many helpful features compared to a static certificate bundle like certifi:Automatically update certificates as new CAs are created and removedFetch missing intermediate certificatesCheck certificates against certificate revocation lists (CRLs) to avoid monster-in-the-middle (MITM) attacksManaged per-system rather than per-application by a operations/IT teamPyPI is no longer a CA distribution channel 🥳Right now truststore is a stand-alone library that can be installed globally in your
application to immediately take advantage of the benefits in Python 3.10+. Truststore
has also been integrated into pip as an opt-in method for verifying HTTPS certificates
with truststore instead of certifi.Long-term the hope is to make truststore the default way to verify HTTPS certificates in pip
and to add this functionality into Python itself. Wish us luck!InstallationTruststore is installed fromPyPIwith pip:$ python -m pip install truststoreTruststorerequires Python 3.10 or laterand supports the following platforms:macOS 10.8+ viaSecurity frameworkWindows viaCryptoAPILinux via OpenSSLUser GuideYou can injecttruststoreinto the standard librarysslmodule so the functionality is used
by every library by default. To do so use thetruststore.inject_into_ssl()function:importtruststoretruststore.inject_into_ssl()# Automatically works with urllib3, requests, aiohttp, and more:importurllib3http=urllib3.PoolManager()resp=http.request("GET","https://example.com")importaiohttphttp=aiohttp.ClientSession()resp=awaithttp.request("GET","https://example.com")importrequestsresp=requests.get("https://example.com")If you'd like finer-grained control you can create your owntruststore.SSLContextinstance
and use it anywhere you'd use anssl.SSLContext:importsslimporttruststorectx=truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)importurllib3http=urllib3.PoolManager(ssl_context=ctx)resp=http.request("GET","https://example.com")You can read more in theuser guide in the documentation.LicenseMIT
Package: robocorp-vault
robocorp-vaultrobocorp-vaultis a library that provides read and write access to theVaultin Robocorp Control Room, which can be used to store and retrieve secret values such as passwords.Getting startedA secret consists of a name, an optional description, and a map of
keys and values. For instance, one secret can be login credentials for a website,
which includes both a username and a password:fromrobocorp.tasksimporttaskfromrobocorpimportvault@taskdefinspect_secret():secret=vault.get_secret("login_credentials")print("Secret name:",secret.name)print("Secret description:",secret.description)print("Secret keys:",secret.keys())print("Secret value:",secret["username"])GuidesLocal developmentHiding valuesModifying secretsFurther user guides and tutorials can be found inRobocorp Docs.API ReferenceInformation on specific functions or classes:robocorp.vaultChangelogA list of releases and corresponding changes can be found in thechangelog.
Package: robocorp-windows
robocorp-windowsis a library which can be used for Windows desktop automation.The basic idea of the library is enabling windows and controls to be found
by leveraginglocators(i.e.: strings which identify how to reach some
window or control) and then interacting with such elements.There are 3 basic abstractions in the library:Desktop: enables findingWindowElements and interacting directly with the
desktop (so, actions which aren't tied to a Window or Control can be used directly
through theDesktop).WindowElement: enables findingControlElements and interacting with a Window.ControlElement: enables finding childControlElements and interacting with a specific Control.Note: these classes are always created by the library itself and are not expected
to be subclassed or instanced directly.UsageThe library concepts revolve around the idea that the window of interest will be
initially found usingfind_windowand then, with that window reference, other
controls can be queried and interacted with (for clicking, entering text, etc).Below is an example using the windows calculator:fromrobocorpimportwindows# Get the calculator windowcalc=windows.find_window("name:Calculator")# Press button 0 (the locator is dependent on the windows version).button0=calc.find('(name:Zero or name:0) and class:Button')button0.click()# Clear the calculator (the locator is dependent on the windows version).calc.click("id:clearButton or name:Clear")# Send the keys directly to the calculatorcalc.send_keys(keys="96+4=")GuidesUnderstanding LocatorsBuilding Locators using the builtin inspectorSpecial keysAPI ReferenceInformation on specific functions or classes:robocorp.windowsChangelogA list of releases and corresponding changes can be found in thechangelog.VersioningThis library uses semantic versioning, so, when a breaking change is done
a new major version is published, but beware that modules starting with an
underscore_inrobocorp.windowsare not considered
part of the public API and should not be imported directly (so, only objects/classes
reached from therobocorp.windowsnamespace should be used -- if access to some
other method/class is needed, please create a feature request to address it).
Package: robocorp-workitems
robocorp-workitemsWork items are used in Robocorp Control Room for managing data that go through
multiple steps and tasks inside a process. Each step of a process receives input
work items from the previous step, and creates output work items for the next
step.Getting startedThe library exposes two objects,inputsandoutputs, which are the main way
to interact with work item queues. The former deals with the reading input work
items, and the latter with creating output work items.A run inside Control Room will always have at least one work item available to
it. The simplest Robot which reads the current work item and creates an output
can be done in the following manner:fromrobocorpimportworkitemsfromrobocorp.tasksimporttask@taskdefhandle_item():item=workitems.inputs.currentprint("Received payload:",item.payload)workitems.outputs.create(payload={"key":"value"})Iterating over all available input items in the queue is also easy:fromrobocorpimportworkitemsfromrobocorp.tasksimporttask@taskdefhandle_all_items():foriteminworkitems.inputs:print("Received payload:",item.payload)workitems.outputs.create(payload={"key":"value"})Work item structureA work item's data payload is JSON and allows storing anything that is JSON
serializable. By default the payload is a mapping of key-value pairs.In addition to the payload section, a work item can also contain files, which
are stored within Robocorp Control Room. Adding and using files with work items
requires no additional setup from the user.GuidesReserving and releasing input itemsCreating outputsLocal developmentEmail triggeringCollecting all inputsFlow control with exceptionsModifying inputsFurther user guides and tutorials can be found inRobocorp Docs.API ReferenceInformation on specific functions or classes:robocorp.workitemsChangelogA list of releases and corresponding changes can be found in thechangelog.
Package: robocup-spl-rules-cli
RoboCup SPL Rules CLIOpen RoboCup SPL Rules in your web browser!
You can open rules of a particular year or default to the most recent rules.
Rules are taken fromhere.The regex should work until we hit a five digit year.
If humanity is still around by the year 10000 someone please fit it.Installationpip install robocup-spl-rules-cliUsageusage: rules [-h] [year]

open RoboCup SPL rules in your browser

positional arguments:
  year        the year of which to fetch the rules; defaults to most recent if ommited

optional arguments:
  -h, --help  show this help message and exit
Package: robodyno
robodynoInstallationpipinstallrobodynoUsageCommand Line Interfacerobodyno--helpPython APIimporttimefromrobodyno.interfacesimportCanBusfromrobodyno.componentsimportMotorcan_bus=CanBus()motor=Motor(can_bus)motor.enable()motor.set_pos(6.28)time.sleep(1)print(motor.get_pos())motor.disable()For more examples, please refer toexamplesdirectory.For more documentation, please refer todocs.
Package: robofab
RoboFab is a Python library with objects that deal with data usually associated with fonts and type design. RoboFab reads and writes UFO font files and works in any Python 2.3 (and 2.2.1), 2.4. 2.5, 2.6, 2.7. The RoboFab code for FontLab works in in FontLab 4.6, FontLab Studio 5.04, 5.1 and hopefully up.
Package: roboflex.audio-alsa
roboflex.audio_alsaSupport for reading audio data on linux from the Advanced Linux Sound Architecture (ALSA).System dependenciesRequires ALSA to be installed. More than likely, it already is installed in your distro. But if not:apt-get install libasound2 alsa-utils alsa-ossImportimport numpy
import roboflex.audio_alsa as raaNodesThere is only one:AudioSensor# all parameters optional: below are the defaults
audio_sensor = raa.AudioSensor(
    name = "WebcamSensor",
    channels = 1,
    sampling_rate = 48000,
    capture_frames = 512,
    produce_frames = 1024,
    bit_depth = raa.BitDepth.S16LE,
    device_name = "default",
)

# must be started (like all sensors)!
audio_sensor.start()Messagesfrom roboflex.audio_alsa import AudioData, AudioData32API:# the timestamp just before reading from device
message.t0 -> Float

# the timestamp just after reading from device
message.t1 -> Float

# the audio data read from the device
message.data -> np.array
    shape = [C, P] where C is channels, P is produce_frames
    dtype = np.int16DYNOFLEX:# the timestamp just before reading from device
message["t0"] -> Double

# the timestamp just after reading from device
message["t1"] -> Double

# the audio data read from the device
message.data -> np.array
    shape = [C, P] where C is channels, P is produce_frames
    dtype = np.int32OtherAvailable BitDepths:enum raa.BitDepth:
    S16LE,
    S24LE,
    S32LE,
    S24_3LE
Package: roboflex.audio-sdl
roboflex.audio_sdlSupport for reading audio data using Simple Directmedia Layer.System dependenciesRequires SDL to be installed. More than likely, it already is installed in your distro. But if not:apt-get install libsdl2-dev

# or maybe on mac:

brew install sdl2pip installpip install roboflex.audio_sdlImportimport roboflex.audio_sdl as rasNodesThere is only one:AudioSensor# all parameters optional: below are the defaults
audio_sensor = ras.AudioSensor(
    capture_id = -1,
    channels = 1,
    sampling_rate = 48000,
    capture_samples = 512,
    format = ras.BitDepth.F32,
    name = "AudioSensor",
    data_key = "data",
    debug = False,
)

# must be started (like all sensors)!
audio_sensor.start()

# you can get the realized channels and sampling rate (might be different from what you requested):
audio_sensor.sample_rate
audio_sensor.channels

# you can print the available detected devices, through a static method
ras.AudioSensor.show_devices()This sensor publishes a TensorMessage, with the audio data encoded into a tensor of shape (C, S), where C is num channels, and S is capture_samples, under the key <data_key>.OtherAvailable BitDepths:# wrapped from SDL_AudioFormat: https://wiki.libsdl.org/SDL2/SDL_AudioFormat

enum ras.BitDepth:
    S8,
    U8,
    S16LSB,
    S16MSB,
    S16SYS,
    S16,
    U16LSB,
    U16MSB,
    U16SYS,
    U16,
    S32LSB,
    S32MSB,
    S32SYS,
    S32,
    F32LSB,
    F32MSB,
    F32SYS,
    F32