Saravanan666/pypi-org huggingface dataset:
Package: apigratis-sdk-python
SDK Python - APIGratis by API BRASILConjunto de API, para desenvolvedores.Transforme seus projetos em solucoes inteligentes com nossa API. Com recursos como API do WhatsApp, geolocalizacao, rastreamento de encomendas, verificacao de CPF/CNPJ e mais, voce pode criar solucoes eficientes e funcionais.Como instalarpip install apigratis-sdk-pythonCanais de suporte (Comunidade)Obtenha suas credenciaishttps://apigratis.com.brMais informacoeshttps://pypi.org/project/apigratis-sdk-pythonServicos de API disponiveisUpServices availableDescriptionFreeBetaStableYesWhatsAppServiceAPI do WhatsApp Gratuita.YesYesPendingYesReceita Data CNPJAPI Dados CNPJ Receita.YesYesPendingYesReceita Data CPFAPI Dados de CPF Serasa.YesYesPendingYesCorreiosServiceAPI Busca encomendas Correios Brazil.YesYesPendingYesCEPLocationAPI CEP Geolocation + IBGE Brazil.YesYesPendingYesVehiclesServiceAPI Placa Dados.YesYesPendingYesFipeServiceAPI Placa FIPE.YesYesPendingComo utilizarVoce pode utilizar todos os endpoints da API do WhatsApp, basta mudar o action e o bodyDocumentacoeshttps://apibrasil.com.br/documentacoesWhatsApp Servicefromapigratis.ServiceimportServiceimportjsondefwhatsapp():sendTePendingt=Service().whatsapp(json.dumps({"action":"sendTePendingt","credentials":{"SecretKey":"SEU_SECRET_KEY","PublicToken":"SEU_PUBLIC_TOKEN","DeviceToken":"SEU_DEVICE_TOKEN","BearerToken":"SEU_BEARER_TOKEN",},"body":{"message":"Hello World for Python","phone":"5531994359434","time_typing":1}}))print(sendTePendingt)if__name__=="__main__":whatsapp()Vehicles Data Servicefromapigratis.ServiceimportServiceimportjsondefvehicles():vehicle=Service().vehicles(json.dumps({"action":"dados","credentials":{"SecretKey":"SEU_SECRET_KEY","PublicToken":"SEU_PUBLIC_TOKEN","DeviceToken":"SEU_DEVICE_TOKEN","BearerToken":"SEU_BEARER_TOKEN",},"body":{"placa":"OQH3065",}}))print(vehicle)if__name__=="__main__":vehicles()Vehicles FIPE Servicefromapigratis.ServiceimportServiceimportjsondeffipe():vehicle=Service().vehicles(json.dumps({"action":"fipe","credentials":{"SecretKey":"SEU_SECRET_KEY","PublicToken":"SEU_PUBLIC_TOKEN","DeviceToken":"SEU_DEVICE_TOKEN","BearerToken":"SEU_BEARER_TOKEN",},"body":{"placa":"OQH3065",}}))print(vehicle)if__name__=="__main__":fipe()Dados CNPJ Servicefromapigratis.ServiceimportServiceimportjsondefcnpj():vehicle=Service().cnpj(json.dumps({"action":"/","credentials":{"SecretKey":"SEU_SECRET_KEY","PublicToken":"SEU_PUBLIC_TOKEN","DeviceToken":"SEU_DEVICE_TOKEN","BearerToken":"SEU_BEARER_TOKEN",},"body":{"placa":"OQH3065",}}))print(vehicle)if__name__=="__main__":cnpj()
Package: apigw-iam-client
AWS API Gateway IAM Authorizer ClientThis provides a simple base class for AWS API Gateway clients to
provide AWS V4 request signing for http requests when working against
APIs using IAM Authorization.UsageAssuming the rest api endpointfromapigw_iam_clientimportClientclassMyApi(Client):deflist_oranges(self,store_id='all'):returnself.get("%s/oranges"%store_id).json()>>client=MyApi('bhttps://foix.execute-api.us-east-1.amazonaws.com/dev/')>>client.list_oranges(){'version':'0.1.0','oranges':[]}The client also supports obtaining credentials via STS Role Assume to
access the underlying api, by passing a role arn and optional
session_name.
Package: apigwsgi
Makes Python WSGI apps compatible with AWS’ API Gateway proxy resources.ExamplefromflaskimportFlaskimportapigwsgiapp=Flask(__name__)@app.route("/")defindex():return"Hello from Flask!"handler=apigwsgi.Handler(app.wsgi_app)Full exampleFull example including deployment scripts can be found in theexamplesdirectory.To deploy:$pipinstallboto3$examples/flask_handler/bin/deploy[...]UploadedFlaskexampletohttps://xxxxx.execute-api.us-east-1.amazonaws.com/live/When you’re done, remove it with:$examples/flask_handler/bin/destroyLimitationsAPI Gateway doesn’t currently support binary responses, and will fail if
your application sends non-unicode data.See alsoAPI Gateway proxy resource docsWSGI spec
Package: apiharbor-youtubeapi
YouTube Channel Details APIUnlock the secrets of YouTube withYouTube Channel Details API. This cutting-edge API is your solution for diving deep into the intricate details of YouTube channels. Ideal for marketers, researchers, and content creators, our API allows you to extract vital contact information, discover social media links, and much more.Key FeaturesComprehensive Contact Details: Obtain email addresses and other essential contact information of YouTube channel owners.Social Media Discovery: Uncover social media profiles linked to YouTube channels.Geographical Information: Identify the location of channels for targeted marketing or research strategies.User-Friendly Interface: Easy integration into your existing systems.Real-Time Data Access: Always work with the most current data.Versatile Use Cases: Suitable for marketers, researchers, content creators, and businesses.Reliable and Scalable: Supports small-scale and large-scale projects.Use CasesMarketers: Discover influencer partnerships and tailor campaigns.Researchers: Analyze trends and gather data for academic or market research.Content Creators: Find collaboration opportunities and network with peers.Businesses: Connect with channels for promotions and sponsorships.Getting StartedStep 1: Register on RapidAPIOur package communicates with an API published on RapidAPI. To use our library, you'll need a RapidAPI key. Registration is free and can be done atRapidAPI. Follow the steps to register and obtain your key.Step 2: Install the PackageInstall our package using pip:pipinstallyoutube-channel-details-apiharborStep 3: Use the PackageHere's a simple example to get you started:fromsrc.youtube_channel_details_api_client_apiharbor.api_clientimportYouTubeChannelDetailsApiClientimportasyncioapi=YouTubeChannelDetailsApiClient('__YOUR_RAPIDAPI_KEY__')asyncdeftest_get_channel_details():r=awaitapi.get_channel_details('@MrBeast')assertr.status==200assertr.data.channel_id=='UCX6OQ3DkcsbYNE6H8uQQuVA'asyncdefmain():awaittest_get_channel_details()returnNoneasyncio.run(main())Replace__YOUR_RAPIDAPI_KEY__with the key obtained from RapidAPI.ContributeWe welcome contributions! If you have suggestions or want to contribute to our project, please feel free to open an issue or a pull request.LicenseThis project is licensed under the MIT License.Join UsDive into the world of YouTube with our API. Explore unseen aspects, connect with the right people, and gain the insights you need. Sign up now and transform the way you interact with YouTube!
Package: apihero
APIHeroRESTful JSON API documentation generator tool with live unit test.DemoLive test unit.File based structure.Template support (Based onMako).Formatting with JSON and Markdown.How to useinstall from pip:sudo pip install apiherojust work on python3, and if doesn’t work on distros like ubuntusudo apt install python3-pip
sudo pip3 install apiheroNow checkoutAPIHero sampleand learn how to create your own documentation.
for build outputcdon your documentation directory and simply runapihero.TODOLocalization support.Be template design easier.External pages.Search.Response syntax highlighting.Single-page build.Add remember option for parameters, to keep last value.Pre-loader for test unit.Complete APIHero documentation.Add configurable CLI argument’s.Add one level category.
Package: apihub
APIHubAPIHub is a platform to dynamically serve API services on-fly. API service workers can be deployed when needed.Explore the docs »View Demo·Report Bug·Request FeatureTable of ContentsAbout The ProjectBuilt WithGetting StartedPrerequisitesInstallationUsageRoadmapContributingLicenseContactAcknowledgementsAbout The Project![Product Name Screen Shot][product-screenshot]Here's a blank template to get started:To avoid retyping too much info. Do a search and replace with your text editor for the following:yifan,apihub,yifan2019,email,APIHub,project_descriptionFeatures & TODOs[X] Security
    [X] authenticate
    [X] admin, manager, user
    [X] user management
    [X] rate limiter
    [ ] register
    [ ] social login
