Saravanan666/pypi-org huggingface dataset:
Package: et-stopwatch
A class for timing code. A Stopwatch object can be used to time code using itsstartandstopmethods:from et_stopwatch import Stopwatch

stopwatch = Stopwatch() # create and start the stopwatch
sleep(1)
stopwatch.stop()
print(stopwatch)

stopwatch : 1.003744 sUse as acontext manager:with Stopwatch(message='This took') as sw: # using a custom message
    for i in range(3):
        sleep(1)
        print(i, sw.stop(), 's') # stop() returns the time since the last call to start|stop in seconds

0 1.004943
1 1.004948
2 1.003404
This took :
    total  : 3.013295 s
    minimum: 1.003404 s
    maximum: 1.004948 s
    mean   : 1.004432 s
    stddev : 0.000727 s
    count  : 3Since stop was called more than once, some statistics are printed.Use as adecorator:@Stopwatch(name="say_hi_and_sleep_two_seconds", ndigits=3) # custom message, print only 3 digits.
def say_hi_and_sleep_two_seconds():
    print("hi")
    sleep(2)

say_hi_and_sleep_two_seconds()

hi
say_hi_and_sleep_two_seconds : 2.003 sFree software: MIT licenseDocumentation:https://et-stopwatch.readthedocs.io.
Package: etsy3py
Etsy3PyClient for Etsy API v3InstallationYou can install etsy3py using pip:pipinstalletsy3pyRequirementsPython 3.6 or higher.Etsy APIThis is a Python client for the Etsy API.
The client makes it easy to interact with the Etsy API and perform operations on a user's behalf.UsageTo use the EtsyApi class, you will need to obtain an access token from the Etsy API.frometsy3py.v3importEtsyApiaccess_token="YOUR_ACCESS_TOKEN"client_id="YOUR_CLIENT_ID"etsy_api=EtsyApi(access_token=access_token,client_id=client_id)listing_id=12345listing=etsy_api.get_listing(listing_id)AuthenticationThe EtsyApi class uses OAuth 2.0 authentication. You will need to obtain an access token from the Etsy API
before using the client. You can obtain an access token by following the
instructions in the Etsy API documentation.Rate LimitingThe Etsy API has a rate limiting policy that limits the number of requests that can be made in a given time period.Authentication step-by-stepEtsyOAuthClientis a Python class that provides an authentication client for the Etsy marketplace API,
allowing users to connect to the API using OAuth2 authentication.UsageHere is an example of how to use the EtsyOAuthClient to obtain an access token from the Etsy API.frometsy3py.oauthimportEtsyOAuthClientReplace these with your own values from the Etsy Developer Consoleclient_id='your_client_id'client_secret='your_client_secret'redirect_uri='your_redirect_uri'scope=['your_scope_1','your_scope_2',...]Create an instance of the EtsyOAuthClientclient=EtsyOAuthClient(client_id,client_secret,redirect_uri,scope)Get the authorization URLauthorization_url,state=client.authorization_url()Redirect the user to the authorization URL to grant access. Once the user has granted access, get the authorization code and use it to obtain an access tokenauthorization_code='the_authorization_code'access_token=client.fetch_token(authorization_code)You can now use the access token to make requests to the Etsy APIRefresh tokenTherefresh_tokenmethod of theEtsyOAuthClientclass requests a new access token from the authorization server using a refresh token.Parametersrefresh_token(required): The refresh token used to obtain a new access token.Return ValueTherefresh_tokenmethod returns a dictionary containing the new access token and any additional data returned by the authorization server.UsageReplace these with your own values from the Etsy Developer Consoleclient_id='your_client_id'client_secret='your_client_secret'# create an instance of the EtsyOAuthClientclient=EtsyOAuthClient(client_id,client_secret)# if the access token expires, you can use the refresh token to obtain a new access token and additional datanew_access_token=client.refresh_token(refresh_token)This package is licensed under the MIT License.
Package: etsy-py
## etsy_pyPython2 & Python3 module for Etsy's API.### Installation```pip install etsy_py```### API Usage```from etsy_py.api import EtsyAPIapi = EtsyAPI(api_key='secret key from etsy app')# get a list of all top level Etsy categoriesr = api.get('taxonomy/categories')data = r.json()```Refer to Etsy's API documentation at https://www.etsy.com/developers/ for more information.
Package: etsy-py-dev
EtsyPy ~ The only working Etsy API wrapper!This wrapper auto-generates itself from the API spec provided by Etsy atopenapi.etsy.com/v2/Instead of generating at runtime, it generates itself as the API changes through a set of Github Actions, this means you need to be sure to keep it up to date! You can check if you are up to date by calling{{packagename}}.need_update()^^^ Planning to implement two update categories, with ones that effect large programmatic changes raising a separate exception to simple method table updates.By pre-generating the API, this wrapper can take advantage of thetypingmodule, and stub files to provide autocomplete. Hints for Etsy parameters are planned.Basic Usage:import{{packagename}}# EtsyPy uses pluggable Requesters, that handle authentication, and pre-processing of requests.# When initializing the Requester, you must specify the authentication mode:# oauth_1 | api_key# api_key authentication mode:requester={{packagename}}.rq.EtsyRequester(auth_mode="api_key",api_key="$token",api_base_url="https://openapi.etsy.com/v2"# <-- Without the trailing slash! (is default))# Oauth 1 authentication mode: <-- Still being figured out, may change aggressively between updates!oauth_credentials={{packagename}}.rq.EtsyOauthCredentials(client_key="$api_key",client_secret="$shared_secret",resource_owner_key="$oauth_token",resource_owner_secret="$oauth_token_secret")# For help getting these credentials, scroll down to the Oauth Helper section.requester={{packagename}}.rq.EtsyRequester(auth_mode="oauth_1",oauth_credentials=oauth_credentials)# Now we initialise a client.etsy_client={{packagename}}.client.EtsyClient(requester)# With this client you can call any API method, e.g.etsy_client.findAllFeaturedListings()# <-- You can find these names listed on the Etsy Documentation.# URL arguments, like /listings/:listing_id, should be passed into their# respective methods as positional arguments, in the order that they appear.# They will be URL-Encoded automatically, but must be passed in as strings.etsy_client.getListing("$listing_id")# Query parameters should be passed into their respective methods as a# dictionary, through the query_params keyword argument.etsy_client.findAllFeaturedListings(query_params={"limit":25,"offset":2,"page":6,})# POST and PUT requests that contain JSON data should be passed into methods# through the data kwarg.# ^^^ I expect problems to arise converting objects, if you find a problem# please submit an issue.etsy_client.updateListing("$listing_id",data={"title":"$product_title",})# If a request fails to complete for technical reasons, it will raise its expected# exception from the requests library, however if Etsy returns a failed status code, the# response object will return false on its .ok() method.# Requests return an rq.EtsyResponse object, with the standard requests.Response object contained within.
Package: etsy-scraper
Etsy ScraperRetrieves info from Etsy using UrlLib and Beautiful Soup and returns the data in JSON.Note:This is a web scraper, therefore, it will work until Etsy changes the tags we use to locate and
extract the different fields in the page. Be aware of that if you plan on using it in any large scale project.
Please see the Contribution section to help me keep it up-to-date!InstallationRun the following to install:pipinstalletsy_scraperUsageTo retrieve product data:frometsy_scraper.product_scraperimportproductScrape# Retrieve product data from URLproductScrape(PRODUCT_URL)# Returns# {#   "id": id,#   "title": title,#   "description": description,#   "currency":currency,#   "price":price,#   "materials":materials,#   "images":images,# }To retrieve vendor data:frometsy_scraper.vendor_scraperimportvendorScrape# Retrieve vendor data from URLvendorScrape(VENDOR_URL)# Returns something like# {#   "name": name,#   "subtitle": subtitle,#   "location": location,#   "vendor_since": vendor_since,#   "number_of_sales": number_of_sales,#   "banner_image": banner_image,#   "vendor_image": vendor_image,#   "featured_products": featured_products,#   "all_products": all_products,# }ContributeIf you plan on using / are using the tool and notice that Etsy updated in a way that breaks this code, please
notify me, either by raising an issue or submitting a PR.LicenseThis code is distributed under the MIT license.
Package: etsy-scraper-api
Etsy ScraperOxylabs’Etsy Scraperis a data gathering solution allowing you to extract real-time information from an Etsy website effortlessly. This brief guide explains how an Etsy Scraper works and provides code examples to understand better how you can use it hassle-free.How it worksYou can get Etsy results by providing your own URLs to our service. We can return the HTML for any Etsy page you like. Additionally, we can deliverstructured (parsed) output for Etsy product pages.Python code exampleThe example below illustrates how you can get a parsed Etsy product page result.importrequestsfrompprintimportpprint# Structure payload.payload={'source':'universal_ecommerce','url':'https://www.etsy.com/listing/524233279/tiny-silver-forget-me-not-earrings','geo_location':'United States','parse':True,}# Get response.response=requests.request('POST','https://realtime.oxylabs.io/v1/queries',auth=('user','pass1'),json=payload,)# Instead of response with job status and results url, this will return the# JSON response with the result.pprint(response.json())Find code examples for other programming languageshereOutput Example{"results":[{"content":{"url":"https://www.etsy.com/listing/524233279/tiny-silver-forget-me-not-earrings?click_key=dee3e777ad5cc36010f708a8991825c7d84649b8:524233279&click_sum=2cca2059&ref=hp_rv-3&sts=1","price":29.48,"title":"Tiny silver Forget me Not earrings. Dainty sterling threader earrings with light blue enameled blossom. Threader Stud earring for her.","images":["https://i.etsystatic.com/6401969/r/il/b84458/1226050351/il_75x75.1226050351_kvdw.jpg","https://i.etsystatic.com/6401969/c/1066/847/58/71/il/064963/1226057237/il_75x75.1226057237_q5jf.jpg","https://i.etsystatic.com/6401969/r/il/d68e0d/1226050373/il_75x75.1226050373_6u24.jpg","https://i.etsystatic.com/6401969/r/il/b71cfc/1226050549/il_75x75.1226050549_29un.jpg","https://i.etsystatic.com/6401969/r/il/fe8682/1178831922/il_75x75.1178831922_k9ny.jpg"],"seller":{"url":"https://www.etsy.com/shop/VillaSorgenfrei?ref=simple-shop-header-name&listing_id=524233279","title":"VillaSorgenfrei","rating":4.8636,"star_seller":true,"reviews_count":34115},"reviews":{"count":258},"currency":"USD","shipping":{"from":"Germany"},"categories":[{"title":"All categories"},{"title":"Jewelry"},{"title":"Earrings"},{"title":"Stud Earrings"}],"product_id":"524233279","stock_status":"Low in stock","variation_count":1,"parse_status_code":12000},"created_at":"2022-11-17 14:45:28","updated_at":"2022-11-17 14:45:33","page":1,"url":"https://www.etsy.com/listing/524233279/tiny-silver-forget-me-not-earrings?click_key=dee3e777ad5cc36010f708a8991825c7d84649b8:524233279&click_sum=2cca2059&ref=hp_rv-3&sts=1","job_id":"6999019685052180481","status_code":200,"parser_type":"etsy_product"}]}With our Etsy Scraper, you can effortlessly extract public data from any Etsy web page. Collect the required product information, such as price, reviews, or descriptions, to analyze the market and stay ahead of your competitors. If you have any questions, contact our support team via live chat or email us athello@oxylabs.io.
Package: etta
etta: programmatic access to ExoFOP-TESS dataettais a Python package which allows you to access data from theExoplanet Follow-up Observing Program for TESS (ExoFOP-TESS). The package consists of a series of lightweight wrappers around thePHP functionswhich are offered by ExoFOP-TESS.>>>importetta>>>dataframe=etta.download_toi(toi=125)Fetching data from https://exofop.ipac.caltech.edu/tess/download_toi.php?output=pipe&toi=125>>>dataframeTIC ID  Previous CTOI  Master  ...  Date TOI Updated (UTC)        Date Modified                                           CommentsTOI                                      ...125.03  52368076            NaN       1  ...              2019-12-17  2021-06-01 12:02:45  period is likely correct but possibly two inde...125.01  52368076            NaN       1  ...              2020-10-26  2021-06-01 12:02:45                                          TOI-125 b125.02  52368076            NaN       2  ...              2020-10-05  2021-06-01 12:02:45                             second planet (125.02)[3 rows x 57 columns]>>>etta.download_toi(toi=127,output='pipe',path='.')Fetching data from https://exofop.ipac.caltech.edu/tess/download_toi.php?output=pipe&toi=127Result written to /home/jenny/TSP/github-exofop-api/download_toi.php?output=pipe&toi=127InstallationYou can install the latest stable version of etta using pip:pipinstallettaAlternatively, you can install the current development version of etta:gitclonehttps://github.com/jennywwww/etta.gitcdetta
pythonsetup.pyinstallMore informationFor more information, please refer to thedocumentation.ettais an open source project under the MIT license. In case of any questions or problems, please contact us via theGit Issues.
Package: etto-robot
Python Web Robot BuilderForked fromettoreleandrotognoli/etto-robotThe main idea of py-robot is to simplify the code, and improve the performance of web crawlers.Installpipinstallgit+https://github.com/ettoreleandrotognoli/py-robotIntroBellow we have a simple example of crawler that needs to get a page, and for each specific item get another page.
Because it was written without the use of async requests, it will make a request and make the another one only when the previous has finished.# examples/iot_eetimes.pyimportrequestsimportjsonfromlxmlimporthtmlfrompyquery.pyqueryimportPyQueryaspqpage=requests.get('https://iot.eetimes.com/')dom=pq(html.fromstring(page.content.decode()))result=[]forlinkindom.find('.theiaStickySidebar ul li'):news={'category':pq(link).find('span').text(),'url':pq(link).find('a[href]').attr('href'),}news_page=requests.get(news['url'])dom=pq(news_page.content.decode())news['body']=dom.find('p').text()news['title']=dom.find('h1.post-title').text()result.append(news)print(json.dumps(result,indent=4))We can rewrite that using py-robot, and it will look like that:# examples/iot_eetimes2.pyimportjsonfromrobotimportRobotfromrobot.collector.shortcutimport*importlogginglogging.basicConfig(level=logging.DEBUG)collector=pipe(const('https://iot.eetimes.com/'),get(),css('.theiaStickySidebar ul li'),foreach(dict(pipe(css('a[href]'),attr('href'),any(),get(),dict(body=pipe(css('p'),as_text()),title=pipe(css('h1.post-title'),as_text()),)),category=pipe(css('span'),as_text()),url=pipe(css('a[href]'),attr('href'),any(),url()))))withRobot()asrobot:result=robot.sync_run(collector)print(json.dumps(result,indent=4))Now all the requests will be async, so it will start all the requests for each item at the same time, and it will improve the performance of the crawler.
Package: ettuparser
ETTUParserDISCLAIMER: Корректная работа модуля не гарантируется, так как возможныизменения сайта ETTUвторое пришествие и судный день.This project parses ETTU(Ekaterinburg Tram and Trolley Administration) site for mass transit schedule.Этот проект парсит сайт ЕТТУ(Екатеринбургское трамвайно-троллейбусное управление) на предмет времени до прибытия троллейбуса/трамвая на остановку.The documentation for this repository is written in Russian, cause a problem that this project solves is applicable only to Yekaterinburg.Установкаpip install ettuparserИспользованиеДанный модуль зависит отlxmlиpandas.Единственной функцией данного модуля(на данный момент) являетсяettuparser.parseStation(stationID). ПараметрstationIDможно взять из URL остановки, информацию о которой требуется получить. К примеру: https://mobile.ettu.ru/station/3431(на разных остановках разное количество символов, возможно, зависит от вида транспорта)(неважно). Возвращает данная функцияpandas.DataFrame.
Package: etudataproc
EtuDataProcEtuDataProc is a Python library designed to simplify interaction with a queue service API. It provides methods for authentication, sending codes to the queue, retrieving results, checking queue positions, and canceling tasks. This README serves as a guide to using the QueueClient library effectively.InstallationInstall the current version withPyPI:pipinstalletudataprocOr from Github:pipinstallhttps://github.com/sesh00/etudataproc/archive/main.zipUsageImporting the QueueClientTo use QueueClient in your Python code, import it as follows:frometudataprocimportQueueClientInitializing the QueueClientYou can initialize a QueueClient object by providing the base URL of the queue service and optionally the authentication token.queue_client=QueueClient(base_url="https://your-queue-service-url.com",token="your-auth-token")AuthenticationYou can authenticate with the queue service using your username and password.queue_client.authenticate(username="your-username",password="your-password")Sending Code to the QueueTo send a code to the queue, use thesend_code()method.code="your-code-to-be-sent"queue_client.send_code(code)Retrieving ResultTo retrieve the result of a task from the queue, use theget_result()method.result=queue_client.get_result()Checking Queue PositionYou can check your position in the queue using theget_queue_position()method.position=queue_client.get_queue_position()Canceling TaskTo cancel a task in the queue, use thecancel_task()method.
queue_client.cancel_task()queue_client.cancel_task()Error HandlingIf authentication or token-related errors occur, QueueClient raises an Exception with an appropriate error message. Ensure to handle these exceptions appropriately in your code.ExampleHere's a simple example demonstrating the usage of QueueClient:frometudataprocimportQueueClientqueue_client=QueueClient(base_url="https://your-queue-service-url.com")queue_client.authenticate(username="your-username",password="your-password")code="your-code-to-be-sent"queue_client.send_code(code)result=queue_client.get_result()print("Task Result:",result)position=queue_client.get_queue_position()print("Queue Position:",position)queue_client.cancel_task()ContributingContributions to EtuDataProc are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository.LicenseThe module is available as open source under the terms of theMIT License
Package: etu-django-frame
概括etu 系列（easy to use）
让技术更容易使用！
EDF脚手架工具(Etu Django Frame)是在开源Django框架的基础上封装而成，以更快捷简便的命令方式，快速创建项目工程，以方便开发使用。说明本包名字为 etu-django-frame , 它主要是EDF脚手架工具的封装。其中支持的Django框架版本：2.2.2、3.2.13、4.2.2安装方法通过pip命令进行安装：pip install etu-django-frame参数说明usage:edf-adminlabelproject_name
labels:3.2.134.2.2使用方法cd~
edf-admin4.2.2demo_01错误反馈
Package: etu-django-mcmt
概括etu 系列（easy to use）
让技术更容易使用！
Etu Django Migrations Cache Manager Tool，此工具是用于Django框架项目，功能主要是管理 Migrations 缓存，
实现让 Python 项目更容易上容器，解决容器生命周期 migrations 文件管理不便的问题。说明本包名字为 etu-django-mcmt , 通过 setting 配置中 INSTALLED_APPS 的方式导入 etu_django_mcmt 即可。
目前此工具只支持单一数据库路由模式，不可用于多数据库路由模式，且数据类型为 MySQL 类型。安装方法通过pip命令进行安装：pip install etu-django-mcmt==1.0.0参数说明# settings.py 中新增 etu_django_mcmtINSTALLED_APPS=['etu_django_mcmt',]# 配置说明DCM_DB_ALIAS='default'# 在setting中或者环境变量配置，默认是 default ，可以不用配置DCM_APP_NAMES=['app']# 配置指定的模块列表，即 INSTALLED_APPS 中需要管理 migrations 的模块使用方法pythonmanage.pydb_makemigrationspythonmanage.pydb_migrate错误反馈
Package: etu-fastapi-frame
概括etu 系列（easy to use）
让技术更容易使用！
EFF脚手架工具(Etu FastAPI Frame)是在开源FastAPI框架的基础上封装而成，以更快捷简便的命令方式，快速创建项目工程，以方便开发使用。说明本包名字为 etu-fastapi-frame , 它主要是EFF脚手架工具的封装。其中支持的FastAPI框架版本：0.95.2打包方法1. 将要打包的代码文件，统一放在一个目录中，目录名就是pip包的名字；
2. 在目录外创建一个setup.py文件，并配置好；
3. 执行 python setup.py sdist命令，完成打包；
4. 完成打包后，便可通过 pip install 命令进行安装。安装方法通过pip命令进行安装：pip install etu-fastapi-frame==1.0.0参数说明usage:eff-adminlabelserverproject_name
labels:0.95.2
server:cfgms使用方法cd~
eff-admin0.95.2msgaofeng-ms错误反馈
Package: etui
EtuiExquisite capsule fitted with useful helpers for every day coding.Etuiprovides simple, yet powerful, functions that are otherwise absence.Examplesfrometuiimportis_jsons='{"id": 0, "name": "Test"}'print(is_json(s))>Trues='Hello Pluto!'print(is_json(s))>FalseRESTPaginatorFunction to fully query API with Paginated Resultsimportrequestsfrometuiimportresturl='https://api.example.com'p={'fields':'accounts','limit':100}req=requests.get(url,params=p)# Avalable data exceeds limit and endpoint needs to be called multiple timescomplete_data=paginator(req,'data',['paging','next'])print('Accounts: {len(complete_data)}')>'Accounts: 26023'
Package: etupem
etupemmake Easy To Understand Python Error Message for those who are not good at English.Currently, it is only available in Japanese.Python のエラーメッセージを日本語で表示します。RequirementsPython 3.8 or newerRecommendedPython 3.10 or newerInstall$ pip install etupemUsage (for Japanese)$ pythonja script.pyor$ python -m etupem ja script.pyExample1For example, run the following script."あいうえお" + 456Original python error message:$ python type_error.py
Traceback (most recent call last):
  File "E:\scripts\type_error.py", line 1, in <module>
    "あいうえお" + 123
    ~~~~~~~~^~~~~
