Saravanan666/pypi-org huggingface dataset:
Package: api-project-generator
API Project GeneratorSimple API Structure Generator using tecnologies:FastAPISQLAlchemyaiohttpaiomysql or asyncpgCommandscreate:api: Creates the project structure and base classesOptional--codeoption auto opens code through acode project_folder_namecommand.
Optional--db-typeoption allows to select database type from "postgres" or "mysql". (default: mysql)api-projectcreatecreate:table: Creates a new table in file in {project_name}/database/tables/{table_module}/{table_file}.pyapi-projectcreate:table[table_module][table_name]create:dto: Creates a new DTO file in {project_name}/dtos/{dtos_module}/{dto_name}.pyapi-projectcreate:dto[dtos_module][dto_name]create:enum: Creates a new Enum file in {project_name}/dtos/enums/{enum_name}.pyTheauto-optsoption in the command can be repeated and will be used as the enum fieldapi-projectcreate:enum[enum_name]--auto-opts[opt_name]create:entity: Creates dtos, routes, repository and table for desired entityOptional--syncoption allow to toggle between async repositories and routes or synchronous ones.api-projectcreate:entity[entity_module][entity_name]ObservationsAll filenames and foldernames arenormalized automatically to snake_case.
Package: apipt
apiptAPIPTis a package which installs Python packages byaptif possible, otherwise usingpip.It's better to useapt.ExampleSay there are a few packages we want to install:Python packages that can be install byapt:numpyrequestsPython packages that can't:fastaitensorflowNormal packages:bind9curlLet's runapipt install numpy requests fastai tensorflow bind9 curl:root@Ubuntu~#apiptinstallnumpyrequestsfastaitensorflowbind9curl
Running:aptinstallpython3-numpypython3-requestsbind9curl
Pressanykeyifno[y/N]prompt.

...

Afterthisoperation,27.0MBofadditionaldiskspacewillbeused.
Doyouwanttocontinue?[Y/n]Y

...

Running:pipinstallfastaitensorflow
Pressanykeyifno[y/N]prompt.