[ ] Subscription
    [-] subscription
    [-] quota
    [X] application token
    [-] daily usage record in redis
[ ] Async/sync API calls
    [ ] api worker reports input/output: describe
    [X] generic worker deployment 
    [ ] auto scaler for api workersBuilt WithfastapiSQLAlchemypydantictanbih-pipelinepsycopg2redispoetryGetting StartedTo get a local copy up and running follow these simple steps.PrerequisitesThis is an example of how to list things you need to use the software and how to install them.InstallationClone the repogitclonehttps://github.com/yifan/apihub.gitInstall python packagespoetryinstallUsageUse this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.For more examples, please refer to theDocumentationRoadmapSee theopen issuesfor a list of proposed features (and known issues).ContributingContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make aregreatly appreciated.Fork the ProjectCreate your Feature Branch (git checkout -b feature/AmazingFeature)Commit your Changes (git commit -m 'Add some AmazingFeature')Push to the Branch (git push origin feature/AmazingFeature)Open a Pull RequestTestingStart postgres and redisdockercomposeupSetup environment variables in a local .env filecat>.env<<EOFDB_URI="postgresql://dbuser:dbpass@localhost:5432/test"JWT_SECRET="nosecret"REDIS="redis://localhost:6379/1"IN_REDIS="redis://localhost:6379/1"OUT_REDIS="redis://localhost:6379/1"SECURITY_TOKEN_EXPIRES_DAYS=1SUBSCRIPTION_TOKEN_EXPIRES_DAYS=1EOFRun testspoetryruntestShutdown docker servicesdockercomposedownLicenseDistributed under the MIT License. SeeLICENSEfor more information.ContactYifan Zhang -@yifan2019-yzhang@hbku.edu.qaProject Link:https://github.com/yifan/apihubAcknowledgementsCopyright (C) 2021, Qatar Computing Research Institute, HBKU
