Saravanan666/pypi-org huggingface dataset:
Package: paykassa-api-sdk
Paykassa SCI & APIInstallationpython -m pip install paykassa-api-sdkPayment APIInitialize Clientfrompaykassa.paymentimportPaymentApiclient=PaymentApi(api_id,api_key)Check Balancefrompaykassa.dtoimportCheckBalanceRequestfrompaykassa.structimportSystem,Currencyrequest=CheckBalanceRequest()\.set_shop_id("123")response=client.check_balance(request)ifnotresponse.has_error():print(response.get_balance(System.BITCOIN,Currency.BTC))print(response.get_balance(System.ETHEREUM,Currency.ETH))Make Paymentfrompaykassa.dtoimportMakePaymentRequestfrompaykassa.structimportSystem,Currency,CommissionPayer,TransactionPriorityrequest=MakePaymentRequest()\.set_shop_id("123")\.set_amount("1.02")\.set_priority(TransactionPriority.MEDIUM)\.set_system(System.BITCOIN)\.set_currency(Currency.BTC)\.set_paid_commission(CommissionPayer.SHOP)\.set_number("3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy")response=client.make_payment(request)ifnotresponse.has_error():print(response.get_transaction())print(response.get_paid_commission())Merchant APIInitialize Clientfrompaykassa.merchantimportMerchantApiclient=MerchantApi(sci_id,sci_key)Check Payment (IPN)frompaykassa.dtoimportCheckPaymentRequestrequest=CheckPaymentRequest()\.set_private_hash("hash")response=client.check_payment(request)ifnotresponse.has_error():print(response.get_transaction())Check Transaction (IPN)frompaykassa.dtoimportCheckTransactionRequestrequest=CheckTransactionRequest()\.set_private_hash("hash")response=client.check_transaction(request)ifnotresponse.has_error():print(response.get_address_from())print(response.get_confirmations())Generate Addressfrompaykassa.dtoimportGenerateAddressRequestfrompaykassa.structimportSystem,Currency,CommissionPayerrequest=GenerateAddressRequest()\.set_amount("1.123456")\.set_currency(Currency.DOGE)\.set_system(System.DOGECOIN)\.set_comment("test")\.set_paid_commission(CommissionPayer.CLIENT)response=client.generate_address(request)ifnotresponse.has_error():print(response.get_amount())print(response.get_wallet())Get Payment Urlfrompaykassa.dtoimportGetPaymentUrlRequestfrompaykassa.structimportSystem,Currency,CommissionPayerrequest=GetPaymentUrlRequest()\.set_amount("110")\.set_currency(Currency.USDT)\.set_system(System.TRON_TRC20)\.set_comment("test")\.set_paid_commission(CommissionPayer.CLIENT)response=client.get_payment_url(request)ifnotresponse.has_error():print(response.get_method())print(response.get_url())ReferencesDevs DocumentationAPI Documentation
Package: paylense-sdk
Paylense API Python SDKPayment gateway for african businessesJoin our active, engaged community:SpectrumUsageInstallationAdd the latest version of the library to your project using pip:$pipinstallpaylense-sdkThis library supports Python 3.4+ (PyPy supported)Account detailsGetting environment API userNext, we need to get theAPP-ID,usernameandpasswordfor use in the product. You can get these details fromhttps://dashboard.paylense.com/register.The redentials in the sandbox environment can be used straight away. In production, the credentials are provided for you after KYC requirements are met.ConfigurationBefore we can fully utilize the library, we need to specify global configurations. The global configuration must contain the following:PAYLENSE_ENVIRONMENT: Optional enviroment, either "sandbox" or "production". Default is 'sandbox'PAYLENSE_APP_ID: The unique application identity for your appPAYLENSE_USERNAME: Username used for authenticationPAYLENSE_PASSWORD: Password used for authenticationThe full list of configuration options can be seen in the example below:config={"PAYLENSE_ENVIRONMENT":os.environ.get("PAYLENSE_ENVIRONMENT"),"PAYLENSE_APP_ID":os.environ.get("PAYLENSE_APP_ID"),"PAYLENSE_USERNAME":os.environ.get("PAYLENSE_USERNAME"),"PAYLENSE_PASSWORD":os.environ.get("PAYLENSE_PASSWORD"),}CollectionsUsed for receiving moneyYou can create a collections client with the following:importosfrompaylense.collectionsimportCollectionsclient=Collections()MethodsrequestToPay: This operation is used to request a payment from a consumer (Payer). The payer will be asked to authorize the payment. The transaction is executed once the payer has authorized the payment. The transaction will be in status PENDING until it is authorized or declined by the payer or it is timed out by the system. Status of the transaction can be validated by usinggetTransactionStatus.getTransaction: Retrieve transaction information using thetransactionIdreturned byrequestToPay. You can invoke it at intervals until the transaction fails or succeeds. If the transaction has failed, it will throw an appropriate error.Sample Codeimportosfrompaylense.collectionsimportCollectionsclient=Collections()client.requestToPay(mobile="256772123456",amount="600",processing_number="123456789",narration="dd")DisbursementsUsed for sending money to usersYou can create a disbursements client with the followingimportosfrompaylense.disbursementsimportDisbursementsclient=Disbursements()Methodstransfer: Used to transfer an amount from the owner’s account to a payee account. Status of the transaction can be validated by using thegetTransactionStatusmethod.getTransactionStatus: Retrieve transaction information using thetransactionIdreturned bytransfer. You can invoke it at intervals until the transaction fails or succeeds.Sample Codeimportosfrompaylense.disbursementsimportDisbursementsclient=Disbursements()client.transfer(amount="600",mobile="256772123456",processing_number="123456789",narration="dd")DeveloperWe usetoxto automate our tests. You can run the test usingtoxThank you.Changelog0.1.0 (2020-05-01)First release on PyPI.
Package: payler
Payl[oad Spoo]lerSend your payload now, treat it later.What is this?Payler is an asyncio-based Python application intended to provide a way of delaying message execution. The goal of this program is to reduce the workload on your existing message broker solution (Only RabbitMQ is currently supported, but other message-brokers can be easily implemented) by putting the payloads in a storage backend which will then be polled to re-inject payloads in the corresponding destination.InstallationThrough pypi:$pipinstallpaylerThroughpoetry:$gitclonehttps://github.com/tbobm/payler$cdpayler$poetryinstallHow to use thisUsing the command line:Specify the input and output URLs for your drivers (seeconfiguration)(optional) Customize the configuration to suit your needscurrently the example configuration is the only valid oneRun paylerpayler --config-file configuration.yamlUsing the docker image:Pull the docker imagedocker pull ghcr.io/tbobm/payler:latest(optional) Customize the configuration to suit your needscurrently the example configuration is the only valid one(mount the configuration file into the volume at/configuration.yaml)Run the docker image and provide environment variablesdocker run -d --name payler -e BROKER_URL="amqp://payler:secret@my-broker/" -e MONGODB_URL="mongodb://payler:secret@my-mongo/payler" ghcr.io/tbobm/paylerConfigurationIn order to configure the different workflows, payler uses a configuration file (seeconfiguration.yml).Example config file:---workflows:-name:"FetchpayloadsfromRabbitMQandstoretheminMongoDB"location:"payler"callable:"client.process_queue"-name:"Re-injectspayloadstoRabbitMQ"callable:"client.watch_storage"Theworkflows[].nameattribute is currently unused, but will offer a more human-friendly way of getting informed about a workflow's state.
Theworkflows[].locationcorresponds to the package where theworkflows[].callablecan be found. It defaults topayler, but can this is a way of offering a dumb and simple plugin mechanism by creating function matching the following signature:asyncdefmy_workflow(loop:asyncio.AbstractEventLoop)->None:"""My user-defined workflow."""# configure your driver(s)input_driver.serve()FeaturesListen to a Broker QueueStore messages with a duration or date as metadataRe-inject the messages after the duration in the default ExchangeOutput failed messages to global outputTestingThis project has unittests withpytest. A wrapper script is available atrun-tests.sh.ContributingFeel free to open new issues for feature requests and bug reports in theissue pageand even create PRs if you feel like it.This project is linted withpylintwith some minor adjustments (see thesetup.cfg).NoteThis side-project is born from the following:I wanted to experiment with Python'sasyncioA friend of mine had issues with delaying lots of messages using RabbitMQ'sdelayed exchange pluginI was looking for a concrete use-case to work with Github Actions.
Package: paylike
paylike-python-sdkPython implementation of Paylike.io's rest apiLimitationOnly the transaction management part has been implemented, you can find the official api documentation here:https://github.com/paylike/api-docs#transactionsBasic Usageclient=PaylikeApiClient(api_key,merchant_id)Methodscancel_transaction'''Void or partially void the reserved amount on a transaction- transactionId: String,      // required- amount: Decimal,            // If no amount is given, the full amount will be voided'''client.cancel_transaction(transaction_id,amount=None)capture_transaction'''Capture a transaction- transactionId: String,      // required- amount: Decimal,            // required- descriptor: String,         // optional, text on client bank statement- currency: String,           // optional, expected currency (for additional verification)'''client.capture_transaction(transaction_id,amount,descriptor='',currency=None)create_payment_from_transactionMake sure to read aboutrecurring payments.'''Create a payment, based on an existing transaction (used for recurring payments)- transactionId: String,      // required- currency: String,           // required, three letter ISO- amount: Decimal,            // required, amount in minor units- descriptor: String,         // optional, the statement on the customers bankaccount. Will fallback to merchant descriptor'''client.create_payment_from_transaction(transaction_id,currency,amount,descriptor='')create_payment_from_saved_cardMake sure to read aboutrecurring payments.
It's recommended to use create_payment_from_transaction'''Create a payment from a saved card token- cardId: String,             // required- currency: String,           // required, three letter ISO- amount: Decimal,            // required- descriptor: String,         // optional, the statement on the customers bankaccount. Will fallback to merchant descriptor'''client.create_payment_from_saved_card(card_id,currency,amount,descriptor='')get_transaction'''Fetch a transaction- transactionId: String,      // required'''client.get_transaction(transaction_id)get_transactions'''Fetch transactions- limit: Number,              // optional, the number of transactions to fetch. Default 100'''client.get_transactions(limit=100)refund_transaction'''Refund, or partially refund a transaction- transactionId: String,      // required- amount: Decimal,            // required- descriptor: String,         // optional, the statement on the customers bankaccount. Will fallback to merchant descriptor'''client.refund_transaction(self,transaction_id,amount,descriptor="")'''
Package: payload-automation
What is Payload Automation?Now available as a PyPi package:https://pypi.org/project/payload-automation/Payload Automation is a collection of Python classes to serve as a bridge between Sleep and Python which can be used to help automate payload development, testing, opsec checking, and deployment with Cobalt Strike or anything else you can come up with.Please check out the examples folder for pre-made scripts taking advantage of the functionality provided.Included Libraries:Striker: A set of functions to interact with Cobalt Strike and execute functionality typically only accessible via Sleep/GUI.Compyler: A set of functions to compile various payloads from platform or cross-platform.Artifactor: A set of functions to inspect and review artifacts and collect and track IoCs.Sleepy: A set of functions to help facilitate a bridge between Sleep objects and Python objects.Detemplate: An incomplete idea of mine to automate the population of template files based on YAML configurations. Meant to be used with more complex payloads with multiple replacements and/or embedding.Other associated work and credits:Original idea for Striker and some code snipets came from the functionality of Verizon's redshell tool (https://github.com/Verizon/redshell)A similar tool called pycobalt (https://github.com/dcsync/pycobalt) which is worth checking out to see if it better fits your use casesJoe Vest leveraged our libraries to facilicate logging, payload automation, and reporting. Check out his blog post here (https://blog.cobaltstrike.com/2021/10/13/cobalt-strike-sleep-python-bridge/)TODO:Add additional error checking, specifically for application dependenciesExpand compyler to include remote builds and mingwAdd email functionality to StrikerAdd extraction of profile for OPSEC checks
Package: payload_dumper
payload dumperDumps thepayload.binimage found in Android update images. Has significant performance gains over other tools due to using multiprocessing.InstallationRequirementsPython3pipInstall using pippipinstall--userpayload_dumperExample ASCIIcastUsageDumping the entirety ofpayload.binpayload_dumper payload.binDumping specific partitionsUse a comma-separated list of partitions to dump:payload_dumper --partitions boot,dtbo,vendor payload.binPatching older image with OTAAssuming the old partitions are in a directory namedold/:payload_dumper --diff payload.bin
Package: payload-wtf
Payload WTFsimple payload with an easy format for building Python APIs (like Django).
As an alternative that frees you to render responses without DRF or something
that is full of rules.Quick ExampleYou can use this package is easy:payload=PayloadWTF()payload.set_state(setter=PayloadWTF.SET_RESULT,data={"data":"Yes this is data from queryset"})payload.set_state(setter=PayloadWTF.SET_LINKS,next="http://.../?page=1")payload.set_state(setter=PayloadWTF.SET_META,data={'user_activated':{'username':'yanzen'}})print(payload.tojson())# Or payload.todata() result is dictionaryResult:{
    "results": {"data": "Yes this is data from queryset"},
    "meta": {"user_activated": {"username": "yanzen"}},
    "links": {"next": "http://.../?page=1", "prev": ""}
}
Package: paylogic-genres
Classification of genres used in the Paylogic API.The keys represent descriptive genre codes. Genres have hierarchy and some genres have a reference
to a parent genre. There are also name translations provided for different language codes.paylogic_genres.json:{"SPORTS":{"ecc":"02","name":{"fr":"Sports","en":"Sports","nl":"Sports","pt":"Sports","de":"Sports","tr":"Sports","es":"Sports"}},"SPORTS:RUGBY":{"ecc":"02.06","name":{"fr":"Rugby","en":"Rugby","nl":"Rugby","pt":"Rugby","de":"Rugby","tr":"Rugby","es":"Rugby"},"parent":"SPORTS"},...}UsageYou can include paylogic_genres.json to your project and lookup the genre names and traverse
the hierarchy.PythonGenre definitions can also be installed as python package.
Django users can simply add it to INSTALLED_APPS and get names translation
using gettext (Example: ugettext(“SPORTS:RUGBY”)).The genres json file is parsed in python and also avalable for use.
Package: payment-order-renderer
payment_order_rendererБиблиотека для создания документов платежного поручения в формате pdf.
Под капотом собрана из библиотеки printpdf для rust.Установкаpip install payment-order-rendererИспользованиеfrompayment_order_rendererimportcreate_pdf# Функция ожидает словарь следующего вида:# Необязательные поля, в случае их отсутствия просто передавайте по ключу None:# 'side_recipient_kpp'# 'literal_sum'# 'status'# 'purpose_code'# 'uin'# 'cbc'# 'okato'# 'reason'# 'period'# 'reason_number'# 'reason_date'#  'field_110'#payment_order_dict={'creation_date':'21.07.2021','last_transaction_date':'21.07.2021','document_date':'21.07.2021','document_number':'6000','priority':'5','transaction_type_code':'01','purpose':'Оплата по договору (номер/дата) без НДС','payer_kpp':'773601001','payer_inn':'280267860010','payer_name':'ООО "БИОШАНЬ"','payer_bank':'ТОЧКА ПАО БАНКА "ФК ОТКРЫТИЕ"','payer_bank_address':'г. Москва','side_recipient_inn':'7839443197','side_recipient_bank':'ПАО Сбербанк','side_recipient_bank_address':'г. Екатернибург','side_recipient_name':'АО Точка','side_recipient_kpp':'770501001','transaction_sum':'13636.36','payer_account':'40702810401500014770','payer_bank_code':'044525999','payer_cr_account':'30101810845250000999','side_recipient_bank_code':'044525593','side_recipient_account':'42306810963160914857','side_recipient_cr_account':'30101810845250000999','finance_administrator_name':'О.С.Берг','literal_sum':'тысяча рублей 00 копеек','status':'08','purpose_code':'3','uin':'1','cbc':'18210202020061000160','okato':'65401364000','reason':'ТП','period':'МС.08.2009','reason_number':'12','reason_date':'10.10.2009','field_110':'НС',}# Путь до вашего png изображения печатиpath="../pythonProject/pics/stamp_with_signature-1.png"# Результат возвращается в байтахresult=create_pdf(payment_order_dict,path)Внутренняя структура PaymentOrder умеет делать перенос по словам.Суммы вида "6000" и "6000.00" будут размещены на документ ввиде "6000=". Если имеются остатки к примеру "6000.23", то сумма будет размещена в виде "6000-23".На данный момент библиотека умеет загружать лишь файлы формата png.Для написания текстов используются облегченные шрифты Arial и Arial Bold.Примерный вес получаемого документа ~411 кб, планируется и дальше не выходить за границу 500кб.TODOДобавить тестыДобавить больше обработок ошибок(Возможно)Сделать печать опциональным параметром
Package: payment-parser
Payment ParserParses a payment file, with multiple blocks of data, into individual CSVs.The payments file isStored in fixed-width formatContains hyphen line for calculating column widthsCan be split into blocks of text on asplit_termInstallationpip3 install payment-parserExample Code Usage:frompayment_parserimportparse_docparse_doc(file="payment_parser/T140_sample.txt",output_dir="payment_parser/output/",split_term="MASTERCARD WORLDWIDE",verbose=True,)Example CLI Usage:payment_parser --file "payment_parser/T140_sample.txt" --output_dir "payment_parser/output/" --verbose=FalseCLI Output:File: payment_parser/T140_sample.txt, Split Term: MASTERCARD WORLDWIDE, Output Dir: payment_parser/output/, Verbose: False
Block: 1/13, Report: 1IP727010-AA, Table type: 1
*****   No data found in block above.
Block: 2/13, Report: 1IP727020-AA, Table type: 2
Block: 3/13, Report: 1IP727020-AA, Table type: 2
Block: 4/13, Report: 1IP727020-AA, Table type: 2
Block: 5/13, Report: 1IP727020-AA, Table type: 2
Block: 6/13, Report: 1IP727020-AA, Table type: 2
Block: 7/13, Report: 1IP727020-AA, Table type: 2
Block: 8/13, Report: 1IP728010-AA, Table type: 4
Block: 9/13, Report: 1IP728010-AA, Table type: 4
Block: 10/13, Report: 1IP728010-AA, Table type: 3
Block: 11/13, Report: 1IP728010-AA, Table type: 3
Block: 12/13, Report: 1IP728010-AA, Table type: 3
Block: 13/13, Report: 1IP728010-AA, Table type: 5Help/Docs Usage:payment_parser --helpHelp/Docs Output:usage: payment_parser [-h] [--file FILE] [--output_dir OUTPUT_DIR] [--split_term SPLIT_TERM] [--verbose VERBOSE]

