Saravanan666/pypi-org huggingface dataset:
Package: pycloaker
PyCloaker - A Cloaking ModuleCloaking Module For PythonInstallationpipinstallpycloakerWhat It Does ?You can cloak your python based website with this module.There is what does the module do :Checks User-AgentChecks ASN CompanyBlocks Cities You DeterminedBlocks Countries You DeterminedBlocks Ip Addresses You DeterminedThere is what you can do with this module :Block Ip AddressesBlock CitiesBlock CountriesUsagefrompycloakerimport*url_is_humans_redirect="https://x.com"url_is_bots_redirect="https://a.com"clients_ip="85.233.55.78"clients_user_agent="Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_2_9) AppleWebKit/533.39 (KHTML, like Gecko) Chrome/47.0.2873.193 Safari/537"cloaker=PyCloaker(url_is_humans_redirect,url_is_bots_redirect)cloaker.blockedCities(["paris","london"])cloaker.blockedCountries(["us","ru"])cloaker.blockedIpAddresses(["85.233.97.58"])url=cloaker.cloak(clients_ip,clients_user_agent)print(url)It's gonna printhttps://x.com. Because there isn't any match with determined rules.Trying another example:frompycloakerimport*url_is_humans_redirect="https://x.com"url_is_bots_redirect="https://a.com"clients_ip="85.233.55.78"clients_user_agent="Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_2_9) AppleWebKit/533.39 (KHTML, like Gecko) Chrome/47.0.2873.193 Safari/537"cloaker=PyCloaker(url_is_humans_redirect,url_is_bots_redirect)cloaker.blockedIpAddresses(["1.1.1.1","85.233.55.78"])url=cloaker.cloak(clients_ip,clients_user_agent)print(url)It's gonna printhttps://a.com. Because client's ip address is matches with determined ip address.You can see its very easy and user friendly.Usage in FlaskfromflaskimportFlask,url_for,redirect,requestfrompycloakerimportPyCloakerapp=Flask(__name__)cloaker=PyCloaker("/human-url","/bot-url")cloaker.blockedCountries(["rus","us"])@app.route("/")defindex():#ip = request.headers['X-Forwarded-For'] # If its a real website you can use thatip="85.214.122.50"# We determined this statically. Just a random ipuserAgent=request.headers["User-Agent"]url=cloaker.cloak(ip,userAgent)returnredirect(url)@app.route("/human-url")defhuman():return"You're a human!"@app.route("/bot-url")defbot():return"You're a bot :("if__name__=="__main__":app.run(debug=True)WARNING : THIS MODULE MADE FOR JUST TESTS AND EDUCATÄ°ONAL PURPOSE.DO NOT USE THAT IN A REAL WEBSITE
Package: py-clob-client
py-clob-clientPython client for the Polymarket CLOB. Full API documentation can be foundhere.Installationpip install py-clob-clientIntended for use with Python 3.9RequisitesAllowancesThe correct token allowances must be set before orders can be placed. The following mainnet (Polygon) allowances should be set by the funding (maker) address. For testnet addresses and additional documentation please refer to theAPI documentation.token(s)spenderdescription0x2791Bca1f2de4661ED88A30C99A7a9449Aa841740x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982Eallow the CTF Exchange contract to transfer user's usdc0x2791Bca1f2de4661ED88A30C99A7a9449Aa841740xC5d563A36AE78145C45a50134d48A1215220f80aallow the Neg Risk CTF Exchange contract to transfer user's usdc0x2791Bca1f2de4661ED88A30C99A7a9449Aa841740xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296allow the Neg Risk Adapter contract to transfer user's usdc0x4D97DCd97eC945f40cF65F87097ACe5EA04760450x4bFb41d5B3570DeFd03C39a9A4D8dE6Bd8B8982Eallow the CTF Exchange contract to transfer user's conditional tokens0x4D97DCd97eC945f40cF65F87097ACe5EA04760450xC5d563A36AE78145C45a50134d48A1215220f80aallow the Neg Risk CTF Exchange contract to transfer user's conditional tokens0x4D97DCd97eC945f40cF65F87097ACe5EA04760450xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296allow the Neg Risk Adapter contract to transfer user's conditional tokensSeethis gistfor a an example of how to set these allowances for an account using python.Usageimportosfrompy_clob_client.constantsimportPOLYGONfrompy_clob_client.clientimportClobClientfrompy_clob_client.clob_typesimportOrderArgsfrompy_clob_client.order_builder.constantsimportBUYhost="https://clob.polymarket.com"key=os.getenv("PK")chain_id=POLYGON# Create CLOB client and get/set API credentialsclient=ClobClient(host,key=key,chain_id=chain_id)client.set_api_creds(client.create_or_derive_api_creds())# Create and sign an order buying 100 YES tokens for 0.50c eachresp=client.create_and_post_order(OrderArgs(price=0.50,size=100.0,side=BUY,token_id="16678291189211314787145083999015737376658799626183230671758641503291735614088"))print(resp)Seeexamplesfor more.
Package: pyClockTower
This module has four submodules :siteinfo, sitemapping,  sitelocation, and aircom.
Each of these submodules have different uses. Siteinfo can be used to find the sites: encoding, cookies, ip and port, and
header.   Sitemapping is used to: check if a url is valid and online,  map all internal and external urls on a site,
and find all hidden urls on a site like robot.txt.  Sitelocation is still in development but in the future it will be used
mainly for pulling up a heatmap of the world based on traffic, where the sites server is located and more. aircom is used
for tracking the traffic on a website. To use aircom you will have to have a google API key and include that key in the attributes of the functions.
Package: pycloser
Сlean exit for Python scripts after Ctrl-C. Inspired byxlab’s Closerfor Go (Golang). # Usagefrompycloserimportdefer,listen,close# Push inform function to stack.@deferdefinform():print('You close programm with Ctrl-C.')# Push goodbuy function to stack.@deferdefgoodbuy():print('Goodbuy!')# Listening SIGINT, SIGTERM and SIGHUP OS signals.# When it sended, listen() pop deferred functions from stack# and call its one after the other.listen()# Main programm loopforxinrange(1,10):print("{0}:{1}".format(x,input(">> ")))# Pop deferred functions from stack and call its, if signal was not sended.close()
Package: pyclothoids
pyclothoidsA Python library for clothoid curvesRead the Documentation!Clothoid curves have some remarkable mathematical properties that make them desirable for use in many areas of physics and engineering.  Not only is a clothoid parameterized by arc length, but it has closed form expressions for its tangent angle and curvature.  These remarkable properties come at a cost.  The cartesian coordinates of a clothoid can only be expressed in closed form in terms of the Fresnel integrals, and cannot in general be evaluated exactly.There has been significant research into numerical algorithms to evaluate, construct, and manipulate these curves.  Software packages exist for this purpose but are often difficult to master.  This package takes a different approach, aiming to be easy to pick up and experiment with.  The ultimate goal is to provide a simple, intuitive, and pythonic interface to state of the art numerical software that allows you to leverage the latest research without the learning curve.If you have a problem that you think could be solved using clothoid curves, this package aims to handle all the complexities of clothoid geometry for you so that you can focus on the top level problem you are trying to solve.That said, clothoid curves aren't always well behaved, and there are many other simpler curves that are far easier to understand and manipulate.  Before you use this library for a project, be sure that other simpler geometric constructs such as B-splines will not fulfill your needs.The main design goals of pyclothoids are minimalism and simplicity.  For that reason, the top level API for this module consists of only one class - Clothoid.  To prevent common errors and further simplify the interface, Clothoid was designed to be immutable from the top level.  This means any methods that transform a Clothoid will return a new Clothoid with the desired modifications while leaving the original Clothoid intact.
Package: pycloud189
Pycloud189An easy to use Python3 package that interact with the cloud189 cloud disk service.InstallationInstall with pippip install pycloud189Quick StartAddpycloud189.api.cloudpan189 import Cloudpan189to the beginning of your code.Initialize a new Cloudpan189 object usingapi = Cloudpan189().Then specify thecloudpan189-goexecute file locate folder path call for exampleapi.setCloudpan189GoDirPath('/Users/tickstep/cloudpan189-go-v0.0.5-darwin-macos-amd64').
If you do not has thecloudpan189-gofile you can download it freely fromhere.Now everything is get ready, you can do all the thing that cloud189 supports such as: login, ls, upload, download, etc.ExampleHere is a example code show how to dofrom pycloud189.api.cloudpan189 import Cloudpan189