Package: apiiif
apiiifapiiifis a IIIF Presentation API 3.0 library inspired by the excellentiiif-prezi3library.This has been developed primarily for use onCSNTM's upcoming image websiteand, therefore, has a few requirements that make it more suitable than other solutions:We need a library with comprehensive IDE support.no monkey patchingconsistent type-hintingNo code-gensimple useagecurrently supports only the creation of IIIF presentation resourcesdoes not consume resourcesusespydanticfor modeling and serialization.Table of ContentsInstallationLicenseInstallationpip install apiiifLicenseapiiifis distributed under the terms of theMITlicense.
Package: apiip
IP to LocationFind geolocation data from IP addresses (e.g. city, country, lat/long) using the apiip.net API.apiip.net provides 1.000 free requests per month. For higher plans, check out thewebsiteInstallationYou need to get your API key from here:https://apiip.net/get-startedand you'll get 1.000 free requests/monthFor more details, please visit:API DocumentationTo install this package type the following (for PyPI):pipinstallapiipUsageThe package needs to be configured with your account's API key, which is available in theapiip.net Dashboardfromapiipimportapiipapi_client=apiip('YOUR_API_KEY')info=api_client.get_location()print(info)HTTPS EncryptionBy default, the SSL/TLS is turned on, if you want to disable it just pass the options parameterExamplefromapiipimportapiipapi_client=apiip('YOUR_API_KEY',{'ssl':False})info=api_client.get_location()print(info)ConfigurationCall getLocation method with config objectfromapiipimportapiipapi_client=apiip('YOUR_API_KEY')info=api_client.getLocation({'ip':"67.250.186.196",# '67.250.186.196, 188.79.34.191, 60.138.7.24' - for bulk request'output':"xml",'fields':"city, countryName, currency.name",'languages':"es",})print(info)OptionTypeDescriptionDefaultipstringOptional. Get location about the specify IP or multiple IPs.Requester IPoutputstringOptional. Specify response format, XML or JSON.JSONfieldsstringOptional. Specify response fields.All fieldslanguagesstringOptional. Specify response language.ENcallbackstringOptional. The callback function name (JSONP Callbacks)-Example complete response{"ip":"67.250.186.196","continentCode":"NA","continentName":"North America","countryCode":"US","countryName":"United States","countryNameNative":"United States","regionCode":"NY""regionName":"New York""cityGeoNameId":5128581,"city":"New York","postalCode":"10001","latitude":40.8271,"longitude":-73.9359,"capital":"Washington D.C.","phoneCode":"1","countryFlagEmoj":"🇺🇸","countryFlagEmojUnicode":"U+1F1FA U+1F1F8","isEu":False,"borders":["CAN","MEX"],"topLevelDomains":[".us"],"languages":{"en":{"code":"en","name":"English","native":"English"}},"currency":{"code":"USD","name":"US Dollar","symbol":"$","number":"840","rates":{"EURUSD":0.99518}},"timeZone":{"id":"America/New_York","currentTime":"10/26/2021, 2:54:10 PM","code":"EDT","timeZoneName":"EDT","utcOffset":-14400},"userAgent":{"isMobile":False,"isiPod":False,"isTablet":False,"isDesktop":True,"isSmartTV":False,"isRaspberry":False,"isBot":False,"browser":"Chrome","browserVersion":"100.0.4896.127","operatingSystem":"Windows 10.0","platform":"Microsoft Windows","source":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"},"connection":{"asn":12271,"isp":"Charter Communications Inc"},"security":{"isProxy":False,"isBogon":False,"isTorExitNode":False,"isCloud":False,"isHosting":False,"isSpamhaus":False,"suggestion":"allow","network":"67.250.176.0/20"}}More InformationAPI Documentation
Package: apikeeper
Open source API gateway, asynchronous sexy and simple.Quickstartapikeeper is available on PyPI and can be installed withpip.$pipinstallapikeeperAfter installing apikeeper you can use it like any other Python module.Here is a simple example:importapikeeper# Fill this section in with the common use-case.TheAPI Referenceprovides API-level documentation.Change LogVersion History0.0.1Project created.
Package: apikey
apikeyInstallationTheapikeygit repois available
asPyPi packagepip install "apikey>=0.2.1"
pip install git+ssh://git@github.com/ulf1/apikey.gitUsageStore in default location$HOME/.apikey-storeimportapikeyapikey.save("service1","supersecret")apikey.save("service2","donttellanyone")apikey.save("service3","aboutthiskey")key1=apikey.load("service1")key2=apikey.load("service2")key3=apikey.load("service3")Store in a specific fileapikey.save("service42","topsecretkey",filename="/srv/.secretkeys")key=apikey.load("service42",filename="/srv/.secretkeys")AppendixInstall a virtual environmentpython3.6-mvenv.venvsource.venv/bin/activatepipinstall--upgradepippipinstall-rrequirements-dev.txtPython commandsCheck syntax:flake8--ignore=F401--exclude=$(grep-v'^#'.gitignore | xargs | sed-e's//,/g')Run Unit Tests:pytestPublishpandocREADME.md--frommarkdown--torst-s-oREADME.rstpythonsetup.pysdisttwineupload-rpypidist/*
Package: api-keychain
API KeychainPurposeThe API Keychain is designed to be a single management tool for developers to easily create, maintain, and use their various API keys. Many developers work on a variety of projects, many of which require an API key to one service or another. After dealing with even just a few of these keys, it can get frustrating or even overwhelming to manage them, hence this tool.UsageConsole Commandsapi-keychain init$api-keychaininit<filename>The init command creates a new database with the given filename. If a file already exists, it will stop the program and alert you, to avoid overwriting existing keys.versionadded: 0.4.0api-keychain store$api-keychainstore<filename><application><key>[expiration][userdata]Useapi-keychain storeto save a given key to the database. The database name, application name, and key are required, however an expiration date or custom data are optional. Custom data must be provided in a{key: item}dictionary format.versionadded: 0.2.0api-keychain retrieve$api-keychainretrieve<filename><application>Retrieve a key from the keychain and output it in plaintext. Useful for recovering a key to view/verify.versionadded: 0.2.0Accessing the keychain programamticallyThe API Keychain is primarily designed for easy access to your keys within other software.api-keychain.api-retrieveThe most common use for programmatic access will be to automatically retrieve your key from the keychain using a single command.Import api-retrieve using:fromapi-keychainimportapi-retrieveasyour-own-name-hereCall the command in your modulekey=api-retrieve(application,password,filename)# application: name of the application the key is stored under# password: the keychain password which will be verified# filename: name of the keychain fileThe keychain will return your key in plaintext, for use as you see fit.'versionadded: 0.1.0'Referenceapi-keychain keeps a detailedchangelog, as well as an in-depthAPI Referencefor reference.LicenseThis software is licensed under theGNU GPL 3.0 licenseContributionsContributions are welcome for the project, whether it be code contributions, corrections, or bug/issue/suggestion reports. Seeour contribution guidelines!
Package: api-key-client
Secure API Signature MechanismInternal used for creating signed url for server installed api-key-serverInstallpipinstallapi-key-clientExample:sign_request_1(url, api_key, api_secret)recommand>>>fromapi_key_client.utilsimportsign_request_1>>>url='https://api.example.co/sample/something-important/'>>>sign_request_1(url,'SOME-TEST','some-key-xxxxxx')'https://api.example.co/sample/something-important/?api_key=SOME-TEST&timestamp=20220209144716&sign=7f210048e1e972d968186f8a35a86f9a'sign_request_1(url, api_secret)place api_key in url# sign.py>>>fromapi_key.utilsimportsign_request,sign_request_1>>>url='https://example.site.com/sample/secret-info/?api_key=xxx&xxxxx=true&id=163'>>>url=sign_request(url,'your_secret')>Note:pleasechecksystemdatetothecorrecttimezone,OtherwisethetimeoutcheckingcouldbeinvalidFordockercontainer(alpine)```dockerfileRUNapkadd--updattzdataENVTZ=Pacific/Auckland
Package: apikeystore
A module for easily and securely storing and retriving API credentials in a database.Storing API credentials locally in plaintext is a security anti-pattern. The goal ofapikeystoreis to create an easy to use module that will allow you to protect your credentials. It works by keeping the keys encrypted until your code executes.importapikeystoreasaksimportrequests#Create new vaultmyvault=aks.Vault("Test-vault1.db")myvault.new()#Store an API credential in the vaultmycreds=aks.Creds(vaultName="Test-vault1.db")credDetails={'appName':'virusTotal','urlBase':'https://www.virustotal.com/vtapi/v2/','userId':'','appKey':'cf51cae902609f18f1f37b33c79eb9ad559c599d29441592e1ca1c4c48d175ab','authType':'basic'}mycreds.addCreds(**credDetails)#Retreive and use API keysmycreds=aks.Creds(vaultName="Test-vault1.db")vtcred=mycreds.getCred(appName='virusTotal')vtendpoint=vTcred['urlBase']+'file/report?'payload={'resource':'993dcc7f09c690c6f1d3049b3f66092451f2e82536cf81d15ceef447bc4b3b27','apikey':vTcred['appKey']}r=requests.get(vtendpoint,params=payload)print(r.status_code)#r.json()
Package: api-limit
Api_LimitAboutIt's Simple Middeleware implemented with tocken bucket algorithm to manage the number of api per seconds.Usageimport time
from api_limit import api_limit
import requests