Collectingfastai
...Like what is shown above,apiptautomatically divide those package into two group.For one group, it callsapt install python3-numpy python3-requests bind9 curl, and for another,pip install fastai tensorflow.
Package: apiqa-storage
apiqa-storageThis project aim is to provide user storage backend on minio
for all apiqa django projects.HowToUseAddapiqa-storagetorequirements.txt.# Minio file storage
git+https://github.com/pik-software/apiqa-storage.git#egg=apiqa-storageAddapiqa_storagetoINSTALLED_APPSin settings file.INSTALLED_APPS=['django.contrib.admin',...,'apiqa_storage']Add mixinModelWithAttachmentsMixinto any model. Make and run migrations.fromapiqa_storage.modelsimportModelWithAttachmentsMixinclassUserFile(ModelWithAttachmentsMixin,...):...Add serializer mixin at the beginning and addattachments,attachment_idsto fields.fromapiqa_storage.serializersimportAttachmentsSerializerMixinclassModelWithAttachmentsSerializer(AttachmentsSerializerMixin,...):...classMeta:...fields=(...,'attachments','attachment_ids')Add download and upload file urls to urlpatterns.fromdjango.urlsimportpath,includeurlpatterns=[path('attachments/',include('apiqa_storage.urls')),]Or add staff download file url to urlpatterns.fromdjango.urlsimportpath,includeurlpatterns=[# noqapath('attachments/',include('apiqa_storage.staff_urls')),]Add clean files task to celery beat config.fromcelery.schedulesimportcrontabbeat_schedule={# apiqa-storage clean files'purge_attachments':{'task':'apiqa_storage.tasks.purge_attachments','schedule':crontab(hour=5)},}Add required minio settings. Create bucket on minio!django minio storage usageMINIO_STORAGE_ENDPOINT='minio:9000'MINIO_STORAGE_ACCESS_KEY=...MINIO_STORAGE_SECRET_KEY=...MINIO_STORAGE_BUCKET_NAME='local-static'Other settingsMINIO_STORAGE_MAX_FILE_SIZE: File size limit for upload, humanfriendly value.
Seehttps://humanfriendly.readthedocs.io/en/latest/readme.html#a-note-about-size-units. Default 100MMINIO_STORAGE_MAX_FILE_NAME_LEN: File name length limit. Use for database char limit. Default 100MINIO_STORAGE_MAX_FILES_COUNT: Limit of files in one object. For example 5 files in ticket. None - is unlimited. Default NoneMINIO_STORAGE_USE_HTTPS: Use https for connect to minio. Default FalseMINIO_STORAGE_CLEAN_PERIOD: Delete files without related objects after N days. Default 30Run testpipinstall-rrequirements.txt
pipinstall-rrequirements.dev.txt
docker-composeup
pytest--cov.
Package: apiquotamanager
JobSync API-Quota-Manager LibraryTo installpipinstallapiquotamanagerQuota ManagementTo importfromapiquotamanager.taleo_quota_managerimportQuotaManagerExamplefromapiquotamanager.taleo_quota_managerimportQuotaManagerobj_q=QuotaManager('taleo-enterprise-api')obj_q.calculate_requests_quota(total_quota=2000,used_quota=500,qtime='1 minute')obj_q.calculate_requests_quota(total_quota=2000,used_quota=500,qtime='1 hour')obj_q.calculate_requests_quota(total_quota=2000,used_quota=500,qtime='1 day')obj_q.calculate_requests_quota(total_quota=2000,used_quota=500,qtime='1 month')obj_q.calculate_requests_quota(total_quota=2000,used_quota=500,qtime='1 year')
Package: apiquran
apiquranSangat penting bagi umat muslim untuk membaca dan menghafal al-qurankarena hal tersebut apiquran hadir. Apiquran adalah pustaka untuk membuataplikasi al-quran berisi informasi surah, terjemahan ayatdalam bahasa indonesia, bahasa latin, serta dilengkapi dengan Juz al-quran.Contoh programfromapiquranimportSurahfromapiquranimportJuzimportpprint# menampilkan ayat berdasarkan surahdeftampilkan(surah_quran:Surah):jumlah_ayat=surah_quran.data[3]foriinrange(jumlah_ayat):print(aa.ayat[str(i+1)]['teksArab'])print(aa.ayat[str(i+1)]['teksLatin'])print(aa.ayat[str(i+1)]['teksIndonesia'])print()# menampilkan ayat berdasarkan juzdefdata_juz(nomor_urut:int):returnJuz(nomor_urut).dataif__name__=='__main__':aa=Surah(1)tampilkan(aa)jz=Juz(1)pprint.pprint(jz.data,sort_dicts=False)Pengelompokan berdasarkan surahPada kelas Surah terdapat dua atribut, penjelasannya sebagai berikut.Surah(parameter).dataMengembalikan informasi surah tersebut berdasarkan perameter
bertipe data int. informasi ini akan memiliki tipe data tuple berurutan
berupa nomor, nama dalam bahasa arab, nama dalam bahasa indonesia, jumlah ayat surah, tempat turunnya surah,
dan artinya dalam bahasa indonesia.Surah(parameter).ayatMengembalikan ayat berdasarkan parameter bertipe data int.Pengelompokan berdasarkan juzJuz(parameter).datauntuk mengelompokan ayat berdasarkan juz dengan memasukan
berupa data bertipe int sebagai penggati parameter,
mengembalikan data bertipe dict[str, tuple].Sumberapi ini dibuat berdasarkan apiequran
Package: api-random-protasevich
Модуль для удобной работы с API сайта “random.protasevich.su”.
Написал Bauka Alimgazy.Главный класс Session хранит в себе данные о аккаунте: баланс, общий выигрыш, логин, пароль, айди, токен и другие и имеет методы как начать игру, ходить, узнать информацию о профиле.Атрибуты:
str login
str password
str token
int balance
int id
int winnings
dict finished
bool activeGame
dict game
dict headersМетоды:
def __init__(self, login=’’, password=’’, token=’’)
def auth(self)
def profile(self)
def last(self):
def line(self)
def send(self, login=”Bauka Alimgazy”, amount=1000)
def start(self, bet=100)
def action(self, step=1)
def take(self)
Package: apiratelimit
NOTE:THIS PACKAGE IS A CLONE OFhttps://github.com/tomasbasham/ratelimitPACKAGE. I HAVE JUST CHANGE PACKAGE
DICTIONARY NAME TO AVOID CONFLICT WITH django-ratelimit. I AM NOT CLAIMING OWNERSHIP OF THIS PACKAGE.APIs are a very common way to interact with web services. As the need to
consume data grows, so does the number of API calls necessary to remain up to
date with data sources. However many API providers constrain developers from
making too many API calls. This is know as rate limiting and in a worst case
scenario your application can be banned from making further API calls if it
abuses these limits.This packages introduces a function decorator preventing a function from being
called more often than that allowed by the API provider. This should prevent
API providers from banning your applications by conforming to their rate
limits.InstallationPyPiAdd this line to your application’s requirements.txt:apiratelimitAnd then execute:$pipinstall-rrequirements.txtOr install it yourself:$pipinstallapiratelimitGitHubInstalling the latest version from Github:$gitclonehttps://github.com/tomasbasham/ratelimit$cdratelimit$pythonsetup.pyinstallUsageTo use this package simply decorate any function that makes an API call:fromapiratelimitimportlimitsimportrequestsFIFTEEN_MINUTES=900@limits(calls=15,period=FIFTEEN_MINUTES)defcall_api(url):response=requests.get(url)ifresponse.status_code!=200:raiseException('API response:{}'.format(response.status_code))returnresponseThis function will not be able to make more then 15 API call within a 15 minute
time period.The arguments passed into the decorator describe the number of function
invocation allowed over a specified time period (in seconds). If no time period
is specified then it defaults to 15 minutes (the time window imposed by
Twitter).If a decorated function is called more times than that allowed within the
specified time period then aratelimit.RateLimitExceptionis raised. This
may be used to implement a retry strategy such as anexpoential backofffromapiratelimitimportlimits,RateLimitExceptionfrombackoffimporton_exception,expoimportrequestsFIFTEEN_MINUTES=900@on_exception(expo,RateLimitException,max_tries=8)@limits(calls=15,period=FIFTEEN_MINUTES)defcall_api(url):response=requests.get(url)ifresponse.status_code!=200:raiseException('API response:{}'.format(response.status_code))returnresponseAlternatively to cause the current thread to sleep until the specified time
period has ellapsed and then retry the function use thesleep_and_retrydecorator. This ensures that every function invocation is successful at the
cost of halting the thread.fromapiratelimitimportlimits,sleep_and_retryimportrequestsFIFTEEN_MINUTES=900@sleep_and_retry@limits(calls=15,period=FIFTEEN_MINUTES)defcall_api(url):response=requests.get(url)ifresponse.status_code!=200:raiseException('API response:{}'.format(response.status_code))returnresponseLicenseThis project is licensed under theMIT License.
Package: apirequests
Implements a more convenient interface for constructing API to HTTP
resources.FeaturesThe ability to specify ahostand use relative links;The choice between: checking the status of the response and raises
exceptions (silentparameter);It is based onrequestsand supports all its interfaces;is will be more…Installpip install apirequestsUsageimportapirequestsclassGitHub(apirequests.Client):silent=Falsedef__init__(self):super(GitHub,self).__init__('https://api.github.com/')github=GitHub()print(github.get('zen').text)print(github.get('users/defunkt').json())
Package: apiron
apironapironhelps you cook a tasty client for RESTful APIs. Just don't wash it with SOAP.Gathering data from multiple services has become a ubiquitous task for web application developers.
The complexity can grow quickly:
calling an API endpoint with multiple parameter sets,
calling multiple API endpoints,
calling multiple endpoints in multiple APIs.
While the business logic can get hairy,
the code to interact with those APIs doesn't have to.apironprovides declarative, structured configuration of services and endpoints
with a unified interface for interacting with them.Defining a serviceA service definition requires a domain
and one or more endpoints with which to interact:fromapironimportJsonEndpoint,ServiceclassGitHub(Service):domain='https://api.github.com'user=JsonEndpoint(path='/users/{username}')repo=JsonEndpoint(path='/repos/{org}/{repo}')Interacting with a serviceOnce your service definition is in place, you can interact with its endpoints:response=GitHub.user(username='defunkt')# {"name": "Chris Wanstrath", ...}response=GitHub.repo(org='github',repo='hub')# {"description": "hub helps you win at git.", ...}To learn more about building clients, head over tothe docs.ContributingWe are happy to consider contributions via pull request,
especially if they address an existing bug or vulnerability.
Please read ourcontribution guidelinesbefore getting started.LicenseThis package is available under the MIT license.
For more information,view the full license and copyright notice.Copyright 2018-2022 Ithaka Harbors, Inc.
Package: api-rule-engine
api-rule-engineAPI for sending files to Minereye system and find sensitive informationIntroductionThis repo is meant for sending file to Minereye system and find sensitive information defined by the systemTechnologiesPython 3.7 or higherInstalationpip install api-rule-enginePython code examplefromapi_rule_engine.clientimportsend_filefile_path=<addlocalfilepath>file_metadata={'file_name':file_path.split('/')[-1],'file_path':file_path}withopen(file_path,'rb')asf:res=scan_file(f.read(),file_metadata=file_metadata)>>>res{'response_data':{'found_tracking_groups':[{'action_id':'1','category_id':'12','key':'7','label_id':'None','status':'added','tg_name':'risk.doc'}]},'response_status':200}Sending list of files in threadsimportosimporttimeimportthreadingfromapi_rule_engine.clientimportscan_file_callback,get_bytes,## example of files listfile_list=['../rule_engine/risk.doc','../rule_engine/1138059831.xls','../rule_engine/5.xlsx']## this is short example of metadatadefsimple_metadata(file_path):return{'file_name':file_path.split('/')[-1],'file_path':file_path}d={}threads=[]forfile_pathinfile_list:x=threading.Thread(target=scan_file_callback,args=(os.path.basename(file_path),get_bytes(file_path),simple_metadata(file_path),{},d))threads.append(x)forxinthreads:x.start()whilelen(d)<len(file_list):time.sleep(1)print(d){'5.xlsx':{'found_tracking_groups':''},'1138059831.xls':{'found_tracking_groups':''},'risk.doc':{'found_tracking_groups':[{'action_id':'1','category_id':'12','key':'7','label_id':'None','status':'added','tg_name':'risk.doc'}]}}getting file_metadatafromapi_rule_engine.clientimportsend_filefile_path='../rule_engine/risk.doc'file_metadata={'file_name':file_path.split('/')[-1],'file_path':file_path}withopen(file_path,'rb')asf:res=scan_file(f.read(),file_metadata=file_metadata,fields=['fi_entities_nested'])res{'fi_entities_nested':'[{"display_name": "Email", "id": 10, "values": ["sales@symtrex.com"], "count": 1, "pi_score": 78.9806835921147}, {"display_name": "Full name", "id": 160, "values": ["Lynne Krekeler"], "count": 1, "pi_score": 86.41661304637691}]','found_tracking_groups':[{'action_id':'1','category_id':'12','key':'7','label_id':'None','status':'added','tg_name':'risk.doc'}]}Full Python APIscan_file(file_bytes:bytes,file_metadata={},fields={})file_bytes: files bytes,file_metadata: dictionary of extra information for finding sensitive information on file, for mor details:full listfields: extra metadata to get by request full list:full listscan_file_callback(file_name:str,file_bytes:bytes,file_metadata:dict,fields:list,return_dict:dict)file_name - file name,
return_dict - dict for returning answerreturn_dict : {file_name : answer}
Package: apirun
apirunA simple API test framework for doing api test easy.How to Use It?Open Console, typeapirun --help, you will see some parameters-f TESTCASEFILE, --testcasefile=TESTCASEFILETESTCASEFILE is .xls format, you can write testcases in it.-F TESTCASEFOLDER, --testcasefolder=TESTCASEFOLDERTESTCASEFOLDER contains TESTCASEFILEs, you need writefolderorfolder\\, never\\folder; default is None, which means to scan the current work dir.--report=REPORTFolder to store test results, default isreport.--demoMake demo xls in working dir.-V, --versionShow the version.--emailsending email after finishing api test--fromthe user who sends email, will cover the info in email.json--tothe user(s) who receive email, will cover the info in email.json--subjectthe email subject, will cover the info in email.json, default isAPI Test Result--hostthe email host, will cover the info in email.json, is required no metter in json file or in parameter--pt, --pressuretestrun pressure test according to the xls, supported by locustio;Ctrl + C, if you want to stop it.--pt-demomake PT demo file in current folder--pt-not-runjust make locustfile according to the xls--masterSet locust to run in distributed mode with this process as master, use this parameter with --pt;Ctrl + Break, if you want to stop it.PendingMore api test situations
Package: apirunner
httprunners介绍基于httprunner3.1.4框架进行二次开发，优化相关功能与一些小的缺陷。软件架构软件架构说明安装教程xxxxxxxxxxxx使用说明xxxxxxxxxxxx参与贡献Fork 本仓库新建 Feat_xxx 分支提交代码新建 Pull Request特技使用 Readme_XXX.md 来支持不同的语言，例如 Readme_en.md, Readme_zh.mdGitee 官方博客blog.gitee.com你可以https://gitee.com/explore这个地址来了解 Gitee 上的优秀开源项目GVP全称是 Gitee 最有价值开源项目，是综合评定出的优秀开源项目Gitee 官方提供的使用手册https://gitee.com/helpGitee 封面人物是一档用来展示 Gitee 会员风采的栏目https://gitee.com/gitee-stars/poetry 打包推送
poetry build
poetry publish
Package: apiruns
apiruns-cliApiruns CLI is a tool to make self-configurable rest API. Create an API rest has never been so easy.RequirementsPython 3.6+Installation.pipinstallapirunspoetryinstallExampleapiruns--helpUsage:apiruns[OPTIONS]COMMAND[ARGS]...╭─Options───────────────────────────────────────────────────────────────────╮
│--helpShowthismessageandexit.│
╰────────────────────────────────────────────────────────────────────────────╯
╭─Commands─────────────────────────────────────────────────────────────────╮
│buildBuildimages&validateschema.🔧│
│downStopscontainersandremovescontainers.🌪│
│upMakeyourAPIrest.🚀│
│versionGetcurrentversion.💬│
╰────────────────────────────────────────────────────────────────────────────╯file configurationMake YAML file to configure your application’s services.api.yml# This is an example manifest to create microservices in apiruns.

