Saravanan666/pypi-org huggingface dataset:
Package: pytomlpp
pytomlppThis is an python wrapper fortoml++(https://marzer.github.io/tomlplusplus/).Some points you may want to know before use:Usingtoml++means that this module is fully compatible with TOMLv1.0.0.We convert toml structure to native python data structures (dict/list etc.) when parsing, this is more inline with whatjsonmodule does.The binding is usingpybind11.The project is tested usingtoml-testandpytest.We support all major platforms (Linux, Mac OSX and Windows), for both CPython and Pypy and all recent Python versions. You just need topip installand we have a pre-compiled binaries ready. No need to play withclang,cmakeor any C++ toolchains.ExampleIn [1]: import pytomlpp                                                                                                                                                                                                                                                                            

In [2]: toml_string = 'hello = "世界"'                                                                                                                                                                                                                                                             

In [3]: pytomlpp.loads(toml_string)                                                                                                                                                                                                                                                                
Out[3]: {'hello': '世界'}

In [4]: type(_)                                                                                                                                                                                                                                                                                    
Out[4]: dict

In [6]: pytomlpp.dumps({"你好": "world"})                                                                                                                 
Out[6]: '"你好" = "world"'Why bother?There are some existing python TOML parsers on the market but from my experience they are implemented purely in python which is a bit slow.Parsing data.toml 1000 times:
  pytomlpp:   0.914 s
     rtoml:   1.148 s ( 1.25x)
     tomli:   4.850 s ( 5.30x)
     qtoml:  11.882 s (12.99x)
   tomlkit:  72.140 s (78.89x)
      toml: Parsing failed. Likely not TOML 1.0.0-compliant.Test it for yourself usingthe benchmark script.InstallingWe recommend you to usepipto install this package:pipinstallpytomlppYou can also usecondato install this package, on all common platforms & python versions.
If you have an issue with a package from conda-forge, you can raise an issue on thefeedstockcondainstall-cconda-forgepytomlppYou can also install from source:git clone git@github.com:bobfang1992/pytomlpp.git --recurse-submodules=third_party/tomlplusplus --shallow-submodules
cd pytomlpp
pip install .
Package: pytomorrowio
Python Tomorrow.io APIPython3.9+ package to access theTomorrow.io Weather APIBoth an async module (TomorrowioV4) and a synchronous module
(TomorrowioV4Sync) are provided.Example CodefromdatetimeimporttimedeltafrompytomorrowioimportTomorrowioV4Syncgps_coord=(28.4195,-81.5812)api=TomorrowioV4Sync("MY_API_KEY",*gps_coord)print(api.realtime(api.available_fields(timedelta(0))))print(api.forecast_nowcast(api.available_fields(timedelta(minutes=5))))FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2020-06-04)First release on PyPI.
Package: pyTON
pyTONPython API for libtonlibjson (Telegram Open Network Light Client).
This project is loosely based onformony ton_clientInstallationThis client works with Python 3.7 only.Prerequisites:PipfilepyTON is been shipped with prebuilt fullnode's client library for Ubuntu Xenial & latest macOS.
In case of incompatibility with your distro it's needed to build TON fullnode's libtonlibjson.so / libtonlibjson.dylib depends on archtecture.
Checkherefor fullnode's build instructions.
Don't forget to copy library file to pyTON/distlib/linux/libtonlibjson.so or pyTON/distlib/darwin/libtonlibjson.dylibInstall using pippip3 install pyTONRunning as a webserverpython3 -m pyTONOptions:--port- default 8000 - webserver port--getmethods- default False - allow runGetMethod endpoint. Note, that generally it is unsafe to allow arbitrary method executions since maliciously constructed getMethod may crash liteclient.
Package: pytonapi
📦 PyTONAPIPython SDK fortonapi.io.Information about the API can be found in thedocumentation.To use the APIyou need an API key, you can get it heretonconsole.com.FeaturesAsynchronous and Synchronous Calls:Enjoy the flexibility of both asynchronous and synchronous variants for API
calls.Response Validation with Pydantic Models:All response data is validated using Pydantic models, ensuring that you
receive structured and validated information.Convenient Data Manipulation:The wrapper facilitates seamless manipulation of data, such as converting balances
to nanotons or amounts.Extensive Examples:Explore a variety of examples in theexamplesfolder to
help you get started and
understand different use cases.UsageInstallationpipinstallpytonapiExamplesAsynchronousfrompytonapiimportAsyncTonapi# Declare an asynchronous function for using awaitasyncdefmain():# Create a new Tonapi object with the provided API keytonapi=AsyncTonapi(api_key="Your API key")# Specify the account IDaccount_id="EQC-3ilVr-W0Uc3pLrGJElwSaFxvhXXfkiQA3EwdVBHNNess"# noqa# Retrieve account information asynchronouslyaccount=awaittonapi.accounts.get_info(account_id=account_id)# Print account detailsprint(f"Account Address (raw):{account.address.to_raw()}")print(f"Account Address (userfriendly):{account.address.to_userfriendly(is_bounceable=True)}")print(f"Account Balance (nanoton):{account.balance.to_nano()}")print(f"Account Balance (amount):{account.balance.to_amount()}")if__name__=='__main__':importasyncio# Run the asynchronous functionasyncio.run(main())SynchronousfrompytonapiimportTonapidefmain():# Create a new Tonapi object with the provided API keytonapi=Tonapi(api_key="Your API key")# Specify the account IDaccount_id="EQC-3ilVr-W0Uc3pLrGJElwSaFxvhXXfkiQA3EwdVBHNNess"# noqa# Retrieve account informationaccount=tonapi.accounts.get_info(account_id=account_id)# Print account detailsprint(f"Account Address (raw):{account.address.to_raw()}")print(f"Account Address (userfriendly):{account.address.to_userfriendly(is_bounceable=True)}")print(f"Account Balance (nanoton):{account.balance.to_nano()}")print(f"Account Balance (amount):{account.balance.to_amount()}")if__name__=='__main__':main()MoreAdditional examples can be foundexamplesfolder.Dependencieshttpx- A fully featured HTTP client for Python 3, which provides sync and asyncpydantic- Data validation and settings management using Python type hintswebsockets- A library for building WebSocket servers and clients in PythonContributionWe welcome your contributions! If you have ideas for improvement or have identified a bug, please create an issue or
submit a pull request.SupportSupported byTONAPIandTON Society(Grants
and Bounties program).DonationsTON-EQC-3ilVr-W0Uc3pLrGJElwSaFxvhXXfkiQA3EwdVBHNNessUSDT(TRC-20) -TJjADKFT2i7jqNJAxkgeRm5o9uarcoLUeRLicenseThis repository is distributed under theMIT License. Feel
free to use, modify, and distribute the code in accordance
with the terms of the license.
Package: pytonconnect
PyTonConnectPython SDK for TON Connect 2.0Analogue of the@tonconnect/sdklibrary.Use it to connect your app to TON wallets via TonConnect protocol. You can find more details and the protocol specification in thedocs.InstallationInstall Python 3 package:pip3 install pytonconnectExamplesAdd the tonconnect-manifestApp needs to have its manifest to pass meta information to the wallet. Manifest is a JSON file named astonconnect-manifest.jsonfollowing format:{"url":"<app-url>",// required"name":"<app-name>",// required"iconUrl":"<app-icon-url>",// required"termsOfUseUrl":"<terms-of-use-url>",// optional"privacyPolicyUrl":"<privacy-policy-url>"// optional}Make sure that manifest is available to GET by its URL.Init connector and callrestore_connection.If user connected his wallet before, connector will restore the connectionimportasynciofrompytonconnectimportTonConnectasyncdefmain():connector=TonConnect(manifest_url='https://raw.githubusercontent.com/XaBbl4/pytonconnect/main/pytonconnect-manifest.json')is_connected=awaitconnector.restore_connection()print('is_connected:',is_connected)if__name__=='__main__':asyncio.get_event_loop().run_until_complete(main())Fetch wallets listYou can fetch all supported wallets listwallets_list=connector.get_wallets()# wallets_list is# [#   {#     name: str,#     image: str,#     about_url: str,#     bridge_url: str,#     universal_url: str,#   },# ]You also can get wallets list usingget_walletsstatic method:wallets_list=TonConnect.get_wallets()Subscribe to the connection status changesdefstatus_changed(wallet_info):# update state/reactive variables to show updates in the uiprint('wallet_info:',wallet_info)unsubscribe()unsubscribe=connector.on_status_change(status_changed)# call unsubscribe() later to save resources when you don't need to listen for updates anymore.Initialize a wallet connection via universal linkgenerated_url=awaitconnector.connect(wallets_list[0])print('generated_url:',generated_url)Then you have to show this link to user as QR-code, or use it as a deep_link. You will receive an update inconnector.on_status_changewhen user approves connection in the wallet.Send transactiontransaction={'valid_until':1681223913,'messages':[{'address':'0:0000000000000000000000000000000000000000000000000000000000000000','amount':'1',# 'stateInit': 'base64_YOUR_STATE_INIT' # just for instance. Replace with your transaction state_init or remove},{'address':'0:0000000000000000000000000000000000000000000000000000000000000000','amount':'1',# 'payload': 'base64_YOUR_PAYLOAD' # just for instance. Replace with your transaction payload or remove}]}try:result=awaitconnector.send_transaction(transaction)print('Transaction was sent successfully')exceptExceptionase:ifisintance(e,UserRejectsError):print('You rejected the transaction. Please confirm it to send to the blockchain')else:print('Unknown error:',e)
Package: pytonik
pytonikPytonik is a python framework built to enhance fast and easy web development, helping web developers build more apps with fewer codes.
The framework uses an Expressive Architectural Pattern, structured on a Model-View-Controller (MVC), and bundles of components to reuse while deploying the framework.How to setupPytonik provides an inbuilt server for deployment and can as well be run on, WAMP, XAMPP, LAMP or MAMP, using CGI.To Create Pytonik Project Folder$ pytonik-startTo Run Pytonik Server$ pytonik-serverTo Install Project Requirements fromrequirements.txtfile.$ pytonik-installTo Read Pytonik Docs$ pytonik-docs🤝 ContributingContributions, issues and feature requests are welcome!Feel free to check theissues page.For guidance on setting up a development environment and how to make a contribution to Pytonik, see thecontributing guidelines.Documentation on how to?Getting StartedAssistanceHaving issue using or implementing modules and functions, upload your pytonik project on github, open an issues. our contributors and maintainers will look into it.Show your supportGive a ⭐️ if you like this project!Support Pytonik and the libraries it uses. In order to grow the community of contributors and users, and allow the maintainers to devote more time to the projects,please donate today.ContactName:Pytonik MVCEmail:dev@pytonik.com
Package: pytonik-agent
pytonik Agent ModulepytonikAgent Module, getsuserorvisitorweb browser and operating system information such as name and versionInstall pytonik_agentpip install pytonik_agentImport Modulefrom pytonik_agent.browser import browser
from pytonik_agent.os import osget browser namebrowser().nameget browser versionbrowser().versionget operating system nameos().nameget deviceos().devicepytonik is open to questions and contributions, feel free to ask.Contact Information:Name:pytonik MVCEmail:pytonikmvc@gmail.com
Package: pytonik-curl
Pytonik curlPytonikcurlmodule support sending or initiating actions within or outside.
It enables access to API’s and return respond back to the application, in form of JSON, HTML, RAW data etc.
In this case the use of curl module is toPOST,GET,HEAD,PUTinformation in internal or from external API’s URL
using attributes likestatus,reason,  andresult.  Wherebystatushandles response codes
example200,404,500, etc. which thereasonof this status could be OK, Not Found, Internal server Error, etc.
Get excepted information fromresultHow to installWe recommend you to install pytonik package using Terminal or Command Line Window$ pip install pytonik-curl=2.0Import Modulefrom pytonik_curl.curl import curlCallablecl = curl()Curl Local VariableURL #accept url link
HTTPHEADER #httpheader  application/x-www-form-urlencoded etc.
CONTENTHEADER #accept text/plain, html/plain etc.
HEADER #accept {'Accept': 'Value'}etc.
TIMEOUT #accept
POSTFIELDS #accept dictionary formate {name: example, next: testing}
POST #accept folder or url part / or /mypath
GET	#accept folder or url part / or /mypath
HEAD #accept folder or url part / or /mypath
PUT #accept folder or url part / or /mypath
PORT #accept url port 8080GETretrieves information from api’s server and returns responsestatus,reason, andresulturl = "https://example.com"
cl = curl()
cl.set(cl.URL, url)
cl.set(cl.GET, '/users/{username}'.format(username='testme'))
cl.finish()
print(cl.status, cl.reason, cl.result())HEADcheck api’s and returns responsestatusandreasonurl = "https://example.com"
cl = curl()
cl.set(cl.URL, url)
cl.set(cl.HEAD, '/users')
cl.finish()
print(cl.status, cl.reason)POSTsent data/information to api using parameters or arguments
and returns responsestatus,reason, andresulturl = "https://example.com"
cl = curl()
cl.set(cl.URL, url)
cl.set(cl.CONTENTHEADER, 'application/x-www-form-urlencoded')
cl.set(cl.ACCEPTHEADER, 'text/plain')
cl.set(cl.POST, '/add/users')
cl.set(cl.POSTFIELDS, {'username':'testme', 'password':'test' })
cl.finish()
print(cl.status, cl.reason, cl.result('utf-8'))ContactName:Pytonik MVCEmail:dev@pytonik.com
Package: pytonik-ip-vpn-checker
pytonik ip and vpn checkerpytonikIP and VPN checker Module checks visitors/audiences, proxy, sock, and VPN IP address. it returns a response such as :-hostname,country,city,region,loc,organd more.Install pytonik ip and vpn checkerpip install pytonik_ip_vpn_checkerImport Modulefrom pytonik_ip_vpn_checker.ip import iphow to get HTTP IP ADDRESSip.get().iphow to get VPN IP ADDRESSip.vpn().iphow to check if visitor is using VPNip.vpn().is_vpnhow to get IP ADDRESS and PROPERTIESpytonik_user = ip.get()
pytonik_user.ip
pytonik_user.hostname
pytonik_user.city
pytonik_user.region
pytonik_user.country
pytonik_user.loc
pytonik_user.orgdefault check IP ADDRESSip.property('41.190.30.100').hostname
ip.property('41.190.30.100').city
ip.property('41.190.30.100').region
ip.property('41.190.30.100').country
ip.property('41.190.30.100').loc
ip.property('41.190.30.100').orgpytonik is open to questions and contributions, feel free to ask.Contact Information:Name:pytonik MVCEmail:pytonikmvc@gmail.com
Package: pytonik-time-ago
pytonik Time Ago ModulepytonikTime Ago Module, convert date and time to human readable formatInstall pytonik time agopip install pytonik_time_agoImport Modulefrom pytonik_time_ago.timeago import timeagodefaulttimeago("2019-11-25 18:07:10").agoformattimeago("19-11-2019 18:07:10", '%d-%m-%Y %H:%M:%S').agopytonik is open to questions and contributions, feel free to ask.Contact Information:Name:pytonik MVCEmail:pytonikmvc@gmail.com
Package: pytoniq-core
pytoniq-coreInstallationpipinstallpytoniq-coreExamplesYou can find them in the/examplesfolder.DonationsTON -EQBvW8Z5huBkMJYdnfAEM5JqTNkuWX3diqYENkWsIL0XggGGStructurebocCellSliceBuilderHashmapAddressExotic cellscryptoCryptography for ADNLNative fast crc functionsKeys, Mnemonics generationSignatures creation and verifyingproofMerkle proofs verifying -articletlTLautomatic (de)serializationtl-bAlmost all wrappers for schemes fromblock.tlbClasses for popular custom tlb schemes
Package: pytonlib
PyTONLibThis is standalone Python library based onlibtonlibjson, the functionality is similar to theton-http-apiwith the following restrictions:a client can connect to only one LiteServer;a client is asyncronious;no requests cache.InstallationFrom PyPiCurrently, the library works for Windows, Mac and Linux only on Intel CPUs:(Windows) Install OpenSSL v1.1.1 for Win64 fromhere.Install Python 3 package:pip3 install pytonlib.DockerIn this repo Compose file is provided to deploy the example of service withpytonlib:docker-compose-fdocker-compose.jupyter.yamlbuild
docker-compose-fdocker-compose.jupyter.yamlup-dJupyter Notebook will be available on port 3100 (http://localhost:3100).ExamplesWe recommend to use IPython or Jupyter Notebook for prototyping because they allow to runasynccode. An example of runningasynccode from script could be found in the end of this section.Connecting to the first LiteServer in mainnet config:importrequestsimportasynciofrompathlibimportPathfrompytonlibimportTonlibClient# downloading mainnet configton_config=requests.get('https://ton.org/global.config.json').json()# create keystore directory for tonlibkeystore_dir='/tmp/ton_keystore'Path(keystore_dir).mkdir(parents=True,exist_ok=True)# init TonlibClientclient=TonlibClient(ls_index=0,# choose LiteServer index to connectconfig=ton_config,keystore=keystore_dir)# init tonlibjsonawaitclient.init()Reading blocks info:masterchain_info=awaitclient.get_masterchain_info()block_header=awaitclient.get_block_header(**masterchain_info['last'])shards=awaitclient.get_shards(master_seqno=masterchain_info['last']['seqno'])Reading Block Transactions for masterchain block:masterchain_info=awaitclient.get_masterchain_info()txs=awaitclient.get_block_transactions(**masterchain_info['last'],count=10)Running async code from script:importrequestsimportasynciofrompathlibimportPathfrompytonlibimportTonlibClientasyncdefmain():loop=asyncio.get_running_loop()ton_config=requests.get('https://ton.org/global.config.json').json()# create keystore directory for tonlibkeystore_dir='/tmp/ton_keystore'Path(keystore_dir).mkdir(parents=True,exist_ok=True)# init TonlibClientclient=TonlibClient(ls_index=0,# choose LiteServer index to connectconfig=ton_config,keystore=keystore_dir,loop=loop)# init tonlibjsonawaitclient.init()# reading masterchain infomasterchain_info=awaitclient.get_masterchain_info()# closing sessionawaitclient.close()if__name__=='__main__':asyncio.run(main())Running testsTo run tests inasynciomode use the following command:PYTHONPATH=./pytest--asyncio-mode=stricttests/
Package: pytonlib-telemint
PyTONLib-TelemintPyTONLibutility forTelemintNFTs.Telemintis the smart contract that Telegram uses inFragment.comfor auctioning NFTs.PyTONLibis a standalone Python library based onlibtonlibjson.FeaturesRead data from NFT:• Token NamePhone Number forAnonymous Telegram NumbersUsername forTelegram Usernames• Auction StateBidder addressHighest BidLast Bid TimestampMinimum BidAuction End Timestamp• Auction ConfigBeneficiary AddressInitial Minimum BidMaximum BidMinimum Bid StepMinimum Extened TimeInstallationInstallpytonlib-telemintwith pip:pipinstallpytonlib-telemintUsage / Examplesfrompytonlib_telemintimportTelemintNFT# 'client' is an initialized 'TonlibClient' instance.nft=TelemintNFT('EQBqs8pl1dJOZeXC3lspnYneBHag7VbQ9zKkv4IpQT3nnn5g')print(nft)# Output: TelemintNFT at EQBqs8pl1dJOZeXC3lspnYneBHag7VbQ9zKkv4IpQT3nnn5gawaitnft.init(client)print(nft)""" Output:Token Name: dageAuction State: {'bidder_address': 'EQAV4pVmtxgOXz-Aj241MUePgGAjkn7znrHZRXb6cCGiRJ_b','bid': 5050000000000,'bid_ts': 1673275014,'min_bid': 5302500000000,'end_time': 1673879814}Auction Config: {'beneficiary_address': 'EQBAjaOyi2wGWlk-EDkSabqqnF-MrrwMadnwqrurKpkla9nE','initial_min_bid': 5050000000000,'max_bid': 0,'min_bid_step': 5,'min_extend_time': 3600,'duration': 604800}"""SeePyTONLib Examplesfor PyTONLib usage.FeedbackIf you have any feedback, please reach out atTelegram.AcknowledgementsTONPyTONLibTON Dev ChatOn TelegramAuthors@Natanel-Shitrit
Package: pyTONPublicAPI
pyTONPublicAPIPython implementation of TON Public API for The Open Network (TON).Supported API serversTON.sh- fullTON Center- partial, will be extendedTON Center Testnet- partial, will be extendedTON API- partial, will be extendedTON API Testnet- partial, will be extendedInstallationInstallation using pip (a Python package manager):$ pip install pyTONPublicAPIUsageEverything is as simple as the API itself.Create pyTONPublicAPI instanceAccess API methods in pythonic notation (getAddressInformation -> get_address_information)from pyTONPublicAPI import pyTONPublicAPI
client = pyTONPublicAPI()
print(client.get_address_balance(address = "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N"))If you want to work with a single address - you can pre-set it on init and avoid in functions.from pyTONPublicAPI import pyTONPublicAPI
client = pyTONPublicAPI(address = "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N")
print(client.get_address_balance())
print(client.get_transactions())You can also check tests.py.ExceptionsExceptions are rised using pyTONException class.API serversBy default all calls are sent to TON.sh server. To select API server you should:Create server objectPass it to pyTONPublicAPI constructor via api_server parameterfrom pyTONPublicAPI import pyTONPublicAPI, pyTONAPIServerTonCenter
api_server=pyTONAPIServerTonCenter()
client = pyTONPublicAPI(api_server=api_server)Ton.shClasspyTONAPIServerTonShAdditional constructor paramters:blockchain_id - Identifier of target blockchain ID, either "mainnet" or "test". Default is "None", so default begaviour is up to API server.Ton CenterClasspyTONAPIServerTonCenterAdditional constructor paramters:api_key - Authentication key. Using API without API key is limited to 1 request per second. Default is "None", so API is used without API key.Ton Center TestnetClasspyTONAPIServerTonCenterTestAdditional constructor paramters:api_key - Authentication key. Using API without API key is limited to 1 request per second. Default is "None", so API is used without API key.TON APIClasspyTONAPIServerTonAPIAdditional constructor paramters:api_key - Authentication key. Using API without API key is limited to 1 request per second. Default is "None", so API is used without API key.TON API TestnetClasspyTONAPIServerTonAPITestAdditional constructor paramters:api_key - Authentication key. Using API without API key is limited to 1 request per second. Default is "None", so API is used without API key.NotesAPI servers support different subset of commands. Check correspondent API specification before use.API servers have different reply formats! Currently it's up to you to deal with it. May be once there will be a reply parser for unification.
Package: pytool
Pytool Packagepytoolis a collection of often used
helper methods and classes that make life easier or fill in gaps in the
Python Standard Library.Pytool is compatible with and tested against Python 3.8 and higher. End of life Python versions are not supported.[!NOTE]
Pytool 4.x is a major release that is not backwards compatible with earlier
versions. It now requires Python 3.8 or higher, and adds Python 3 type
annotations among other improvements. New features will only be added to the
4.x release line.Pytool's source is hosted on Github:https://github.com/shakefu/pytoolAny comments, issues or requests should be submitted via Github:https://github.com/shakefu/pytool/issuesDocumentationRead thecomplete
documentationonRead the
Docs!InstallationPytool is available on PyPI for your installation ease.pipinstallpytoolUsagePytool is a collection of common and useful functions designed to help
your code be easier to read, write and maintain. The API is well
documented with examples of how they might be used.See thecomplete
documentationon Read The
Docs for more information.Contributorsshakefu(creator, maintainer)dshen109(contributor)abendig