@api_limit(max_api_call=2)
def call_api(url):
    response = requests.get(url)
    if response.status_code != 200:
        raise Exception('API response: {}'.format(response.status_code))
    return responseWe can also specify wheter overflow of call should return the response or simply avoide the call without acknowledgement.
Package: apillama
LlamaAPI SDKLlamaAPI is a Python SDK for interacting with the Llama API. It abstracts away the handling of aiohttp sessions and headers, allowing for a simplified interaction with the API.InstallationYou can install the LlamaAPI SDK using pip:pipinstallllamaapiUsageAfter installing the SDK, you can use it in your Python projects like so:fromllamaapiimportllamaapi# Initialize the llamaapi with your api_tokenllama=LlamaAPI('<your_api_token>')# Define your API requestapi_request_json={"messages":[{"role":"user","content":"What is the weather like in Boston?"},],"functions":[{"name":"get_current_weather","description":"Get the current weather in a given location","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The city and state, e.g. San Francisco, CA"},"days":{"type":"number","description":"for how many days ahead you wants the forecast"},"unit":{"type":"string","enum":["celsius","fahrenheit"]}}},"required":["location","days"]}],"stream":True,"function_call":"get_current_weather"}# Make your request and handle the responsesequences=llama.run(api_request_json)forseqinsequences:print(seq)Note: The run function is asynchronous and will return when all the data from the server has been received.Change LogVersion 0.1: Initial releaseContributingWe welcome contributions to this project. Please see the Contributing Guidelines for more details.Licensellamaapi SDK is licensed under the MIT License. Please see the License File for more details.
Package: apimapper
API WrapperInstall packagefrom PyPi:
pip install apimapperfrom source:
pip install -e .Unit TestingpytestUsageSeehttps://github.com/acdh-oeaw/apimapper/blob/develop/demo/APIMapper%20Demo.ipynbMultiple APIs (GND and VIAF) mapped to a common JSON schemaVIAF only returns VIAF ID - which is contructed into a url using a "rule"from apimapper import APIMapper
from apimapper import config

