Saravanan666/pypi-org huggingface dataset:
Package: limestone-finance
limestone-pythonAn api to access trusted token pricing data secured on Arweave and protected by provider's collateral.Installationpip install limestone-financeUsageGetting the latest pricefromlimestone_financeimportget_priceprice=get_price("AR")Getting price at a specific blockfromlimestone_financeimportget_priceprice=get_price("AR",at_block=123456)Data format{
  price: 11.74, //as Float
  updated: '2021-02-25T07:55:00.467000', //as UTC Date string
}Testingpython test_limestone.py
Package: limesurvey-coconut
coconutA LimeSurvey data extractorInstallationpip install limesurvey-coconutUsagefromcoconutimportLimeAPI,Survey,Workbook# Create a LimeAPI instancelime=LimeAPI(url="https://surveys.my-lime-survey-instance.org",username="admin",password="password")# Create the survey instancesurvey=Survey(survey_id=119618,lime_api=lime)# Load questions, responses, survey infosurvey.load_data()# Save the data to an Excel filesurvey.to_excel("survey.xlsx")# Save response data to a CSV filesurvey.to_csv("survey.csv")# Update a Google Sheets workbookworkbook=Workbook(workbook_id="abc123",survey=survey,service_account_json_path="google-cloud-creds.json")workbook.sync()
Package: lime-trader-sdk
Lime-Trader-SDKQuick example:Install lime-trader-sdk$ pip install lime-trader-sdkIf you use Poetry, you can install it by running:$ poetry add lime-trader-sdkCreatecredentials.jsonfile with next content:{"username":"<your_username>","password":"<your_password>","client_id":"<client_id>","client_secret":"<client_secret>","grant_type":"password","base_url":"https://api.lime.co","auth_url":"https://auth.lime.co"}Copy next code to your python script to create client and get account balances:importpprintfromlime_traderimportLimeClientclient=LimeClient.from_file(file_path="credentials.json")balances=client.account.get_balances()pprint.pprint(balances)For more information, check out the docs!
Package: limeutils
limeutilsLimeutils is a small collection of classes and methods for dealing with Redis data and a few other helpful functions. Check out the documentation for information
. More classes to be added as needed.This package usesPydantic modelsto validate its data.InstallationInstall with poetrypoetryaddlimeutilsInstall by repopip install git+https://github.com/dropkickdev/limeutils.git@develop#egg=limeutilsInstall withgit cloneSimply install from the root folder# This can also be a fork
git clone https://github.com/dropkickdev/limeutils.git

cd limeutils
poetry installDocumentationView the documentation at:https://dropkickdev.github.io/limeutils/
Package: limier
LimierLimier is a smart toolkit for conversion and validation of function arguments in Python powered by type annotations.A typical use case is the conversion of route parameters in the context of web routing.InstallpipinstalllimierBasic usagefromlimierimportconverted,chain# Custom converter: validate that the input value is positivedefpositive(value:int)->int:ifvalue<0:raiseValueError("Expected positive value")returnvalue@converteddefcompute(x:int,times:chain(int,positive))->float:returnx*timesresult=compute("2",times="2.5")assertresult==5
Package: limis
limis is a light microservice framework built inPythonand powered byTornado.WarningThe project is currently in active development and should be considered alpha grade at the moment. Features are
being added and removed and expect the API to change frequently. Release 0.1 is targeted to be a more stable
release.Examples: limis examples can be found on github atlimis_examplesInstructionsInstallationpip install limisProject Creationlimis-management create_project <project_name>Service CreationScaffold the services with the project management command:cd <project_name>
python management.py create_service <service_name>Create a request handler to route service requests to your component in ‘<service_name>/handlers.py’:fromtypingimportUnionfromtornado.websocketimportWebSocketHandlerfromlimis.services.handlersimportComponentHandlerclassHelloHTTPHandler(ComponentHandler):defget(self):self.write(self.component_class().hello())classHelloWebSocketHandler(ComponentHandler,WebSocketHandler):defon_message(self,message:Union[str,bytes]):self.write_message(self.component_class().hello())Create a component to perform actions on requests in ‘<service_name>/components.py’:fromlimis.services.componentsimportComponentfromhello.handlersimportHelloHTTPHandler,HelloWebSocketHandlerclassHelloComponent(Component):component_name='hello'component_path='hello'component_http_handler=HelloHTTPHandlercomponent_websocket_handler=HelloWebSocketHandlerdefhello(self):return'hello'Create a services configuration entry in ‘<service_name>’/services.py:fromlimis.servicesimportServicefromhello.componentsimportHelloComponentservices=[Service(name='hello',path='hello',components=[HelloComponent]),]Add your services module to the project services configuration ‘<project_name>/services.py’:fromhello.servicesimportservicesashello_servicescontext_root=''services=hello_servicesLaunch ServerLaunch the limis server from the command prompt:python manage.py server --http --websocketTest ServiceHTTP Servicecurl http://localhost:8080/hello/helloOutput:helloWebSocket ServiceExample usingwebsocket-clientfromwebsocketimportcreate_connectionwebsocket=create_connection('ws://localhost:8888/hello/hello/')websocket.send('test')websocket.recv()Output:hello
Package: limit
DescriptionThis decorator limits the calling rate of the decorated function. This is
useful in conjuction with web API calls, where you often get banned if you
perform more calls than the ones specified in the terms of services.The rate islimitoverevery, where limit is the number of invocation
allowed everyeveryseconds.limit(4, 60)creates a decorator that
limits the function calls to4 per minute. If not specified,everydefaults to1second.@limit(4,60)deffunction(...):"""never invoke this function more than 4 times per minute."""...InstallationThe package has been uploaded toPyPI, so you can install it with pip:pip install limit
Package: limitcalc
計算股市漲停、跌停價的工具使用範例import limitcalc

