Saravanan666/pypi-org huggingface dataset:
Package: localstack-extension-miniflare
Miniflare LocalStack extension (experimental)This extension makesMiniflare(dev environment for Cloudflare workers) available directly in LocalStack!⚠️ Please note that this extension is experimental and currently under active development.Installinglocalstackextensionsinstall"git+https://github.com/localstack/localstack-extensions/#egg=localstack-extension-miniflare&subdirectory=miniflare"How to useTo publish the sample application to Miniflare running in LocalStack, we can use thewranglerCLI with the following environment variables for local dev mode:export CLOUDFLARE_API_TOKEN=test
export CLOUDFLARE_API_BASE_URL=http://localhost:4566/miniflare
wrangler publishNote: if you're having troubles with this configuration, e.g., seeing "Fetch failed" error messages onwrangler publish, try using this API endpoint instead:export CLOUDFLARE_API_BASE_URL=https://localhost.localstack.cloud:4566/miniflareOnce deployed, the Cloudflare worker can be easily invoked viacurl:$ curl http://hello.miniflare.localhost.localstack.cloud:4566/test
Hello World!Change Log0.1.0: Upgrade to Miniflare 3.00.0.1: Initial version.LicenseThecloudflare/miniflarepackage and related tooling is licensed under the MIT License.The code of this LocalStack Extension is published under the Apache 2.0 license.
Package: localstack-extension-outages
LocalStack Outages ExtensionThis LocalStack extension can simulate outages for any AWS region or service.PrerequisitesLocalStack ProDockerPythonInstallationBefore installing the extension, make sure you're logged into LocalStack. If not, log in using the following command:localstackloginYou can then install this extension using the following command:localstackextensionsinstalllocalstack-extension-outagesConfigurationThe extension is configured using an API endpoint.
The configuration consists of a list of rules which are greedily evaluated.
Each rule consists of two attributes: service name and region.
You may use the*wildcard in either of these attributes.Start an outage for a list of specified service/region pairs using a POST request like follows:curl--location--requestPOST'http://outages.localhost.localstack.cloud:4566/outages'\--header'Content-Type: application/json'\--data'[{"service": "kms","region": "us-east-1"},{"service": "s3","region": "us-*"},{"service": "lambda","region": "*"}]'When activated, API calls to affected services and regions will return a HTTP 503 Service Unavailable error.In the above example, following are affected:KMS inus-east-1S3 in all US regions (us-east-1,us-east-2,us-west-1,us-west-2,us-gov-east-1andus-gov-west-1)Lambda in all regionsOutages may be stopped by using empty list in the configuration.
The following request will clear the current configuration:curl--location--requestPOST'http://outages.localhost.localstack.cloud:4566/outages'\--header'Content-Type: application/json'\--data'[]'To retrieve the current configuration, make the following GET call:curl--location--requestGET'http://outages.localhost.localstack.cloud:4566/outages'To add a new service/region rule pair to the configuration, make a PATCH call as follows:curl--location--requestPATCH'http://outages.localhost.localstack.cloud:4566/outages'\--header'Content-Type: application/json'\--data'[{"service": "transcribe", "region": "us-west-1"}]'To remove a service/region rule pair from the configuration, make a DELETE call as follows:curl--location--requestDELETE'http://outages.localhost.localstack.cloud:4566/outages'\--header'Content-Type: application/json'\--data'[{"service": "transcribe", "region": "us-west-1"}]'License(c) 2023 LocalStack
Package: localstack-extension-platform-observability
LocalStack Extension: System metric loggerLocalStack extension for logging system metricsInstall local development versionTo install the extension into localstack in developer mode, you will need Python 3.10, and create a virtual environment in the extensions project.In the newly generated project, simply runmakeinstallThen, to enable the extension for LocalStack, runlocalstackextensionsdevenable.You can then start LocalStack withEXTENSION_DEV_MODE=1to load all enabled extensions:EXTENSION_DEV_MODE=1localstackstartInstall from GitHub repositoryTo distribute your extension, simply upload it to your github account. Your extension can then be installed via:localstackextensionsinstall"git+https://github.com/localstack/localstack-extension-system-metrics-logger/#egg=localstack-extension-system-metrics-logger"UsageFetch aggregated metricscurllocalhost:4566/_extension/metrics/allFind lambda traces in/var/lib/localstack/cache/metrics/lambda-traces/
Package: localstack-extension-stripe
Stripe LocalStack extensionsA LocalStack extension that provides a mocked version ofStripeas a service.Installinglocalstackextensionsinstalllocalstack-extension-stripeUsingOnce installed, you can query stripe either throughlocalhost:4566/stripeorstripe.localhost.localstack.cloud:4566.curlstripe.localhost.localstack.cloud:4566/v1/customers\-usk_test_12345:\-ddescription="Customer data for Alice"Licensinglocalstripeis licensed under
the GNU General Public License version 3.localstack-extension-stripe (this project) does not modify localstripe in
any way
Package: localstack-s3-pyspark
localstack-s3-pysparkThis package provides a CLI for configuring pyspark to uselocalstackfor the S3 file system.
This is intended for testing packages locally (or in your CI/CD pipeline)
which you intend to deploy on an Amazon EMR cluster.InstallationExecute the following command, replacingpip3with the executable
appropriate for the environment where you want to configurepysparkto uselocalstack:pip3installlocalstack-s3-pysparkConfigure Spark's DefaultsIf you've installedlocalstack-s3-pysparkin a Dockerfile or virtual
environment, just run the following command:localstack-s3-pysparkconfigure-defaultsIf you've installedlocalstack-s3-pysparkin an environment with multiple
python 3.x versions, you may instead want to run an appropriate variation of
the following command (replacingpython3with the command used to access the
python executable for which you want to configure pyspark):python3-mlocalstack_s3_pysparkconfigure-defaultsToxPlease note that if you are testing your packages withtox(highly
recommended), you will need to:Include "localstack-s3-pyspark" in your toxdepsIncludelocalstack-s3-pyspark configure-defaultsin your toxcommands_pre(or by other means execute this command prior to your tests)Here is an exampletox.iniwhich starts up localstack using the localstack
CLI (you could also usedocker-composeor justdocker run, if you need
greater control or fewer python dependencies, see the the localstack
documentation"Getting Started" pagefor details):[tox]envlist=pytest[testenv:pytest]deps=localstack-s3-pysparklocalstackcommands_pre=localstack-s3-pyspark configure-defaultslocalstack start -dsleep 20commands=py.testcommands_post=localstack stopPatchboto3If your tests interact with S3 usingboto3, you can patch boto3 from within
your unit tests as follows:fromlocalstack_s3_pyspark.boto3importuse_localstackuse_localstack()
Package: localstack-utils
LocalStack UtilsThis Python utility streamlines the integration of Localstack, a local AWS cloud services mock, with unit tests. Seamlessly incorporate Localstack into your Python projects to facilitate efficient and reliable testing of AWS interactions within a controlled local environment. Enhance the development process by utilizing this utility to simulate AWS services during unit testing, ensuring robust and dependable code before deployment.PrerequisitesDockerLocalstackInstalationpipinstalllocalstack-utilsUsage exampleimporttimeimportboto3importunittestfromlocalstack_utils.localstackimportstartup_localstack,stop_localstackclassTestKinesis(unittest.TestCase):defsetUp(self):startup_localstack()deftearDown(self):stop_localstack()returnsuper().tearDown()deftest_create_stream(self):kinesis=boto3.client(service_name="kinesis",aws_access_key_id="test",aws_secret_access_key="test",endpoint_url="http://localhost:4566",)kinesis.create_stream(StreamName="test",ShardCount=1)time.sleep(1)response=kinesis.list_streams()self.assertGreater(len(response.get("StreamNames",[])),0)Change Log1.0.0: Repository URL fixed1.0.0: Initial version
Package: localStoragePy
localStoragePyA familiar API from the Web, adapted to storing data locally with Python.Get startedInstall using PyPi:$ pip3 install localStoragePyImport into your project:from localStoragePy import localStoragePySetup localStorage:localStorage = localStoragePy('your-app-namespace', 'your-storage-backend')your-app-namespace: whatever you want (example:me.jkelol111.mypythonapp) excluding path separators/ \or other disallowed characters in file name for your intended platformyour-storage-backend: your preferred storage backend (sqliteby default).Available storage backends:text: text files for each storage item.sqlite: a single database for all storage items.json: a single JSON file for all storage items.Use your typical localStorage syntax to store/read your strings:localStorage.getItem(item)localStorage.setItem(item, value)localStorage.removeItem(item)localStorage.clear()It's that familiar and simple.When is this useful?When you want to store tiny strings for your app...Or your app's configuration in JSON...Etcetra.
Package: localstore
localstoreThelocalstorepackage is a collection of Python modules for managing data in a local store. It includes modules for converting CSV files to a JSON dataset, managing data in a local JSON store, and creating a local API for accessing data in the store.InstallationTo install thelocalstorepackage, you can use pip:pip install localstoreUsageDatasetConverterTheDatasetConvertermodule provides a simple and intuitive API for converting CSV files to a JSON dataset. To use theDatasetConvertermodule, you can:Import theDatasetConvertermodule:fromlocalstore.DatasetConverterimportConverterCreate an instance of theConverterclass:converter=Converter()Convert all the CSV files in a specified directory to a JSON dataset:converter.Dataset_From_Directory('path/to/directory')Convert a single CSV file to a JSON dataset:converter.Dataset_From_File('path/to/file.csv')Create a JSON dataset file and a text file containing the length of the dataset:converter.Create_Dataset()LocalStoreTheLocalStoremodule provides a simple and intuitive API for managing data in a local JSON store. To use theLocalStoremodule, you can:Import theLocalStoremodule:fromlocalstore.LocalStoreimportLocalStoreCreate an instance of theLocalStoreclass:local_store=LocalStore()Add a new product to the local store:product={'name':'iPhone 13 Pro','main_category':'Electronics','sub_category':'Smartphones','image':'https://example.com/iphone-13-pro.jpg','link':'https://example.com/iphone-13-pro','ratings':'4.5','no_of_ratings':'100','discount_price':'999.00','actual_price':'1099.00'}local_store.Add_New_Product(product_name='Apple',data=product)Get a list of all the products in the local store:products=local_store.Show_product_List()Print the list of products:forproductinproducts:print(product)LocalAPITheLocalAPImodule provides a simple and intuitive API for creating a local API for accessing data in the store. To use theLocalAPImodule, you can:Import theLocalAPImodule:fromlocalstore.LocalAPIimportLocalAPICreate an instance of theLocalAPIclass:local_api=LocalAPI()Start the LocalAPI server:local_api.runServer()Send API requests to the LocalAPI server to perform CRUD operations on data in the local store:importrequests# Get a list of all the products in the local storeproducts=requests.get('http://localhost:5000/products/show/')# Print the list of productsforproductinproducts.json():print(product)ConclusionThelocalstorepackage is a powerful and easy-to-use Python package for managing data in a local store. It is a great choice for a variety of applications, including e-commerce websites, content management systems, data analysis applications, and any other application that needs to store data locally.ContributingContributions to LocalStore are welcome! Please read thecontributing guidelinesbefore submitting a pull request.LicenseLocalStore is licensed under theMIT License
Package: localthickness
localthicknessFast local thickness in 3D and 2D.
Implements the algorithm described inour CVPR-W (CVMI) paper.InstallationInstall the module usingpip install localthicknessor clone the repository.Useimportlocalthicknessaslt#  Make a binary test volume.B=lt.create_test_volume((100,500,400),sigma=15,boundary=0.001)# Compute thickness and separation.thickness=lt.local_thickness(B,scale=0.5)separation=lt.local_thickness(~B,scale=0.5)# Visualize.importmatplotlib.pyplotaspltfig,ax=plt.subplots(1,3,figsize=(10,5))ax[0].imshow(B[10])ax[1].imshow(thickness[10],cmap=lt.black_plasma())ax[2].imshow(separation[10],cmap=lt.white_viridis())PaperThe fast local thickness method is described and evaluated in our contribution to the 8th IEEE Workshop on Computer Vision for Microscopy Image Analysis (CVMI), held in conjunction with the CVPR 2023 conference. Please cite our paper if you use the method in your work.@inproceedings{dahl2023fast,
  title={Fast Local Thickness},
  author={Dahl, Vedrana Andersen and Dahl, Anders Bjorholm},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops},
  pages={4335--4343},
  year={2023}
}
Package: localtileserver
🌐 Local Tile Server for Geospatial RastersNeed to visualize a rather large (gigabytes+) raster?This is for you.A Python package for serving tiles from large raster files in
theSlippy Maps standard(i.e.,/zoom/x/y.png) for visualization in Jupyter withipyleafletorfolium.Launch ademoon MyBinderDocumentation:https://localtileserver.banesullivan.com/Built onrio-tiler🌟 HighlightsLaunch a tile server for large geospatial imagesView local or remote* raster files withipyleafletorfoliumin JupyterView rasters with CesiumJS with the built-in web application*remote raster files should be pre-tiled Cloud Optimized GeoTiffs🚀 UsageUsage details and examples can be found in the documentation:https://localtileserver.banesullivan.com/The following is a minimal example to visualize a local raster file withipyleaflet:fromlocaltileserverimportget_leaflet_tile_layer,TileClientfromipyleafletimportMap# First, create a tile server from local raster fileclient=TileClient('path/to/geo.tif')# Create ipyleaflet tile layer from that servert=get_leaflet_tile_layer(client)m=Map(center=client.center(),zoom=client.default_zoom)m.add(t)mℹ️ OverviewTheTileClientclass can be used to to launch a tile server in a background
thread which will serve raster imagery to a viewer (usuallyipyleafletorfoliumin Jupyter notebooks).This tile server can efficiently deliver varying resolutions of your
raster imagery to your viewer; it helps to have pre-tiled,Cloud Optimized GeoTIFFs (COGs).There is an included, standalone web viewer leveragingCesiumJS.⬇️ InstallationGet started withlocaltileserverto view rasters in Jupyter or deploy as your
own Flask application.🐍 Installing withcondaConda makes managinglocaltileserver's dependencies across platforms quite
easy and this is the recommended method to install:condainstall-cconda-forgelocaltileserver🎡 Installing withpipIf you prefer pip, then you can install from PyPI:https://pypi.org/project/localtileserver/pip install localtileserver💭 FeedbackPlease share your thoughts and questions on theDiscussionsboard.
If you would like to report any bugs or make feature requests, please open an issue.If filing a bug report, please share a scoobyReport:importlocaltileserverprint(localtileserver.Report())
Package: localtodo
.gitignore local todo files, but sync them through Dropbox.What this isI like to use aLOCAL_TODOfile for each of my projects as a
whiteboard for ideas, notes on what is currently being worked on
(useful when coming back to a project after some time), and things
in that vein.Because these files are not under version control, I use Dropbox to
sync them across machines (this also serves as a backup).What this script does is place such a file in a shared folder (for
example, managed by Dropbox), and then links this file into the
current directory.How to useInstall via:$ easy_install localtodoAdd the following line to your.gitignorefile (or something
equivalent for the respective ignore mechanism of your version
control system):/LOCAL_TODO*The trailing wildcard will allows for multiple todo files, something
this script supports.In your project directory, run:$ localtodo --to ~/Dropbox/todofiles
Creating new empty file ~/Dropbox/todofiles/myproject