GND_PERSON_MAP = {config.DIRECT: {'uri': 'id',
                      'label': 'label'}}

VIAF_PERSON_MAP = {config.RESULT: 'result',
                   config.FILTER: {'nametype': 'personal'},
                   config.DIRECT: {'label': 'displayForm'},
                   config.RULES: {'uri': {config.RULE: '"http://www.viaf.org/viaf/{p1}"',
                                          config.FIELDS: {'p1': 'viafid'}}}}

GND_PERSON_SOURCE = {config.URL: 'https://lobid.org/gnd/search',
                     config.QUERY_FIELD: 'q',
                     config.PAYLOAD: {'format':'json:suggest',
                                      'filter': 'type:Person'}}

VIAF_PERSON_SOURCE =  {config.URL: 'http://www.viaf.org/viaf/AutoSuggest',
                       config.QUERY_FIELD: 'query'}


gnd = APIMapper(GND_PERSON_SOURCE, GND_PERSON_MAP)
viaf = APIMapper(VIAF_PERSON_SOURCE, VIAF_PERSON_MAP)
apis = [gnd, viaf]
results = []
for api in apis:
    res = api.fetch_results('Pratchett')
    results.extend(res)

print(results)Using mapping rulesSplitting the GND label field into meaningful subpartsfrom apimapper import APIMapper
from apimapper import config

GND_PERSON_SOURCE = {config.URL: 'https://lobid.org/gnd/search',
                     config.QUERY_FIELD: 'q',
                     config.PAYLOAD: {'format':'json:suggest',
                                      'filter': 'type:Person'}}

GND_PERSON_MAP = {config.DIRECT: {'label': 'label',
                                  'uri': 'id'},
          config.RULES: {'source': {config.RULE: '"GND"'},
                         'label_name': {config.RULE: '"{p1}".split("|")[0].strip()',
                                                config.FIELDS: {'p1': 'label'}},
                                 'label_year': {config.RULE: '"{p1}".split("|")[1].strip() if "{p1}".split("|")[1].strip()[0].isnumeric() else ""',
                                            config.FIELDS: {'p1': 'label'}},
                                     'label_profession': {config.RULE: '"{p1}".split("|")[2].strip() if "{p1}".split("|")[1].strip()[0].isnumeric() else "{p1}".split("|")[1].strip()',
                                                          config.FIELDS: {'p1': 'label'}}}}

api = APIMapper(GND_PERSON_SOURCE, GND_PERSON_MAP)
res = api.fetch_results('Rosalind Franklin')More example usage in apimapper/demo