TypeError: can only concatenate str (not "int") to strWhen using etupem:$ pythonja type_error.py
Traceback (most recent call last):
  File "E:\scripts\type_error.py", line 1, in <module>
    "あいうえお" + 123
    ~~~~~~~~^~~~~
TypeError: can only concatenate str (not "int") to str
上に表示されているのが本来のエラーメッセージです。エラーについて調べる場合は、上のエラーメッセージで検索して下さい。
【型に関するエラー(TypeError)】
ファイル「E:\scripts\type_error.py」の 1行目でエラーが発生しました。
    "あいうえお" + 123
    ~~~~~~~~~~~~~^~~~~
文字列に 整数(int型)を結合することはできません。Example2Print("Hello, World!")Original python error message:$ python name_error.py
Traceback (most recent call last):
  File "E:\scripts\name_error.py", line 1, in <module>
    Print("Hello, World!")
    ^^^^^
NameError: name 'Print' is not defined. Did you mean: 'print'?When using etupem:$ pythonja name_error.py
Traceback (most recent call last):
  File "E:\scripts\name_error.py", line 1, in <module>
    Print("Hello, World!")
    ^^^^^
NameError: name 'Print' is not defined. Did you mean: 'print'?
上に表示されているのが本来のエラーメッセージです。エラーについて調べる場合は、上のエラーメッセージで検索して下さい。
【名前に関するエラー(NameError)】
ファイル「E:\scripts\name_error.py」の 1行目でエラーが発生しました。
    Print("Hello, World!")
    ^^^^^
「Print」という名前の変数などは見つかりませんでした。「print」の入力ミスではありませんか？