Saravanan666/pypi-org huggingface dataset:
Package: oneservice
OneServiceWrapper around Flask aimed at conveniently creating microservices.Features and limitations:Microservicecreates a server that can call a handler method when/is hit (HTTP method is configurable)The handler method receives the request JSON data and must respond with a(dict, int)tuple containing
the response data and response status codeUsagefromoneserviceimportMicroservicedefreturn_doubled(json_data:dict)->(dict,int):return{"result":int(json_data["a"])*2},200m=Microservice(handler=return_doubled)m.start()You may then hit the microservice and its health endpoint:curlhttp://localhost:5000/health
curl-XPOST-H"Content-Type: application/json"--data'{"a": 2}'http://localhost:5000/See/examplesfor more code usage samples.
Package: onesie
Bravo!  You have received a Medical Diploma in "onesie" fromthe Orbital Convergence University International Air and Water Embassy of the Tangerine Planet.You are now officially certified to include "onesie" in your practice.onesiedescriptionThis is a module that can ascertain
the health status of software with
a python3 testing interface.(It's like a testing framework)install[ZSH] pip install onesiedocumentation (this opens a server process that sends HTML)[ZSH] onesie sharesinternal status tests of the module[ZSH] onesie internal-statusThese checks are run with pypi "body_scan""onesie" is built from a fork of "body_scan"("body_scan" checks are written with "unittest")TutorialChecks are started simultaneously, unless "--simultaneous no"Create a status file (glob pattern "**/status_*.py").(The glob pattern can be modified with the progammatic python3 interface)# status_1.py

def check_1 ():
	print ("check 1")
	
def check_2 ():
	print ("check 2")
	
def check_3 ():
	raise Exception ("not 110%")

checks = {
	"check 1": check_1,
	"check 2": check_2,
	"check 3": check_3
}from a directory deeper than the status file "status_1.py"[ZSH] onesie statusThis is the equivalent of:[ZSH] onesie status --glob-string "**/status_*.py"The report then should appear like thispaths: [
	{
		"path": "../status_1.py",
		"empty": false,
		"parsed": true,
		"stats": {
			"passes": 2,
			"alarms": 1
		},
		"checks": [
			{
				"check": "check 1",
				"passed": true,
				"elapsed": [
					4.054199962411076e-05,
					"seconds"
				]
			},
			{
				"check": "check 2",
				"passed": true,
				"elapsed": [
					1.72930003827787e-05,
					"seconds"
				]
			},
			{
				"check": "check 3",
				"passed": false,
				"exception": "Exception('not 110%')",
				"exception trace": [
					"Traceback (most recent call last):",
					"  File \"/home/veganecology/.local/lib/python3.11/site-packages/onesie/processes/scan/process/keg/check.py\", line 68, in start",
					"    checks [ check ] ()",
					"  File \"<string>\", line 13, in check_3",
					"Exception: not 110%"
				]
			}
		]
	}
]
alarms: [
	{
		"path": "../status_1.py",
		"checks": [
			{
				"check": "check 3",
				"passed": false,
				"exception": "Exception('not 110%')",
				"exception trace": [
					"Traceback (most recent call last):",
					"  File \"/home/veganecology/.local/lib/python3.11/site-packages/onesie/processes/scan/process/keg/check.py\", line 68, in start",
					"    checks [ check ] ()",
					"  File \"<string>\", line 13, in check_3",
					"Exception: not 110%"
				]
			}
		]
	}
]
stats: {
	"alarms": 0,
	"empty": 0,
	"checks": {
		"passes": 2,
		"alarms": 1
	}
}Advanced TutorialIt's recommended to run onesie programmatilly.An example of this can be found in the "_book/advanced tutorial"section of the documentation.Contactsbgrace2468@pm.me
Package: onesignal
OneSignal Python SDK=====================A Python SDK for OneSignal (https://onesignal.com/). Documentation for OneSignal API is available athttps://documentation.onesignal.com/docs/server-api-overview.Obtaining User Rest API key and App REST API key-------------------------------------------------See details here https://documentation.onesignal.com/docs/server-api-overviewInstall from pip------------------------> pip install onesignalSetup for develop------You can install the package by running::> python setup.py installOnce installed, to get started, you can do:::from onesignal import OneSignalone_signal =  OneSignal(USER_AUTH_KEY, YOUR_APP_ID)one_signal.get_players(REST_API_KEY)USER_AUTH_KEY: Your e-mail -> Api Keys -> User Auth KeyYOUR_APP_ID: Your App -> App settings -> Keys and IdREST_API_KEY: Your App -> App settings -> Keys and IdTests------Tests are located under /tests and these also kind of show some examples on how to use the library.Running tests---------------Go to this directory /tests and then run::> py.testContributors-------------- Zohaib Ijaz <zohaibijaz.qc@gmail.com>- Waqas Younas <waqas.younas@gmail.com>
Package: onesignal-client
OneSignal clientOneSignal client is a wrapper for the OneSignal API which allows you to send notifications to Android, iOS and Web App.It is based onlibrary.Installationpip install onesignal-clientUsagefromonesignalimportOneSignalClient,SegmentNotificationclient=OneSignal("MY_APP_ID","MY_REST_API_KEY")notification_to_all_users=SegmentNotification(contents={"en":"Hello from OneSignal-Notifications"},included_segments=[SegmentNotification.ALL])client.send(notification_to_all_users)DevelopmentContributions are welcomepip install --editable .run the testsexport ONESIGNAL_API_KEY="..."
export ONESIGNAL_REST_API_KEY="..."

pytestDocsTo edit the docs, change the folder and spin up the development server.cd docs
npm install -g vuepress
vuepress devMetaLucas Hild -https://lucas-hild.deThis project is licensed under the MIT License - see the LICENSE file for details
Package: onesignal-notifications
OneSignal-NotificationsOneSignal-Notifications is a wrapper for the OneSignal API which allows you to send notifications to Android, iOS and Web App.Installationpip install onesignal-notificationsUsagefromonesignalimportOneSignal,SegmentNotificationclient=OneSignal("MY_APP_ID","MY_REST_API_KEY")notification_to_all_users=SegmentNotification(contents={"en":"Hello from OneSignal-Notifications"},included_segments=[SegmentNotification.ALL])client.send(notification_to_all_users)DevelopmentContributions are welcomepip install --editable .run the testsexport ONESIGNAL_API_KEY="..."
export ONESIGNAL_REST_API_KEY="..."

pytestDocsTo edit the docs, change the folder and spin up the development server.cd docs
npm install -g vuepress
vuepress devMetaLucas Hild -https://lucas-hild.deThis project is licensed under the MIT License - see the LICENSE file for details
Package: onesignal-python
# onesignal-pythonPython client for OneSignal push notification service[![Build Status](https://travis-ci.org/joaobarbosa/onesignal-python.png?branch=master)](https://travis-ci.org/joaobarbosa/onesignal-python)## Installing- ```pip install onesignal-python```- ```pip install git+https://github.com/joaobarbosa/onesignal-python.git```## UsageExample, sending push to specific devices (currently, only way supported).```pythonfrom requests.exceptions import HTTPErrorfrom onesignalclient.app_client import OneSignalAppClientfrom onesignalclient.notification import Notificationplayer_id = 'sample00-play-er00-id00-000000000000'os_app_id = 'sample00-app0-id00-0000-000000000000'os_apikey = 'your-rest-api-key-goes-here'# Init the clientclient = OneSignalAppClient(app_id=os_app_id, app_api_key=os_apikey)# Creates a new notificationnotification = Notification(app_id, Notification.DEVICES_MODE)notification.include_player_ids = [player_id]  # Must be a list!try:# Sends it!result = client.create_notification(notification)except HTTPError as e:result = e.response.json()print(result)# Success: {'id': '1d63fa3a-2205-314f-a734-a1de7e27cc2a', 'recipients': 1}# Error:   {'errors': ['Invalid app_id format']} - or any other message```## Requirements- Python 3.3+- ```requirements.txt``` or ```requirements-test.txt```## Running testsUsing **make**:```make run_tests```Using **pytest**:```py.test --pep8 --cov=. --cov-report=term-missing --cov-config=.coveragerc -r a -v -s```## Todo### API MethodsList of API methods to be covered by our client.**[U]** - requires User Auth | **[A]** - requires App API Key- [A] Create notification- Segments mode settings & params- ~~Devices mode settings & params~~- Improve tests as new params are added- Filters mode settings & params- Common Parameters- App- ~~```app_id```~~- ```app_ids```- Content- ~~```contents```~~- Improve validation- Behaviour when using ```template_id```- ~~```headings```~~- Improve validation- ```subtitle```- ```template_id```- ```content_available```- ```mutable_content```- Attachments- ~~```data```~~- ```url```- ```ios_attachments```- ```big_picture```- ```adm_big_picture```- ```chrome_big_picture```- Appearance- ~~```ios_badgeType```~~- ~~```ios_badgeCount```~~- ~~```small_icon```~~- ~~```large_icon```~~- _Others coming soon_- Export data for request- [A] Cancel notification- ~~[U] View apps~~- ~~[U] View an app~~- [U] Create an app- [U] Update an app- [A] View devices- View device- [U] Add a device- Edit device- [U] New session- New purchase- Increment session length- [A] CSV export- ~~Regular export~~- Extra fields- Make it available in the user client- [U] View notification- [A] View notifications- Track open
Package: onestation
Onestation 0.1.0Pre-processing data from conventional weather stationsTopicsProject descriptionFunctionalitiesApplicationTools usedProject accessInstall and run the packageDeveloperProject descriptionThe project under development is a library/package in Python with the purpose of pre-processing conventional weather station data. One station is a Python package that has the main objective of helping developers or professionals who seek to treat and clean weather station data and apply it to a Machine Learning model aimed exclusively at precision irrigation.The package is available on [Pypisistema](https://pypi.org/project/onestation/) it will allow the daily, continuous and remote pre-processing of the collections carried out by conventional meteorological stations, allowing professionals and developers to apply them in their work in a fast and applied way.ApplicationUnderstand data pre-processing concepts and techniques used to transform raw data into an applicable format. Visit the link and learn more https://brain-mentors.com/concepts-of-data-pre-processing.☑️Note: This work is being finalized and will facilitate the process of processing data from conventional meteorological stations and can also be applied or converted to automatic meteorological stations.Functionalities:heavy_check_mark:Functionalities 1:Perform data cleaning.:heavy_check_mark:Functionalities 2:Perform data transformation.:heavy_check_mark:Functionalities 3:Apply data reduction.Tools usedProject accessYou mayaccess the project source codeor access the project on PyPi at the linkhttps://pypi.org/project/onestation/Install and run the packageTo install the package you must usePycharm or Jupyter Notebook. For this, you must have the latest version of Python installed on your machine:User installationThe easiest way to installonestationis withpippip install onestationIf you are having difficulty installing the correct package versions, you can set up a virtual environment like this:1- pip install virtualenv2- virtualenv env3- source env/bin/activate4- curlhttps://bootstrap.pypa.io/get-pip.py| python35- pip install onestation6- pip install ipykernel7- ipython kernel install --user --name=env8- jupyter notebook9- When finished, deactivate your virtualenv with deactivateUseFor a complete tutorial on how the package is used in Jupyter notebooks, see our Jupyter notebook demohttps://colab.research.google.com/github/IRkernel/IRkernel/blob/master/example-notebooks/Demo.ipynbFor more information about the database used in the tests and to be able to download the dataset, see the link:https://www.kaggle.com/datasets/rogerioifpr/brazil-weather-conventional-stations-19612019Help and SupportFor help with using or installing the package, contact Rogerio Pereira do Santosrogerio.dosantos@ifpr.edu.brDeveloperRogério Santos
Package: onestep
仅需一步，轻松实现分布式异步任务。BrokersMemoryBrokerCronBrokerWebHookBrokerRabbitMQBrokerRedisBrokerRedisStreamBrokerRedisPubSubBrokerKafkaBroker😋example# example.pyfromonestepimportstep,WebHookBroker# 对外提供一个webhook接口，接收外部的消息@step(from_broker=WebHookBroker(path="/push"))defwaiting_messages(message):print("收到消息：",message)if__name__=='__main__':step.start(block=True)also, you can useonestepcommand to start, like this:$onestepexamplethen, you can send a message to webhook:$curl-XPOST-H"Content-Type: application/json"-d'{"a": 1}'http://localhost:8090/push🤩 other brokersfromonestepimportstep,CronBroker# 每3秒触发一次任务@step(from_broker=CronBroker("* * * * * */3",body={"a":1}))defcron_task(message):assertmessage.body=={"a":1}returnmessageif__name__=='__main__':step.start(block=True)🤔more examples:examples
Package: onestoppy
Repo and user info in ~/.pypirc======================== Example ~/.pypirc[distutils]index-servers =pypipypitest[pypi]repository=https://pypi.python.org/pypiusername=mstankiewiczpassword=<here>[pypitest]repository=https://testpypi.python.org/pypiusername=mstankiewiczpassword=<here>======================== Increment version$ vim setup.py======================== Then run$ python setup.py sdist upload -r pypi
Package: onetable
onetableOnce defined, multiple ways to export table.Installpip install onetableUseagefromonetableimportDefualtTable,HtmlRender,XlsRender,XlsxRender,PdfRender,CSVRendertable=DefualtTable({'fontSize':10,'color':'red'})table.setStyles(('x',{'fontSize':14}),('red',{'color':'red'}),('title',{'color':'black','font':u'宋体','fontSize':16,'align':'center'}))table.writeNextRowCols([('Title1',3,'title')])table.pushStatus()table.popStatus()table.writeNextRowCols([1,2,3])table.writeNextRowCols([3,2,1,1],style='red')withopen('test.xls','wb')asout:XlsRender().save(tab=table,out=out)CHANGES0.0.1first version0.0.2add usage
Package: onetable-py
onetable_pyThis package wraps the java packageonetableinto a python cli/library along with it's dependencies. This provides the onetable jar in an easy consumeable format for various CI/CD or workflow management platforms such as Apache Airflow.Usage:$onetable_py[OPTIONS]COMMAND[ARGS]...Options:-v, --version: Show the application's version and exit.--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.Commands:initsynconetable_py initDownloads the required jars for onetableUsage:$onetable_pyinit[OPTIONS]Options:--help: Show this message and exit.onetable_py syncRuns "io.onetable.utilities.RunSync"Usage:$onetable_pysync[OPTIONS]Options:--config TEXT: [required]--catalog TEXT--help: Show this message and exit.RequirementsJava 11.0jenv 0.5.6
Package: onetimejwt
One Time JWTSimple mechanism for cross service authorization.  Usage:Client side:import onetimejwtjwt = onetimejwt.generate('shared secret', 60) # shared secret, 60 second ageheaders = {"Authorization": "Bearer " + onetimejwt.generate('shared secret', 60)}Server side, create a single instance of Manager and use it for all threads:import onetimejwt# at startup, creates a cleanup thread# note: you can include any number of secretsJTM = onetimejwt.Manager('shared secret', maxage=60)JTM.housekeeper()# during processing -- throws JwtFailed exception if not authorizedJTM.valid(headers.get('Authorization'))Manager will keep a list of recognized JWTS, and uses logging of a warning levelto report problems.
Package: onetimepad
One-Time-Pad Python is a command-line encryption tool, which uses an
encryption mechanism very similar toOne-time Pad(Duh. Thanks for
telling that)InstallationInstall it using pip:$ pip install onetimepadUsageTo use it from the command-line, run:$ onetimepadOr, import the onetimepad module in your script:#!/usr/bin/env python3

import onetimepad

cipher = onetimepad.encrypt('some text', 'a_random_key')
msg = onetimepad.decrypt(cipher, 'a_random_key')SecurityThe crypted message is very easy to crack if the length of key is
less than the length of message.In any case, the key is not nescessarily random, which makes this
tool as good as a toy.Thus, do not encrypt any real private stuff, it won’t protect you
from the NSA.It is just a hack.CopyingThis project is licensed under the terms of MIT LICENSE, please see
LICENSE file for more details.
Package: onetimesecret
onetimesecret-cliA simple python client to use the onetimesecret APIhttps://onetimesecret.com/docs/apiInstallpip install onetimesecretUssagefrom onetimesecret import OneTimeSecretCli

cli = OneTimeSecretCli(ONETIMESECRET_USER, ONETIMESECRET_KEY)
cli.create_link("secret") # return a link like https://onetimesecret.com/secret/xxxxxxxxxxx
Package: onetoonemap
This is a python module that implements a 1:1 mapping type - similar to adict, but as well as looking up values by keys (m[k]->v), you can look up keys by values (m[v]->k).Givenm = OneToOneMap(), the following constraints are always true:m.get(key)==valuem.get(value)==keym.keys()==set(m.keys())m.values()==set(m.values())set(m.keys())&set(m.values())==set()set.(m.keys()).isdisjoint(set(m.values()))==True
Package: onetrack
OneTrackA simple library for evaluation of particle track reconstruction.Alpha Version!This library is in a very early stage of development. It is only for testing with a narrow set of Pytorch Geometric data types. It is not recommended for production use.Installconda create --name onetrack python=3.9
pip install onetrackExample Usagefrom onetrack import TrackingData 
from onetrack.file_utils import list_filesLoad in filesfile_list = list_files(os.path.join(config["graph_input_dir"], "train"))[:100]Create a TrackingData objecttracking_data = TrackingData(file_list)Currently, the only supported file configuration is as follows:a)file_listcontains a list of pickled Pytorch GeometricDataobjectsb) EachDataobject contains:a list of edges inedge_index,a list of edgescores,a list of hit IDshidthat can be used to map the nodes used inedge_indexback to the original hits in the eventa stringevent_filethat can be used to load the original event filesat least a truth tensor calledy, and possibly more truth tensors with the formaty_{truth definition}c) The event files are assumed to be of the format:{event_file}-particles.csvand{event_file}-truth.csvThe-particlesfile should contain at leastparticle_idandptcolumnsThe-truthfile should contain at leastparticle_idandhit_idcolumnsBetter compatibility is coming ASAP!Run a sanity check by building track candidates with the truthtracking_data.build_candidates(building_method="CC", sanity_check=True)Evaluate this sanity checktracking_data.evaluate_candidates(evaluation_method="matching")
tracking_data.plot_evaluation()If all has worked, we should get very good efficiency and fake rates. We can then play around with candidate building (withsanity_check=False), and evaluating with different matching configurations:matching_config = {
    "min_hits_truth": 9,
    "min_hits_reco": 5,
    "frac_reco_matched": 0.5,
    "frac_truth_matched": 0.5,
}
tracking_data.evaluate_candidates(evaluation_method="matching", **matching_config)
Package: onetracker-api
OneTracker-APIAsynchronous Python client for OneTracker.Installingpipinstallonetracker-apiQuick-Start Exampleimportasynciofromonetracker_apiimportOneTrackerfromonetracker_api.modelsimportSessionObjectasyncdefmain():asyncwithOneTracker()asonetracker:# Authenticate with the OneTracker APIawaitonetracker.login("demo@onetracker.app","P@S5W0RD!")# > AuthenticationTokenResponse(message='ok', session=SessionObject(user_id=156, token='eP0FUZhN76Wu7igUkCPigR2wEMBDtzaW', expiration=datetime.datetime(2020, 8, 3, 3, 15, 54)))# Get a list of parcels, archived defaults to falseparcels=awaitonetracker.list_parcels(archived=False)# > ListParcelsResponse(message='ok', parcels=[Parcel(id=174, user_id=6, email_id=183, email_sender='example.com', retailer_name='Example', description='Camera', notification_level=1, is_archived=0, carrier='FedEx', carrier_name='FedEx', carrier_redirection_available=True, tracker_cached=False, tracking_id='407072905722', tracking_url='', tracking_status='delivered', tracking_status_description='', tracking_status_text='', tracking_extra_info='', tracking_location='Sunnyvale, CA', tracking_time_estimated=datetime.datetime(2018, 8, 8, 20, 0, 0), tracking_time_delivered=datetime.datetime(2018, 8, 8, 15, 51, 0), tracking_lock=0, tracking_events=[], time_added=datetime.datetime(2018, 8, 7, 0, 50, 30), time_updated=datetime.datetime(2018, 8, 18, 20, 1, 23))])# Get a single parcelparcel=awaitonetracker.get_parcel(id=174)# > GetParcelResponse(message='ok', parcel=Parcel(id=174, user_id=6, email_id=183, email_sender='example.com', retailer_name='Example', description='Camera', notification_level=1, is_archived=0, carrier='FedEx', carrier_name='FedEx', carrier_redirection_available=True, tracker_cached=False, tracking_id='407072905722', tracking_url='', tracking_status='delivered', tracking_status_description='', tracking_status_text='', tracking_extra_info='', tracking_location='Sunnyvale, CA', tracking_time_estimated=datetime.datetime(2018, 8, 8, 20, 0, 0), tracking_time_delivered=datetime.datetime(2018, 8, 8, 15, 51, 0), tracking_lock=0, tracking_events=[], time_added=datetime.datetime(2018, 8, 7, 0, 50, 30), time_updated=datetime.datetime(2018, 8, 18, 20, 1, 23)))# Delete a parcelparcel=awaitonetracker.delete_parcel(id=174)# > DeleteParcelResponse(message='ok')if__name__=="__main__":loop=asyncio.get_event_loop()loop.run_until_complete(main())See the full documentationSee AlsoPyPi ProjectGitHub ProjectOneTracker API Reference
Package: onetrick
If your project exposes a modulemymodule.py:importonetrick@onetrick(__name__)defmyfunction():print("Hello world!")Then it can be called from elsewhere:importmymodule#Either like thismymodule()# (Hello world!)#Or like thismymodule.myfunction()# (Hello world!)If your project exposes a package.
+-- mypackage
|   +-- __init__.py
|   +-- mymodule.pymymodule.py:importonetrick@onetrickdefmyfunction():print("Hello world!")__init__.py:from.mymoduleimportmyfunctionmyfunction.onetrick(__name__)Then it can be called from elsewhere:importmypackage#Either like thismypackage()# (Hello world!)#Or like thismypackage.myfunction()# (Hello world!)