Saravanan666/pypi-org huggingface dataset:
Package: localfunk
Local FunkWhatLocalfunk proxies lambda invocations to local code.Usagepipenv install --dev localfunkpipenv run localfunkWhyServerless development leverages a lot of proprietry tools that are difficult to run locally. They can difficult to set up, and often lack features. For exampleSam local start-api:requiresSam buildto be run on every code change, which can beveryslow.doesn't currently support HTTP APIdoesn't currently support Custom AuthorizersThere is a lot or effort put into trying to replicate API Gateway locally withstart-apiand it can be hard to keep features in sync with the deployed service.Localfunk attempts to leverage Cloud services while still allowing local code changes to be run immediately, without a build or deploy step.HowNgrok is started locallyFunction code is packaged that proxies invocations to local codeSam deployis run to deploy the template and the proxy function codeA Flask server is started locally to route events to the local codeThe function CodeURI and environment variables are loaded to emulate the Lambda environmentEven though code is being run locally there will still need to be changes to the template  e.g changing permissions and since the localfunk build process is simpler than a fullSam build, it will be quicker to get these changes deployed.The Lambda environment variables include a session token set from the function role, by loading the environment variables locally the local code will run using the role that is defined for the function.Possible ImprovementsRun ngrok as a deamon and check for a running instance before starting a new one. Can also check template to see if ngrok has changed. This will speed up stopping and starting because there won't need to be a redeploy if it hasn't changed.Docker-lambdais currently not integrated but adding it would bring the local invocation closer to the real Lambda environment.Localfunk currently only works with AWS::Serverless::Function andSam Deploybut could work with raw Cloudformation.This library only supports calling Python local Python code but the same pattern would work for other languages. Due to the way that the code is loaded and invocated it seems simpler to run Python code from Python but maybe it would work to create a generic CLI tool that could invoke any language.
Package: localgpt
🔥 PⒶutoBot 🔥Private AutoGPT Robot- Your private task assistant with GPT!🔥Chatto your offlineLLMs on CPU Only.100% private, no data leaves your execution environment at any point.🔥Ask questionsto your documents without an internet connection. Engine developed based onPrivateGPT.🔥Automate taskseasily withPAutoBot plugins. Easy for everyone.🔥Easy coding structurewithNext.jsandPython. Easy to understand and modify.🔥Built withLangChain,GPT4All,Chroma,SentenceTransformers,PrivateGPT.The supported extensions are:.csv: CSV,.docx: Word Document,.doc: Word Document,.enex: EverNote,.eml: Email,.epub: EPub,.html: HTML File,.md: Markdown,.msg: Outlook Message,.odt: Open Document Text,.pdf: Portable Document Format (PDF),.pptx: PowerPoint Document,.ppt: PowerPoint Document,.txt: Text file (UTF-8),I. Installation and Usage1. InstallationPython 3.8 or higher.InstallPAutoBot:pipinstallpautobot2. UsageRun the app:python-mpautobot.appor just:pautobotGo tohttp://localhost:5678/to see the user interface. You can choose one of the two modes:Chat OnlyDocuments Q&AUpload some documents to the app (see the supported extensions above). You can trydocs/python3.11.3_lite.zipfor a quick start. This zip file contains 45 files from thePython 3.11.3 documentation.Force ingesting documents withIngest Databutton.You can also run PAutoBot publicly to your network or change the port with parameters. Example:pautobot--host0.0.0.0--port8080II. Development1. Clone the source codegitclonehttps://github.com/nrl-ai/pautobotcdpautobot2. Run your backendPython 3.8 or higher.To install Pautobot from source, frompautobotsource code directory, run:pipinstall-e.Run the app:python-mpautobot.appGo tohttp://localhost:5678/to see the user interface.2. Run your frontendInstall the dependencies:cdfrontend
npminstallRun the app:npmrundevGo tohttp://localhost:3000/to see the user interface. Use this address to develop the frontend.
Package: localhook
localhookWebhooks delivered on terminalInstallation$pipinstalllocalhook---> 100%Run itRun the server with:$localhook--port9090Webhooks Delivered Locally🎉 Ready to receive webhooks on terminal 👍🎉 Set your webhook URL as http://50c3f3e44dca.ngrok.io🎉 Traffic stats available on http://127.0.0.1:4040Now set the URL to receive the webhooks in terminal
Package: localhost-on-colab
localhost-on-colabThin wrapper to help you run localhost stuff on colab.Running webapps(or other localhost stuff) on the colab GPU is much easier with this module.Usagefromlocalhost_on_colab.coreimportLocalHostOnColabbridge=LocalHostOnColab()url=bridge.run(function=some_function,kwargs={},port=5000)print(url)Flask ExampleImports + mininmal flask appfromflaskimportFlaskfromlocalhost_on_colab.coreimportLocalHostOnColabapp=Flask(__name__)@app.route("/")defhello():return"Hello :)"Running the bridgebridge=LocalHostOnColab()url=bridge.run(function=app.run,kwargs={'port':8989},port=8989,)print(url)FastAPI exampleImports + mininmal fastAPI appimportuvicornfromfastapiimportFastAPIfromlocalhost_on_colab.coreimportLocalHostOnColabapp=FastAPI()@app.get('/')asyncdefhome():return"Hello Santa"Running the bridgebridge2=LocalHostOnColab()url=bridge2.run(function=uvicorn.run,kwargs={'app':app,'port':9999},port=9999,)print(url)
Package: localizable
python-localizable==================Localizable.strings parser for Python# UsageInstall using pip.$ pip install localizableYou can either parse a full string directly or pass a file path:import localizablestrings = localizable.parse_strings(filename='Localizable.strings')strings = localizable.parse_strings(content="content of .strings file") # this works tooThe output format is an array of dictionaries, in order, with the following key/value pairs:/* Comment */"Key" = "Value";* `key`: "Key"* `value`: "Value"* `comment`: "Comment"# LicenseGPLv2. Adapted from Transifex.
Package: localizablestrings
LocalizablestringsA simple reader and writer for Localizable.strings files as used by Xcode projects.Installationpip install localizablestringsUsagefromlocalizablestringsimportStringsFile,Translationsf=StringsFile('/path/to/Localizable.strings')fortranslationinsf:print(f'Key ={translation.key}\nValue ={translation.value}\nComment ={translation.comment}')ifsf.get_translation('spam')isNone:new_translation=Translation(key='spam',value='eggs',comment='Needs more bacon')sf.add_translation(new_translation)sf.write()
Package: localization-patched
LocalizationThe Localization package provides tools for multilateration and triangulation
in 2D, 3D, and on the Earth’s surface. The current Earth model supported by the
package is called ‘Earth1’, which models the Earth as an ideal sphere with a radius
of 6378.1 kilometers.Original repo:https://github.com/kamalshadi/LocalizationTypical usage of the package:importlocalizationaslxTo initialize a new localization Project, use:P=lx.Project(mode=<mode>,solver=<solver>)Currently, three modes are supported:2D3DEarth1And three solvers can be utilized:LSE for least square errorLSE_GC for least square error with geometric constraints. Geometric constraints
force the solutions to be in the intersection areas of all multilateration circles.CCA for the centroid method, i.e., the solution will be the centroid of the
intersection area. If no common intersection area exists, the area with the
maximum overlap is used.To add anchors to the project, use:P.add_anchor(<name>,<loc>)wherenamedenotes the user-provided label of the anchor and<loc>is the location
of the anchor provided as a tuple, e.g., (120, 60).To add a target, use:t,label=P.add_target()Tis the target object, andlabelis the package-provided label for the target.Distance measurements must be added to the target object like:t.add_measure(<anchor_label>,<measured_distance>)Finally, runningP.solve()will locate all targets. You can access the estimated
location of the targettbyt.loc.t.locis a point object. Point objectBhas “x”, “y”, “z” coordinates available byB.x,B.y,B.zrespectively.InstallationInstall the package via pip:pipinstalllocalizationContact:kamal.shadi85@gmail.comAn ExampleBasicTo be completed:READMEDOC
Package: localization-sync
Localization SyncThis is a python script that downloads localization strings and CI color information from a publicGoogle Sheetand generates resource files for iOS and Android projects.InstallationThis uses thepippackage manager for Python packages (see guide). It depends on thepyexcel-odspackage which will be installed alongsite automatically when you run:pip install localization-syncHint: It could be that you need to usepip3command instead ofpip.Prerequisites1. Create a Google SheetCreate a Google Sheet document with sheets likethese:Mind tonotadd extra columns or rows at the top/left of your tables. I you need to do so, usekeyRow/keyColumnparameters in config to inset the parsing of the table.2. PublishPublish the sheeet to the web by pressingFile -> Publish to the web. SelectWhole DocumentandWebsite. This enables the script do export the contents of the sheet as ODS file.Note: We are using the export instead of the JSON API. Because this way there is no need for creating an API Key and using OAuth on the client (your) side.3. Get the IDFind the ID of your document by copying it from your browsers address bar.UsageCreate adata_sync.config.jsonin your project and populate it with the contents of theexample config. Replace thesheetIdwith your own. You can modify the other settings to fit the needs of your project.Then open a terminal at your project path and runl10n_sync. Look for your newly created resource files.You can also copydata_sync.pyto your project and then runpython3 data_sync.pywhen your config file is ready.ExampleHave a look into theOutput folderfor some example files generated by using the providedconfiguration file.
Package: localizator
# LocalizatorPurpose of this simple package is to give easy to use abstractions for localizing your python app. Generally this package was made just for my telegram bots.## InitializationFirstly, you have to create localizator object:```Pythonfrom localizator import Localizatorlocalizator = Localizator()```Also, you could pass `LocalizationsProvider` and default language. LocalizationsProvider is fabric that creates `Localization`s objects by language name.By default it will use YAML implementation that looks for `*.yaml` files inside `localizations` directory, but you could create your own localizations provider or at least change directory if it's necessary.If you did not change anything in localizator initialization, create directory inside working directory called `localizations` and create file `en.yaml` with example content:```yamlfoo: barextended_foo:bar: fooworld: "{} world"formatting: "Hello, {}!"named_formatting: "Hello, {world}!"```## Simple useAfter that you can start using localizator:```Pythonfrom localizator import LocalizationDescriptionfrom localizator import Localizatorlocalizator = Localizator()print(localizator.get_localization(LocalizationDescription(['foo'])))print(localizator.get_localization(LocalizationDescription(['extended_foo', 'bar'])))```## DescriberLooks not really simple? Yeah, it's, but do not stop here! We have _brand new_ `Describer`. It allows to make your localization really simple, i mean, just look:```Pythonfrom localizator import LocalizationDescriberfrom localizator import Localizatord = LocalizationDescriber()localizator = Localizator()print(localizator.get_localization(d.foo))print(localizator.get_localization(d.extended_foo.bar))# And even more!print(localizator.get_localization(d.formatting("world")))print(localizator.get_localization(d.named_formatting(world="world")))# Moar!print(localizator.get_localization(d.formatting(d.world('breathtaking'))))```Also, if you want to highlight your paths to localizations as strings, you could use string:```Pythonprint(localizator.get_localization(d('foo')))print(localizator.get_localization(d('extended_foo.bar')))```
Package: localizedpydantic
LocalizedPydantic - UNDER CONSTRUCTIONLocalizedPydantic is a Python library for validating localized data, such as Brazilian CEPs and CPFs. The library is designed to be extensible, so that other developers can contribute validation rules for their own countries.InstallationInstall with pip:pipinstalllocalizedpydanticUsageHere's an example of how to use LocalizedPydantic to validate a Brazilian CEP:fromlocalizedpydantic.models.brazilimportCPFfrompydanticimportValidationErrortry:cpf=CPF(cpf='123.456.789-00')print(cpf.cpf)# '123.456.789-00'exceptValidationErrorase:print(e)try:cpf=CPF(cpf='12345678900')print(cpf.cpf)# raises ValidationErrorexceptValidationErrorase:print(e)ContributingContributions are welcome! To contribute, please submit a pull request.LicenseLocalizedPydantic is licensed under the MIT license
Package: localize-py
localize-py>>> _ = Translator('eng')
>>> _('about', why='Because it's simple')
'Localization module that requires no more than JSON files of fields.
- Why is it good?
- Because it's simple'Installationpip install localize-pyBe AwareThis module abuses f-strings, thus there are several requirements:>=Python 3.6Extreme awareness of user input - I personally wouldn't add user input to variables, unless I've checked it.Some symbols require escaping in JSON, e.g.:\n -> \\n{ -> {{\ -> \\And similarYou will see examples of escaping below.HowTo-- How do I create them?-- JSON files with dictionary for each language, not more, not less.# /eng_file.json
{
    "Button1": "Return",
    "Button2": "Hello, {username}"
}
# /esp_file.json
{
    "Button1": "Volver",
    "Button2": "Hola, {username}"
}-- How do I use them?-- Well, not much harder than create. Let's consider an imaginary web application:from localize_py import Translator
def app_start():
    Translator.load_translations(eng='/eng_file.json', esp='/esp_file.json')

def handle_client_request(request):
    lang = get_client_lang_from_database(request)
    _ = Translator(lang)
    return _('Button1'), _('Button2', username=request.client.name)Here are twononsensefunctions -app_startandhandle_client_request.
It's better to load translation files on start of application, that's why it'sapp_start.load_translationis a static function does exactly what you expect from its name. You can pass it shortnames for languages from your DB as argument names and paths to files as values.
When you need to translate text finally, simply initialize an instance ofTranslatorwith correct shortname, and then even simplier - call it as a function and provide a tag (key) for target string.-- Now what does that{username}thing mean?-- You can subsitute variables from your code to the translation by passing them as key arguments to__call__, right after string tag.# /eng_file.json
{ "Button1": "Hello, {username}" }

# program.py
from localize_py import Translator
Translator.load_translations(eng='/eng_file.json')
_ = Translator('eng')
_('Button1', username='Alex')

# Output: "Hello, Alex"Additional utility for Russian language plural formsIn order to make correct plural forms in Russian one could useru_pluralfunction inside of translation:/rus_file.json
{
  "some_plural": "Доступно {amount} {['акция', 'акции', 'акций'][self.ru_plural(amount)]}:\\n"
}

# program.py
from localize_py import Translator
Translator.load_translations(eng='/rus_file.json')
_ = Translator('rus')
_('some_plural', amount=25)

# Output: "Доступно 25 акций"Normal API documentation will appear soon, however, it's already presented in sources, so your IDE will show it.
Package: local-keychain-utils
Local Keychain UtilitiesCLI tools to manipulate local keychainFree software: MIT licenseDocumentation:https://local-keychain-utils.readthedocs.io.Featureslocal-keychain-store: add a secret from the system keychain.local-keychain-get: retrieve a secret from the system keychain.local-keychain-clear: remove a secret from the system keychain.History0.1.0 (2020-12-18)First release on PyPI.
Package: localkhan
.. image:: https://travis-ci.org/aeby/localkhan.svg?branch=master:target: https://travis-ci.org/aeby/localkhanlocalkhan---------Download and distribute Khan Academy content to any devices.You can then use the Khan exercises and videos in a simple web-based client without a network connection.Install```````.. code:: bash$ pip install localkhanRun```.. code:: bash$ localkhan get --lang=es early-math/cc-early-math-counting-topicDownloading topics...[################################] 1/1 - 00:02:52Downloading media assets...[###                             ] 50/466 - 00:16:44$ localkhan serve****************************************************************Visit http://10.10.1.100:5000 on the devices to be synchronized.****************************************************************(Press CTRL+C to quit)Help````.. code:: bashUsage:localkhan get [--base=<path>] [--media-only]  [--lang=<code>] <topic>localkhan serve [--base=<path>] [--host=<ipaddr>] [--port=<number>]localkhan clean [--base=<path>]localkhan -h | --helplocalkhan --versionCommands:get - Download topic structure and media assetsserve - Serve the content with a simple exercise viewerclean -  Clean all downloaded contentOptions:--lang=<code>    Language code [default: en].--host=<ip>      IP [default: 0.0.0.0].--port=<number>  Port number [default: 5000].--base=<path>    Download content to this directory [default: ~/.lkhan]--media-only     Download only media assets only. Requires a downloaded topic structure.-h --help        Show this screen.--version        Show version.
Package: local-lambda
local_lambdaSimple mechanism to run lambdas as if they were behind an API gatewayInstallation$ pip install local_lambdaRunningCreate a configuration file named.local-lambda.jsonwith a format simlar to this replacing with your funcitons and URLs{
    "endpoints": {
        "/test": {
            "GET": {
                "function": "tests.functions.main.debug_me"
            },
            "POST": {
                "function": "tests.functions.main.debug_me"
            }
        }
    }
}Run the following command:$ local_lambda
Package: local-lang
LocalLangInstallationpip install local-langExampletest.pyfromlocallangimportLangInitimportdatetimelocalisation=LangInit()local=localisation.getLocalisation(lang="en_us")print(local.hey())print(local.hello_world())print(local.toDay(date=datetime.datetime.now()))print(local.thisTime(time=datetime.datetime.now().time()))print(local.testStr(strText="Hello world!"))print(local.testInt(intNum=1))print(local.testFloat(floatNum=1.5))print(local.testBool(boolValue=True))print(local.test(test=1.5))local=localisation.getLocalisation(lang="fr")print(local.hey())print(local.hello_world())print(local.toDay(date=datetime.datetime.now()))print(local.thisTime(time=datetime.datetime.now().time()))print(local.testStr(strText="Bonjour tout le monde !"))print(local.testInt(intNum=2))print(local.testFloat(floatNum=2.5))print(local.testBool(boolValue=False))print(local.test(test="coucou"))en_us.json{"hey":"Hey!","hello_world":"Hello world!","toDay":"Date: {date}","@toDay":{"placeholders":{"date":{"type":"datetime","format":"%Y/%m/%d %H:%M"}}},"thisTime":"Time: {time}","@thisTime":{"placeholders":{"time":{"type":"time","format":"%H:%M"}}},"testStr":"Test: {strText}","@testStr":{"placeholders":{"strText":{"type":"str"}}},"testInt":"Test: {intNum}","@testInt":{"placeholders":{"intNum":{"type":"int"}}},"testFloat":"Test: {floatNum}","@testFloat":{"placeholders":{"floatNum":{"type":"float"}}},"testBool":"Test: {boolValue}","@testBool":{"placeholders":{"boolValue":{"type":"bool"}}},"test":"Test: {test}"}fr.json{"hey":"Coucou !","hello_world":"Bonjour tout le monde!","toDay":"Date: {date}","thisTime":"Time: {time}","testStr":"Test: {strText}","testInt":"Test: {intNum}","testFloat":"Test: {floatNum}","testBool":"Test: {boolValue}","test":"Test: {test}"}result in consolHey!
Hello world!
Date: 2023/05/07 00:15
Time: 00:15
Test: Hello world!
Test: 1
Test: 1.5
Test: True
Test: 1.5
Coucou !
Bonjour tout le monde!
Date: 2023/05/07 00:15
Time: 00:15
Test: Bonjour tout le monde !
Test: 2
Test: 2.5
Test: False
Test: coucou
Package: locallibs
Often it happens that pip and requirements.txt is not enough for Python developers to automate importing and deployment tasks. The problem is more severe when you yourself is a library/framework developer. And here is a tool for you that will help you mitigate the pains.When you are a Python library/framework/module developer.Being a Python library/framework developer myself - some of which are public and some of which are private - I never feel it good to deploy it to PyPi and reinstall that using pip for using in other projects I am working on that need that library. Also, I cannot just add that to external-library-list in my IDEs in every single project or in different IDEs I use.So, I needed a system that would help me import (and/or deploy with respective project) all the local modules under development, in private projects or modules that I did not put on version control or on PyPi. I was planning a simple solution.When you just need to add modules from local file systemIt is not the case that only those library/framework/module developers need such system. Many other type of Python developers also need this. For example, you colleague has sent you a module that you won’t add into version control and that might be updated later - so you will copy-paste that module in a folder. Or, you are using an old library or a library that does not exist in PyPi or you are using your own module that you use personally. There are a lot of other possibilities.Design/Planning of the system.A plain text file named.locallibswill be placed in the project root or undersrcdirectory..locallibswould contain absolute and relative paths to the module root dir. For example, let’s say, you have a library calledawesomeand you put project codes undersrcdirectory. So, you have a directory calledawesomeundersrc. Now, you will add it like this on a line in.locallibsfile:/absolute-path-to-project-root/awesome-project/src.At the beginning of your project code execution you will import locallibs module and execute functionadd_locallibs(BASE_DIR)whereBASE_DIRis the directory where.locallibsfile lives. This base dir can be relative path, absolute path, a path inside the project or anywhere else.In.locallibsfile empty lines will be ignored, lines starting with#will be considered comments. Lines starting with:an_identifierand before any path is added will be considered as options.When you need to ship those modules/code with your project but do not want that to be checked into the version control you just run a commandlocallibs collectand it will copy everything from those base paths to_locallibsdirectory inside the directory where.locallibslives.When usinglocallibsyou should add.locallibsand_locallibsto your version control ignore configs, e.g..gitignoreAbout the developerMd. Sabuj Sarkermd.sabuj.sarker@gmail.com+8801868363600 A Software Engineer, Project Manager, Trainer, Author.