I have established the following links for you:
    ./LOCAL_TODO --> ~/Dropbox/todofiles/myprojectNoteThe--toargument is only required the first time and is
cached in~/.localtodo.As you can see, this created a new file in your chosen folder, and
created a link to it in the current directory.By default, the name of the todo file will be inferred from the
basename of the current directory. You can also specify a custom name:$ localtodo foo
Creating new empty file ~/Dropbox/todofiles/foo

I have established the following links for you:
    ./LOCAL_TODO --> ~/Dropbox/todofiles/fooIf the todo file already exists, it will not be overridden. If
a LOCAL_TODO file already exists in the current directory, it will
be used and copied. So when you start working on your project on a
different machine, you again run the script:$ localtodo
Found existing file ~/Dropbox/todofiles/foo

I have established the following links for you:
    ./LOCAL_TODO --> ~/Dropbox/todofiles/fooMultiple todo files for one projectIt’s possible to createsub-todos:$ localtodo -s docs
Creating new empty file ~/Dropbox/todos/myproject.docs

I have established the following links for you:
    ./LOCAL_TODO.docs --> ~/Dropbox/todos/myproject.docsWhen runninglocaltodo, it will find all the todo files related
to the current project, and link all of them into the current
directory.
Package: local_tuya
local-tuyaInterface to Tuya devices over LAN.Featuresasynchronous methods and transportpersistent communication to the deviceautomatic remote device state updates (remotes can still be used)configurable buffering for subsequent updatesconstraints between device commandsDomoticz plugin using a dedicated thread💡 For now, only v3.3 is supported as I only own devices using this version.Exampleslocal-tuya-ceiling-fanairton-acRequirementsTo control a device you will need these 3 things:the device IDthe device local IP addressthe device local key (encryption key generated upon pairing)⚠️ This library does not provide support for getting these.
See how to do that using any of those projects:tuyapitinytuyaGenerous thanks to the maintainers of those tools for details on interfacing with Tuya devices.⚠️ Keep in mind that:After pairing the devices, it's recommended to assign static IPs in your router.If you reset or re-pair devices the local key will change.You can delete your tuya IOT account but not the SmartLife one and devices should be kept there.For state updates to be received properly, the device needs to be able to access the Tuya backend.ArchitectureThis library is composed of two main components:the Tuya protocolthe deviceProtocolThe protocol is responsible for handling communication details with the Tuya device.
Its interface consists of an asynchronous method to update the device and accepts a callback to subscribe to state changes.Seeprotocol module.DeviceThe device handles higher level functional logic such as buffering, constraints and specific device commands.Seedevice module.Domoticz plugin toolsSeeDomoticz tools package.
Package: local-tuya-ceiling-fan
local-tuya-ceiling-fanControl a Tuya Ceiling fan over LAN.Featuresasynchronous methods and transportpersistent communication to the deviceautomatic remote device state updates (remotes can still be used)configurable buffering for subsequent updatesconstraints between device commandsDomoticz plugin using a dedicated threadUsageSeelocal tuya requirementsfirst to find device information.Example usage:fromlocal_tuyaimportDeviceConfig,ProtocolConfigfromlocal_tuya_ceiling_fanimportFanDevice,FanSpeedasyncwithFanDevice(DeviceConfig(ProtocolConfig("{id}","{address}",b"{key}")))asdevice:awaitdevice.switch(True)awaitdevice.set_speed(FanSpeed.L2)awaitdevice.switch(False)💡 There is a safety mechanism that turns off the fan and waits 30s before changing the direction.Domoticz pluginThe plugin requires having fetched device information using instructions above.
Make sure to readplugin instructionsfirst.💡 The Domoticz version should be2022.1or higher.python-mpipinstall--upgradelocal-tuya-ceiling-fan[domoticz]python-mlocal_tuya_ceiling_fan.domoticz.installDomoticz path defaults to~/domoticzbut you can pass a-poption to the second command to change that:python-mlocal_tuya_ceiling_fan.domoticz.install-p/some/other/pathRestart Domoticz and create a new Hardware usingTuya Ceiling Fan. Fill in device information and add.
The hardware will create up to 5 devices to control the fan (all prefixed with hardware name):power: turn the fan on or offspeed: set the speeddirection: set directionlight: turn the light on or offmode: set the operating modeYou can customize the devices you want added in the hardware page.All device names and levels can be changed once added as only IDs are used internally.
Package: local-tuya-domoticz-tools
local-tuya-domoticz-toolsTools to create a Domoticz plugin for local-tuya devices.💡 The Domoticz version should be2022.1or higher.Creating the pluginTo create a plugin, you will need to create 2 things.Plugin metadataThis is the XML header that is used to populate the plugin creation page in Domoticz.
You can create it usinglocal_tuya_domoticz_tools.PluginMetadata.Starting the device.To start the plugin, you need to create the device and register the units.Checklocal_tuya_domoticz_tools.plugin.plugin.OnStartfor the function signature.Units should be created usingmanager.register(...).For a switch unit, it would look like:fromtypingimportDictfromlocal_tuyaimportDeviceConfig,ProtocolConfigfromlocal_tuya_domoticz_toolsimportUnitManager,switch_unitfrommy_deviceimportSwitchState,SwitchDevicedefon_start(protocol_config:ProtocolConfig,_:Dict[str,str],manager:UnitManager[SwitchState],)->SwitchDevice:device=SwitchDevice(config=DeviceConfig(protocol=protocol_config))manager.register(switch_unit(id_=1,name="power",image=9,command_func=device.switch,),lambdas:s.power,)returndeviceUnitsUnits represent a Domoticz device and is associated to a Domoticz hardware.ManagerThe role of the manager is tocreate/remove units:registermethoddispatch the commands from units:on_commandmethodupdate units state:updatemethodUnit typesswitchselector switchtemperature(accepts values preprocessor)set pointFor common units parameters, see thebase.Installing the pluginYou should provide a script that will be used to install the plugin.
It would look like:fromlocal_tuya_domoticz_toolsimportinstall_plugin,PluginMetadatadefon_start(...):...if__name__=="__main__":install_plugin(metadata=PluginMetadata(...),on_start=on_start,import_path="my_device.domoticz",)💡 Domoticz path defaults to~/domoticza-poption can be passed to change that.Filtering unitsYou can automatically add an option to the plugin to filter created units.To enable it, you need to implementlocal_tuya_domoticz_tools.UnitIdand add all unit IDs, then simply pass it to theinstallfunction.UnitManager.registerwill handle device deletion.
Package: localwiki-geocode-pagenames
Testing out a really rough, semi-automated pagename geocode thing using the
LocalWiki API.The idea is that you’d run this against a LocalWiki instance and it will add
maps to pages that don’t have maps but have page names that look a lot like addresses.This is really only useful for LocalWikis that were birthed from a legacy wiki
import or something where you’ve got lots of pages with addresses-for-pagenames
but no maps.To install:$ pip install localwiki-geocode-pagenamesTo run:$ localwiki-geocode-pagenamesWhy?This was thrown together when migrating ArborWiki.org from their old wiki
software.  They had a lot of pagenames like “34 South Parkside” but the pages
themselves lacked maps.