if __name__ == '__main__':
    api = Cloudpan189()

    # set the 'cloudpan189-go' execute file dir path
    api.setCloudpan189GoDirPath('/Users/tickstep/cloudpan189-go-v0.0.5-darwin-macos-amd64')

    # of course, we need login first
    # if you do not has an account, register one from https://cloud.189.cn
    if not api.isLogin():
        print(api.login('usernmae@189.cn', 'password'))

    # version
    print(api.version())

    # get list file of current work dir
    print(api.ls(''))

    # change word dir
    print(api.cd('/folder2020'))

    # show current work dir
    print(api.pwd())

    # upload file
    print(api.upload('/Users/tickstep/Downloads/testfile2020.txt', '/folder2020'))

    # download file
    print(api.download('/folder2020/testfile2020.txt'))Change logs
Package: pycloudapp
PyCloudApp is a wrapper around the CloudApp API.It supports the following CloudApp API Features:Authenticate a userGetting Infos from a cl.ly URLList a user’s itemsCreate BookmarksUpload FilesFor full functionality you need to haveposteras well as
Python 2.7 orordereddictinstalled.Note that the CloudApp API has been extended alot, feel free
to fork and contribute to the project on GitHub.
Package: pyCloudCompareCLI
CloudCompare CLI Python WrapperThis is a python wrapper for CloudCompare CLI based on thisWiki Page.You can build and chain commands which can be executed.RequirementsPython3.6+An installed version ofCloudCompareBasic UsageRead ply-file and save in ascii-format with extension ".xyz".importpyCloudCompareascccli=cc.CloudCompareCLI()cmd=cli.new_command()cmd.silent()# Disable consolecmd.open("pointcloud.ply")# Read filecmd.cloud_export_format(cc.CLOUD_EXPORT_FORMAT.ASCII,extension="xyz")cmd.save_clouds("newPointcloud.xyz")print(cmd)cmd.execute()Same example with Context-Manager:importpyCloudCompareascccli=cc.CloudCompareCLI()withcli.new_command()ascmd:cmd.silent()# Disable consolecmd.open("pointcloud.ply")# Read filecmd.cloud_export_format(cc.CLOUD_EXPORT_FORMAT.ASCII,extension="xyz")cmd.save_clouds("newPointcloud.xyz")print(cmd)AcknowledgementsThe work in the scope of the CloudCompare CLI Python Wrapper in this repository is supported by theInstitute of Geo-Engineering at Clausthal University of Technology.
Package: pycloudflare
A Python client for CloudFlare API v4 and Host API.It provides two levels of integration against the CloudFlare API:A low level API, with one method per API endpoint
(pycloudflare.services).A high level ORM API (pycloudflare.models).Only a subset of the CloudFlare API is currently supported:UsersZonesZone SettingsDNS RecordsPage RulesUser creation & authentication through CloudFlare’s partner-facing
Host API.UsageGet all our zones at CloudFlare>>>cf=CloudFlareService(api_key,email)>>>fordomainincf.get_zones():>>>printdomain['name'],domain['id']ConfigurationThe Host (Partner) API service client is configured when it is
instantiated and reads its configuration fromconfiguration.json.The configuration file should be in the format:{"common":{"cloudflare":{"api_key":"HOST API KEY HERE",}}}TestingInstall development requirements:pip install -r requirements.txtTests can then be run by doing:nosetestsThe integration tests require a host API key. They can be run with:nosetests tests/test_integration.py
Package: pycloudflared
pycloudflaredpython cloudflared wrapperInstallpipinstallpycloudflaredCloudflare binaries will be downloaded the first time you run it.Usage❯pycloudflared--help
NAME:cloudflared-Cloudflare's command-line tool and agentUSAGE:cloudflared [global options] [command] [command options]VERSION:2023.2.1 (built 2023-02-03-1038 UTC)DESCRIPTION:cloudflared connects your machine or user identity to Cloudflare'sglobalnetwork.YoucanuseittoauthenticateasessiontoreachanAPIbehindAccess,routewebtraffictothismachine,andconfigureaccesscontrol.Seehttps://developers.cloudflare.com/cloudflare-one/connections/connect-appsformorein-depthdocumentation.