myapi: # Microservices name.

  # first endpoint
  - path: /users/ # Path name.
    schema: # Schema of data structure.
      username:
        type: string
        required: true
      age:
        type: integer
        required: true
      is_admin:
        type: boolean
        required: true
      level:
        type: stringCrear a API Restapirunsup--fileexamples/api.ymlBuildingAPI
CreatingDBcontainer.
CreatingAPIcontainer.
Startingservices
APIlistenon8000
Package: apiruns-swagger
apiruns-swaggerSwagger documentation for Apiruns projectsInstallpipinstallapiruns-swaggerUsingfromapiruns_swaggerimportjson_to_swaggerapiruns_schema=[{"path":"/users","schema":{"name":{"type":"string"},}},{"path":"/inventory","schema":{"price":{"type":"integer"},}}]servers=[{"url":"https://google.cloud.apiruns.com"}]swagger_schema=json_to_swagger(apiruns_schema,servers=servers)
Package: apisamarinda
API Samarinda (Py)Library untuk menggunakan API Samarinda menggunakan Bahasa Python.Instalasipip install apisamarindaContoh Penggunaanfromapisamarindaimportapi# File api_auth.json bisa diunduh melalui halaman API Andarequest=api.ApiClient("./api_auth.json")# Gunakan Endpoint yang Anda ingin tampilkanresult=request.result('API_URL')# Tampilkan dalam bentuk JSONresult.json()TODOIni masih tahap uji coba karena bertepatan dengan tugas kuliah yang maksain pake Python.Saat ini hanya mendukung GET
Package: api-schemas
API schemasCreate an intermediate representation of an api schema, that can be used to generate code.In other words: Same what OpenAPI has already but with fewer options.But why?: Because it is fun 😎Example API schematypedef Example
    a: str
    b: int
    c: float
    d: any
    e: D {A, B, C}
    f: E
        Z = v v
        ?g[]: bool
        i: str
            type = Date
            format = yyyy-mm-dd HH:MM:ss.SSS
        j: $Week