optional arguments:
  -h, --help            show this help message and exit
  --file FILE           The absolute path of the file to parse.
  --output_dir OUTPUT_DIR
                        The absolute folder path for saving the parse results.
  --split_term SPLIT_TERM
                        Word or phrase used to split file into chunks.
  --verbose VERBOSE     Whether to enable extra logging.
Package: payments-config
[![Build Status](https://travis-ci.org/mozilla/payments-config.svg?branch=0.0.4)](https://travis-ci.org/mozilla/payments-config)
[![npm version](https://badge.fury.io/js/mozilla-payments-config.svg)](http://badge.fury.io/js/mozilla-payments-config)
[![PyPI version](https://badge.fury.io/py/payments-config.svg)](http://badge.fury.io/py/payments-config)# Payments ConfigConfiguration of products for payments-service, solitude et al.python generate.pycreates translations and json files.In Python:` >>> from payments_config import products >>>products['mozilla-concrete-brick'].amountDecimal('10.00')`In Node:` > fs =require('fs')>fs.readFile('json/products/mozilla-concrete-brick.json','utf-8',function(err, data) {console.log(JSON.parse(data).amount)}); > 10.00 `## Making a releaseBump the version inpackage.jsonCommit and push to masterGo to the [releases page](https://github.com/mozilla/payments-config/releases)
and make a new release using the version e.g. 0.0.4 for the tag and Release
title.Travis will automagically make releases on PyPi and npm for you.
Package: payments-romania
Polls is a Django app to conduct web-based polls. For each question,
visitors can choose between a fixed number of answers.Detailed documentation is in the “docs” directory.Quick startAdd “polls” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'polls',
]Include the polls URLconf in your project urls.py like this:path('polls/', include('polls.urls')),Runpython manage.py migrateto create the polls models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a poll (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/polls/to participate in the poll.
Package: paymentwall-python
Paymentwallis the leading digital payments platform for globally monetizing digital goods and services. Paymentwall assists game publishers, dating sites, rewards sites, SaaS companies and many other verticals to monetize their digital content and services. Merchants can plugin Paymentwall’s API to accept payments from over 100 different methods including credit cards, debit cards, bank transfers, SMS/Mobile payments, prepaid cards, eWallets, landline payments and others.To sign up for a Paymentwall Merchant Account,click here.This library allows developers to usePaymentwall APIs(Virtual Currency, Digital Goods featuring recurring billing, and Virtual Cart).More instructions and code samples are available onPaymentwall GitHub page.
Package: paymeuz
Introductionthis package helps to integratepayme.uzand your application is built ondjango.InstallationUse the package managerpipto install.pipinstallrequests
pipinstalldjangorestframework
pipinstallpaymeuzUsage# settings.pyINSTALLED_APPS=[...'paymeuz','rest_framework',...]PAYME_SETTINGS={'DEBUG':True,#True - test, False - production'ID':'','SECRET_KEY':'','ACCOUNTS':{'KEY_1':'order_id','KEY_2':'',}}# urls.pyurlpatterns=[...path('api/payme/',include('paymeuz.urls'))]Get startedpythonmanage.pymigrate
pythonmanage.pyrunserverDocumentationpayme.uzdocsdjango-rest-frameworkdocs