limitcalc.get_limit_up_price(58) # 回傳 63.8，63.8 是 58 的漲停價

limitcalc.get_limit_down_price(96) # 回傳 86.4，86.4 是 96 的跌停價
Package: limited
limited 🚀limitedis your go-to Python rate limiting package, designed for advanced and efficient performance. It seamlessly supports both synchronous programs, using threads throughSyncLimiter, and asynchronous programs, utilizing asyncio throughAsyncLimiter.Examples 📝Getting started withlimitedis effortless! For regular, synchronous functions declared withdef, useSyncLimiter:fromlimitedimportSyncLimiter@SyncLimiter(limit=3,every=5)defjob():passFor asynchronous functions declared withasync def, opt forAsyncLimiter:fromlimitedimportAsyncLimiter@AsyncLimiter(limit=3,every=5)asyncdefasync_job():passShare Limits 👨‍👦‍👦Take it up a notch by creating a limiter instance and share it across multiple functions. This allows you to enforce the same constraints onmultiplefunctions simultaneously. In the example below, both first_job and second_job are limited to 3 calls every 5 seconds,collectively.fromlimitedimportSyncLimitermy_limiter=SyncLimiter(limit=3,every=5)@my_sync_limiterdeffirst_job():pass@my_sync_limiterdefsecond_job():passFor asynchronous functions, employAsyncLimiterin a similar fashion.Stack Limits 📚Stack limits on a single function to satisfy multiple constraints simultaneously. In the following example, both limiting constrained are enforces separately.fromlimitedimportSyncLimitermy_first_limiter=SyncLimiter(limit=3,every=5)my_second_limiter=SyncLimiter(limit=1,every=1)@my_first_limiter@my_second_limiterdefmy_job():passCombining sharing limits with multiple functions, and stacking multiple limits to the same functions, allows for complex limiting logic.limitedoffers the flexibility you need to create complex rate limiting logic effortlessly. Fine-tune your applications, experiment, and let your projects soar to new heights! 🚀✨
Package: limited-aiogram
What is it?Limited aiogram is an add-on for the original aiogram Bot. This package allows you to limit how often your bot sends messagesTelegram api limitsTelegram has a number of restrictions for sending messages:30 messages per second to multiple users20 requests/sec to group1 message per second to individual chatUsageThe code below patches the original Bot class from aiogram, these changes are not reversible!importlimit_aiogramlimit_aiogram.path_bot()It is also possible to use a separate class `LimitedBot``, without changing the original classimportlimit_aiogrambot=limit_aiogram.LimitedBot('your token')Installationpip install limited_aiogram
Package: limitedinteraction
Limited Interactionimportlimitedinteractionaslili.button_dialog("Simple dialog windows for scripters and scientists.",choices=['OK'],title='Limited Interaction',icon='light')This python module provides simple, generic dialog windows specifically aimed
to scripters and scientists who need a concise, elegant way of interacting with
their script users.This module does not require any GUI programming, it has no external
dependency, and it is completely independent of the graphical backend in use
(if any). In IPython-based environments, its blocking functions allow
interacting with Matplotlib figures while waiting for user action.For those transitionning from Matlab, this module fulfils the same role as
Matlab's msgbox, inputdlg, menu and other simple GUI functions.Home pageGitHubIssue trackerAPIInstallingUsing pip:pip install limitedinteractionUsing conda:conda install -c conda-forge limitedinteractionUsageImportingimportlimitedinteractionasliCreating a persistent message windowli.message('Please wait a few moments.',title='Calculating...',icon='clock')This is a non-blocking function. Any code after this call is executed
immediately, while this message window stays in foreground. To close the
message window:li.message('')Asking for user inputname=li.input_dialog('What is your name?',icon='question')This is a blocking function. We wait for user input before continuing.
Meanwhile, Matplotlib's event loop is refreshed so that the user can
interact with figures.This same function can have several inputs and some inputs can be masked:credentials=li.input_dialog('Please enter your credentials',labels=['Username:','Password:'],initial_values=['username','password'],masked=[False,True],icon='lock')choice_index=li.button_dialog('Please zoom on the figure and click Next.',choices=['Next','Cancel'],title='User interaction',icon='gear')This is a blocking function. We wait for a choice before continuing. Meanwhile,
Matplotlib's event loop is refreshed so that the user can interact with
figures.Other functionsGet a file name using the operating system's standard file selection window:filename=li.get_filename()Get a folder name using the operating system's standard folder selection
window:folder=li.get_folder()CreditsThis module is developed by Félix Chénier at the Mobility and Adaptive
Sports Research Lab (https://felixchenier.uqam.ca).It includes artwork developed by these designers:Warning and gear icons:Laura ReenQuestion mark icon:Design RevisionAll other icons:Recep Kütük
Package: limited-numbers
Limited NumbersA simple library made with PythonInstallationWindowspip3installlimited-numbersLinuxpython3-mpipinstalllimited-numbersUsageYou can use to simulate number overflows (useful if you wanna simulate x-bit numbers)fromlimited_numbersimportInt#let's simulate a 8-bit numbernumber=Int(255)'''Int takes 1 positional and 2 keyword arguments. The positional parameter is the number limit after which overflows. The other 2 are to set the number to else than 0 and the other is the lower limit (begin_from)'''#increase by 1number+=1#loop until it overflowswhilenumber!=0:print('Number:{}').format(number.get())#or number.number#PS. Used .format above so that the code is highlighted in Markdownnumber+=1You can also subtract from the number
Package: limited-ordered-set
Version 0.1.0Limited Ordered SetData type for storing sorted list of objects with sort order and list length limit. Useful for storing data like
history of user interactions on site.Once added object to list overflow set length, it pop items from set beginning of set. You always have only last X
entries limited blengthproperty.InstallationYou can simple install library withpip install limited-ordered-set.ExampleYou can add as many as you want objects to LimitedOrderedSet, it will pop first items once items count hit limit.For example you can go to tests.:limit = 10
objcts = LimitedOrderedSet(limit)

print 'Adding chars: ',
for x in xrange(0, 50):
    c = choice(string.ascii_letters)
    print c,
    objcts.add(c)
print

print 'Resulting set items: %s' % ",".join(objcts)Execution resultAdding chars:  B Z V N F k j j o v t M k j P v A Y O h E v f A g e F T Q b f r j t W q r C C S m P V m o B z a L wResulting set items: S,m,P,V,o,B,z,a,L,wContributionYou always are welcome if you have any ideas. You can push request at github project page.https://github.com/phpdude/limited-ordered-set
Package: limiter-for-sanic
sanic_limiterRequirePython 3.7+
RedisSourcesgitclonehttps://github.com/kingchao1024/sanic_limiter.gitInstall (Python 3.7+)pipinstalllimiter-for-sanicIntroduceA Sanic current limiter based on the sliding window idea.QuickstartDemo for quickstart:fromsanicimportSanicfromaioredisimportfrom_urlfromsanic.responseimporttextfromlimiter_for_sanicimportCounterSildeWindowLimiterapp=Sanic(__name__)app.config['REDIS']='redis://locahost'# or# setattr(app.ctx, 'redis', await from_url('redis://locahost'))limiter=CounterSildeWindowLimiter(app)@app.get('/')@limiter.limit()asyncdefindex(request:Request):returntext('HELLO')app.run(host="0.0.0.0",port=5000,dev=True)Points UsedRedis luaRedis listSanic background tasksRedis transactions
Package: limitlion
LimitLionA token bucket rate limiting throttle using Redis as the backend. Inspired by
Stripe'sScaling your API with rate limitersblog post.  Can be used to control processing rates from one to many processes.
Potential implementations include protecting databases from high processing rates,
orchestrating queue consumer processes, or enforcing HTTP request rate limits.Install with:pip install limitlionFollowing is a simple example of a throttle namedtestthat allows5requests per second (RPS) with
a burst factor of2using a8second window and requesting1token (default)
for each unit of work.  Look in theexamplesdirectory for more.redis=redis.Redis('localhost',6379)throttle_configure(redis)whileTrue:allowed,tokens,sleep=throttle('test',5,2,8)ifallowed:print('Do work here')else:print('Sleeping{}'.format(sleep))time.sleep(sleep)DesignThe rate limiting logic uses a classic token bucket algorithm but is implemented
entirely as a Lua Redis script.  It leverages the RedisTIMEcommand which ensures fair microsecond resolution across all callers independent
of the caller's clock.  Note that buckets start and end on whole seconds.Redis 3.2+ is required becausereplicate_commands()is used to support using
theTIMEcommand in a Lua script.ConfiguringDefault values for RPS, burst factor and window size are supplied to the throttle
Lua script.  The Lua script creates athrottle:[throttle name]:knobshash with
these values if it does not yet exist in Redis.  The script then uses the values
in thatknobshash for the token bucket calculations.  Each call also sets the
TTL for theknobskey to 7 days so it will remain in Redis as long as the
throttle has been active in the last week.Since these settings are stored in Redis a separate process can be used to adjust
them on the fly.  This could simply be manually issuing the Redis command to
change the RPS or a more sophisicated process that polls Prometheus metrics to
determine the current load on your database and adjust the RPS accordingly.Running CounterAnother small but useful tool to keep track of counts in Redis for specified
time windows. These counts can then be used to make decisions on limiting or
failing processes as well as for diagnostics. Checkoutrunning_counter.pyfor details.
Package: limitloop
LimitloopLimitloop is a lightweight python module for running loops that depend on precise timing.This package is available through Pypi and can be installed with the following command.python-mpipinstalllimitloopBasic usageAll functionality of the module is provided through thelimitloop.Loopclass. This class is instantiated with a reference to a function, which it can then call at a consistent rate a preset number of times, or until otherwise interrupted. For example, the following code...fromlimitloopimportLoop#Define a simple function for the Loop object to call#This function must accept the loop object itself as its first argumentdefdemoFunction(loop):print('Hello, world!')#Create our loop object, set to run at one iteration per secondl=Loop(demoFunction,freq=1)#Call the function defined above 5 timesl.run(5)...will output the following, one line per second.Hello, world!
Hello, world!
Hello, world!
Hello, world!
Hello, world!See theAPI referencefor more advanced usage.TODO: Add more advanced usage examples
Package: limit-order-book
Limit Order BookThis is an implementation of the limit order book with a price-time priority
matching policy for reception of market data streams. There are APIs for C++,
C, and Python.UsageC++Simply addinclude/*.hppto your C++ project either by copying
directly or using git submodules.CA C-level API is defined ininclude/lib_lob.hpp.PythonThe preferred Python installation oflimit-order-bookis frompip:pipinstalllimit-order-bookUsage CaveatsWindowsYou'll need to install the Visual-Studio 17.0 tools for Windows installation.
TheVisual Studio Communitypackage provides these tools for free.DevelopmentTestingTo run all the unit-test suites, run:maketestC++To run the C++ unit-test suite, run:sconstestPythonTo run the Python unit-test suite, run:python-munittestdiscover.BenchmarkingC++To run the C++ benchmark code, run:sconsbenchmark
Package: limitpages
App/Plugin for [Papermerge DMS](https://github.com/ciur/papermerge).
Designed as Django reusable app. When used, will limit number of pages of uploaded documents to
values specified by settings.LIMITPAGES_MAX_PAGES (15 by default).## RequirementsDepends on:papermerge.core## InstallationInstall it using pip:pip install limitpagesAdd app to INSTALLED_APPS in settings.py:INSTALLED_APP = (
…
‘limitpages’,
…
)Add in settings.py:LIMITPAGES_MAX_PAGES = 13
Package: limits
limitsis a python library to perform rate limiting with commonly used storage backends (Redis, Memcached, MongoDB & Etcd).Supported StrategiesFixed WindowThis strategy resets at a fixed interval (start of minute, hour, day etc).
For example, given a rate limit of10/minutethe strategy will:Allow 10 requests between00:01:00and00:02:00Allow 10 requests at00:00:59and 10 more requests at00:01:00Fixed Window (Elastic)Identical to Fixed window, except every breach of rate limit results in an extension
to the time out. For example a rate limit of1/minutehit twice within a minute will
result in a lock-out for two minutes.Moving WindowSliding window strategy enforces a rate limit of N/(m time units)
on thelast mtime units at the second granularity.For example, with a rate limit of10/minute:Allow 9 requests that arrive at00:00:59Allow another request that arrives at00:01:00Reject the request that arrives at00:01:01Storage backendsRedisMemcachedMongoDBEtcdIn-MemoryDive right inInitialize the storage backendfromlimitsimportstoragememory_storage=storage.MemoryStorage()# or memcachedmemcached_storage=storage.MemcachedStorage("memcached://localhost:11211")# or redisredis_storage=storage.RedisStorage("redis://localhost:6379")# or use the factorystorage_uri="memcached://localhost:11211"some_storage=storage.storage_from_string(storage_uri)Initialize a rate limiter with the Moving Window Strategyfromlimitsimportstrategiesmoving_window=strategies.MovingWindowRateLimiter(memory_storage)Initialize a rate limitfromlimitsimportparseone_per_minute=parse("1/minute")Initialize a rate limit explicitlyfromlimitsimportRateLimitItemPerSecondone_per_second=RateLimitItemPerSecond(1,1)Test the limitsassertTrue==moving_window.hit(one_per_minute,"test_namespace","foo")assertFalse==moving_window.hit(one_per_minute,"test_namespace","foo")assertTrue==moving_window.hit(one_per_minute,"test_namespace","bar")assertTrue==moving_window.hit(one_per_second,"test_namespace","foo")assertFalse==moving_window.hit(one_per_second,"test_namespace","foo")time.sleep(1)assertTrue==moving_window.hit(one_per_second,"test_namespace","foo")Check specific limits without hitting themassertTrue==moving_window.hit(one_per_second,"test_namespace","foo")whilenotmoving_window.test(one_per_second,"test_namespace","foo"):time.sleep(0.01)assertTrue==moving_window.hit(one_per_second,"test_namespace","foo")LinksDocumentationChangelog
Package: limits-exporter
# Openstack Limits Exporter
Prometheus exporter for openstack limits of specified projects## Installation` pip installlimits-exporter`In the examples folder exists a sample systemd unit file template.## Usage
The exporter needs aclouds.yamlfile, which is located at:
-/etc/openstack/clouds.yaml-~/.config/openstack/clouds.yaml-./clouds.yaml- or at a custom location set withexport OS_CLIENT_CONFIG_FILE=/path/to/clouds.yamlOptional arguments are:
-–cloudsonly use clouds in comma-seperated list fromclouds.yaml(default all)
-–intervalthe scrape interval in seconds (default 10s)
-–portthe port on which the server runs (default 9500)## More Information
-https://docs.openstack.org/python-openstackclient/latest/configuration/index.html
Package: limittar
LimitTarThis application/library is for limiting the size of a tar archive for spanning
data directly across multiple Blu-Ray/DVD discs, flash drives or as files on
online storage with file size limits. It tries to fit as many files as possible
into a tar archive without creating partial files. This means each tar archive
can be restored independently without joining.This application was mainly developed to be used withaes-pipefor space efficient data
encryption using pipes to remove the need for temporarily storing the
potentially large archives and encrypted data.RequirementsPython 3.4+InstallationFrom the Python Package Index:pip install limittarOr download and run:python3 setup.py installCommand-Line UsageUse the-hargument for help:limittar -hSpanning files in tar archives across multiple USB storage devicesfind /path/photos/ -print0 > files

limittar -0 -i files -l remaining1 -s 16g > /dev/sdX
limittar -0 -i remaining1 -l remaining2 -s 20g > /dev/sdX
cat remaining2 | limittar -0 -l remaining3 -s 16g > /dev/sdX
...
Package: limitys
limitysOverlap (Finnish: limitys) assesses sentences from constrained and overlapping vocabularies.License: MITDocumentationUser and developerdocumentation of limitys.Bug TrackerFeature requests and bug reports are best entered in thetodos of limitys.Primary Source repositoryThe primary source oflimityslives somewhere on a mountain in Central Switzerland.
But, we use decentralized version control (git), so any clone can become the source to everyone's benefit, no central only code.
Anyway, the preferred public clones oflimitysare:on codeberg- a democratic community-driven, non-profit software development platform operated by Codeberg e.V.at sourcehut- a collection of tools useful for software development.StatusExperimental.Note: The default branch isdefault.