typedef Date str
    type = Datetime
    format = yyyy-mm-dd HH:MM:ss.SSS
    
typedef Week {Monday, Tuesday, Wednesday}

typedef Q
    a: $Example
    b: $Date
    
typedef QQ $Q

server = http://localhost:5000/api/v1

people
    uri: /people/<name>
    GET
        ->
        <-
            200
                data: $Example
            404
                err_msg: str
            500
                err_msg: str
                
WS
    ->
        a
            i: str
            b: Name
                x: str
                i: int
        join_team
            num: str
    <-
        update
            i[]: intChangelog0.1.3Add compilers to build dataclasses for python and dartAdd Websocket supportAllow Communications that are an array instead of an object0.1.4Date: 01.05.2020Attribute body can be ReferenceType (#c9d8a896cd3653b36315cb31058e616d1296f988)ReferenceType resolution after transform (#4f59f43861a0bccf65f20689d87b85962e0ad81e)Basic error messagesCompiler: Add get_native_type method (#6ea36a7353847b064633908cb42cf6e449050e5a)
Package: apiscrub
API ScrubberAn OpenAPI scrubber to process and remove certain information depending on the target audience. For example, given something like:paths:/hello:get:description:Returns a hello world string./admin:x-only:adminget:description:Get the admin settingsThen runningapiscrub input.yaml -would result in:paths:/hello:get:description:Returns a hello world string.While runningapiscrub --keep=admin input.yaml -would result in:paths:/hello:get:description:Returns a hello world string./admin:get:description:Get the admin settingsNote that thex-onlymetadata extension tag gets removed in both cases.InstallationInstall via Python:$pipinstallapiscrubLicenseCopyright © 2018 Daniel G. Taylorhttp://dgt.mit-license.org/
Package: apisender
API SenderSends messages to various APIs for email or discordfromapisenderimportApisenderSupported APIs:

- Discord
- Mailjet
- SMTP2GO

Todo:
- Mailgun
- Twillo (sms)
- Telnyx (sms)Examples:fromname="fromname"fromid="from@test.com"subject="test subject"toid="to@test.com"toname="toname"bodytext="test text"bodyhtml="<h1>test html</h1>"subject="test subject"print(Apisender(fromname=fromname,bodytext=bodytext).discord().text)print(Apisender(fromname=fromname,fromid=fromid,toname=toname,toid=toid,subject=subject,bodytext=bodytext,bodyhtml=bodyhtml).mailjet().text)print(Apisender(fromid=fromid,toid=toid,subject=subject,bodytext=bodytext).smtp2go().text)Notes:
    - No except checks are done for failed sending.
    - Check is done if password file is missing.
    - Requires requests to work.
    - Returns requests responses.
    - apisender.json is where you keep your passwords