COMMANDS:updateUpdatetheagentifanewversionexistsversionPrinttheversionproxy-dnsRunaDNSoverHTTPSproxyserver.serviceManagesthecloudflaredWindowsservicehelp,hShowsalistofcommandsorhelpforonecommandAccess:access,forwardaccess<subcommand>Tunnel:tunnelUseCloudflareTunneltoexposeprivateservicestotheInternetortoCloudflareconnectedprivateusers.

GLOBALOPTIONS:--credentials-filevalue,--cred-filevalueFilepathatwhichtoread/writethetunnelcredentials[%TUNNEL_CRED_FILE%]--regionvalueCloudflareEdgeregiontoconnectto.Omitorsettoemptytoconnecttotheglobalregion.[%TUNNEL_REGION%]--edge-ip-versionvalueCloudflareEdgeipaddressversiontoconnectwith.{4,6,auto}(default:"4")[%TUNNEL_EDGE_IP_VERSION%]--post-quantum,--pqWhengivencreatesanexperimentalpost-quantumsecuretunnel(default:false)[%TUNNEL_POST_QUANTUM%]--overwrite-dns,-fOverwritesexistingDNSrecordswiththishostname(default:false)[%TUNNEL_FORCE_PROVISIONING_DNS%]--help,-hshowhelp(default:false)--version,-v,-VPrinttheversion(default:false)COPYRIGHT:(c)2023CloudflareInc.YourinstallationofcloudflaredsoftwareconstitutesasymbolofyoursignatureindicatingthatyouacceptthetermsoftheApacheLicenseVersion2.0(https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/license),Terms(https://www.cloudflare.com/terms/)andPrivacyPolicy(https://www.cloudflare.com/privacypolicy/).All arguments are passed directly to cloudflared.Since there is no binary for arm mac, you may need Rosetta 2.try_cloudflaredfrompycloudflaredimporttry_cloudflaretry_cloudflare(port=7860)A simple function to run trycloudflare within python.
Package: pycloudimage
PyCloudImage 0.1.4介绍强大的获取卫星云图的工具例子frompycloudimageimport*#显示最新的风云四号A星全彩圆盘图FY4A_DISK.getlatest().show()类classCloudImage(ciinfo='',latestapi=None,timeapi=None)ciinfo : 云图的简要介绍latestapi : URL字符串或字典timeapi : URL字符串或字典，目前没有内置云图设置方法CloudImage.ciinfo => str云图的简要介绍CloudImage.getlatest(size = None, delwatermark = True) => PIL.Image.Image下载最新云图CloudImage.gettime(self, itime, size = None) => PIL.Image.Image下载具体时间的云图，目前还不稳定API参数url : 云图URL（必填）crop : 云图裁剪del : 云图填充去水印size : 云图大小内置云图你可以通过查看源码或使用dir命令查看内置云图。
Package: pycloudlib
pycloudlibPython library to launch, interact, and snapshot cloud instancesInstallInstall directly fromPyPI:pip3installpycloudlibProject's requirements.txt file can include pycloudlib as a dependency. Check out thepip documentationfor instructions on how to include a particular version or git hash.Install from latest changes inmainbranch:gitclonehttps://github.com/canonical/pycloudlib.gitcdpycloudlib
python3setup.pyinstallUsageThe library exports each cloud with a standard set of functions for operating on instances, snapshots, and images. There are also cloud specific operations that allow additional operations.See the examples directory or theonline documentationfor more information.BugsFile bugs on Launchpad at thepycloudlib project.ContactTo contact the developers use thepycloudlib-devs@lists.launchpad.netlist.
Package: pycloudmusic
pycloudmusic优雅的异步高性能 Python 音乐 API 库开箱即用/简单/快速 Python >= 3.9基于 NeteaseCloudMusicApi 改写项目文档 (文档不更新时请清理浏览器缓存): https://docs.sakuratools.top/pycloudmusic/|打不开时候备用: https://github.com/FengLiuFeseliud/pycloudmusic.docs快速入门安装使用 pip 即可安装 pycloudmusicpipinstallpycloudmusic输出对象pycloudmusic 下的所有对象被打印时都会格式化输出类所有变量， 方便查看对象数据frompycloudmusicimportMusic163Apiimportasyncioasyncdefmain():musicapi=Music163Api()# 获取歌曲 421531# https://music.163.com/#/song?id=421531music=awaitmusicapi.music(421531)# 打印歌曲信息print(music)print("="*50)asyncio.run(main())此处数据为打印歌单对象可迭代对象pycloudmusic 下的部分对象可以被迭代使用如下获取歌单 PlayList 对象后可以直接 for in PlayList 对象， 将迭代返回按歌单曲目生成的 Music 对象frompycloudmusicimportMusic163Apiimportasyncioasyncdefmain():musicapi=Music163Api()# 获取歌单 7487291782# https://music.163.com/#/playlist?id=7487291782playlist=awaitmusicapi.playlist(7487291782)# 打印歌单信息print(playlist)print("="*50)# 打印歌单曲目formusicinplaylist:print(music.name,music.artist_str,music.id)asyncio.run(main())因此可以使用推导式快速生成 task 列表下载歌单曲目frompycloudmusicimportMusic163Apiimportasyncioasyncdefmain():musicapi=Music163Api()# 获取歌单 7487291782# https://music.163.com/#/playlist?id=7487291782playlist=awaitmusicapi.playlist(7487291782)# 创建任务tasks=[asyncio.create_task(music.play())formusicinplaylist]# 等待任务awaitasyncio.wait(tasks)asyncio.run(main())模拟登录pycloudmusic 支持邮箱登录， 二维码登录， 手机密码登录， 手机验证码登录这里可以用邮箱登录长期保持 Cookie 有效性，邮箱登录不需要人为操作frompycloudmusicimportLoginMusic163importasyncioasyncdefmain():login=LoginMusic163()# 邮箱登录code,cookie,musicapi=awaitlogin.email("you login email","you login password")# 验证登录print("="*60)print(code,cookie,musicapi)print("="*60)print(awaitmusicapi.my())asyncio.run(main())评论pycloudmusic 支持网易云的所有评论， 对支持评论的对象使用 Music163Comment 的方法即可"""获取歌曲评论"""frompycloudmusicimportMusic163Api,Pageimportasyncioasyncdefmain():musicapi=Music163Api()# 获取歌曲# https://music.163.com/song?id=1902224491&userid=492346933music=awaitmusicapi.music(1902224491)# 按时间获取评论asyncforcommentsinPage(music.comments,hot=False):forcommentincomments:print(f"{comment.user_str}:{comment.content}")asyncio.run(main())错误处理API 返回 200 以外状态码触发 Music163BadCode 错误错误对象.code 获取 API 状态码，错误对象.data 获取 API 数据frompycloudmusicimportMusic163Api,Music163BadCodeimportasyncioasyncdefmain():musicapi=Music163Api()try:playlist=awaitmusicapi.playlist(7487291782)exceptMusic163BadCodeaserr:print(err,err.code,err.data)asyncio.run(main())代理设置pycloudmusic 支持 proxy 时出现错误触发回调来更新 proxyfrompycloudmusicimportMusic163Api,set_proxy,set_proxy_callbackimportasyncio# 正常这里是多个 proxy ipproxy=["http://117.114.149.66:55443"]# 设置 proxyset_proxy(proxy[0])# proxy 更新回调defproxy_callback(err):# 如果 proxy 时出现错误这里更新# 第一个返回值新的 proxy ip# 第二个返回值 aiohttp.BasicAuth proxy 身份验证, 没有为 Nonereturnproxy[0],None# 设置 proxy 更新回调set_proxy_callback(proxy_callback)asyncdefmain():musicapi=Music163Api()# 获取歌曲 421531# https://music.163.com/#/song?id=421531music=awaitmusicapi.music(421531)awaitmusic.play()# 打印歌曲信息print(music)print("="*50)asyncio.run(main())
Package: pycloudstack
PyCloudStack (Unified Cloud Stack Operator Framework)1. OverviewPyCloudStack abstracts the common objects/operations/resources for diverse cloud
architectures like hypervisor stack based on libvirt or direct qemu command,
container stack orchestrated by Kubernetes or direct docker command, and the running
or remote IaaS host.It can be used to create advance deployment CI/CD operator via python plugin for
ansible, end-to-end validation framework with customized the components/configurations
in full vertical stack.The architecture diagram is as follows:2. Getting StartInstall from PyPIpip3 install pycloudstackInstall from sourcecd ~/pycloudstack
pip3 install --user --upgrade .3. ExamplesExample 1: Operate VM via Libvirtfrom pycloudstack.vmguest import VMGuestFactory
from pycloudstack.vmparam import VM_STATE_SHUTDOWN, VM_STATE_RUNNING, \
    VM_STATE_PAUSE, VM_TYPE_TD

vm_factory = VMGuestFactory(vm_image, vm_kernel)

LOG.info("Create TD guest")
inst = vm_factory.new_vm(VM_TYPE_TD, auto_start=True)
inst.wait_for_ssh_ready()

LOG.info("Suspend TD guest")
inst.suspend()
ret = inst.wait_for_state(VM_STATE_PAUSE)
assert ret, "Suspend timeout"

LOG.info("Resume TD guest")
inst.resume()
ret = inst.wait_for_state(VM_STATE_RUNNING)
assert ret, "Resume timeout"Example 2: Operate VM via Qemu (QMP)from gpl.vmmqmp import VMMQemu
from pycloudstack.vmparam import VM_TYPE_TD, VM_TYPE_LEGACY,

vm_factory = VMGuestFactory(vm_image, vm_kernel)
inst = vm_factory.new_vm(vm_instance_type, vm_class=VMMQemu,
                         auto_start=True)
inst.wait_for_ssh_ready()Example 3: Operate Kubernetes Clusterfrom pycloudstack.cluster import SGXCluster

DEPLOYMENT_TEMPLATE='''
apiVersion: apps/v1
kind: Deployment
metadata:
  name: %(name)s
spec:
  selector:
    matchLabels:
      app: testapp-redis-gsc-sgx
  template:
    metadata:
      labels:
        app: testapp-redis-gsc-sgx
    spec:
      containers:
      - name: redis-gsc-sgx
        image: gar-registry.caas.intel.com/cpio/gsc-centos8-redis:latest
        ports:
          - containerPort: 6379
        env:
        - name: GSC
          value: %(gsc)s
        resources:
          limits:
            sgx.intel.com/enclave: '1'
            sgx.intel.com/epc: '524288000'
'''
SERVICE_TEMPLATE='''
apiVersion: v1
kind: Service
metadata:
  name: %(name)s
spec:
  ports:
  - port: 6379
    protocol: TCP
  selector:
    app: testapp-redis-gsc-sgx
  type: NodePort
'''

cluster_instance = SGXCluster()
deploy_name = 'deployment-redis-gsc-sgx-' + str(uuid.uuid4())
cluster_instance.create_deployment(
        deploy_name,
        yaml.safe_load(DEPLOYMENT_TEMPLATE % {"name":deploy_name, "gsc":gsc}),
        TEST_NAMESPACE)

svc_name = 'svc-redis-gsc-sgx-' + str(uuid.uuid4())
cluster_instance.create_service(
        svc_name,
        yaml.safe_load(SERVICE_TEMPLATE % {"name":svc_name}),
        TEST_NAMESPACE)
cluster_instance.delete_service(svc_name, TEST_NAMESPACE)
cluster_instance.delete_deployment(deploy_name, TEST_NAMESPACE)
Package: pyCloudy
PyCloudy is a Python library to deal with input and output files of Cloudy (Gary Ferland) photoionization code.
Is also allows to generate 3D nebula from various runs of the 1D Cloudy code.RequirementsYou will need to have installedCloudy.
PyCloudy uses numpy and other standard python libraries.InstallationYou may find useful to download, install and upgrade pyCloudy usingpip.For example:pip install pyCloudyUpdates use the same command. You can also useeasy_install pyCloudyTo use the devel package (at your own risks!!!):pip install -U git+https://github.com/Morisset/pyCloudy.gitWarrantyPyCloudy is provided as it is. No Warranty at all, you cannot complain if it runs models which are not fitting your data! :-)ManualThere is no manual for now… There will soon be a HowTo page.But… there is some examples of use in thepyCloudy home page.And the reference manual is accessible from this siteHERE.AcknowledgementsThis project is partly supported by grants DGAPA/PAPIIT-107215 and CONACyT-CB2015-254132.
Package: pyclovaocr
pyclovaocrUnofficial python wrapper forClova AI OCR ServiceInstallpipinstallpyclovaocrUsagefrompyclovaocrimportClovaOCRocr=ClovaOCR()result=ocr.run_ocr(image_path='kor_image.jpg',language_code='ko',ocr_mode='general')print(result)'''{'lines': [{'boundingBox': [[381, 462], [528, 461], [529, 521], [382, 522]],'id': 1,'wordIDs': [1]},{'boundingBox': [[214, 509], [524, 509], [524, 572], [214, 572]],'id': 2,'wordIDs': [2]}, ...'meta': {'domain': 'general','imageSize': {'height': 800, 'width': 564},'language': 'ja','version': 'general_rt__v2.2.0'},'words': [{'boundingBox': [[381, 462], [528, 461], [529, 521], [382, 522]],'confidence': 1.0,'id': 1,'isVertical': False,'text': '岩手山'},{'boundingBox': [[214, 509], [524, 509], [524, 572], [214, 572]],'confidence': 0.9989,'id': 2,'isVertical': False,'text': 'アトレッセンス'}, ...'''Supported Language CodesCodeDescriptionkoKoreanjaJapaneseenEnglishSupported Language OCR ModesModesDescriptionSupported LanguagegeneralGeneral OCRko, ja, enreceiptReceiptsko, ja, encredit-cardCredit Cardsko, ja, enbusiness-licenseBusiness LicenseskogiroBillskoname-cardBusiness Cardsko, ja, enid-cardID Cardsko, jainvoiceInvoiceja