Saravanan666/pypi-org huggingface dataset:
Package: btbpython
Welcome to btbpugbtbpug is a feature rich way to interact with theBytesToBits APIGetting startedA guide on how to get btbpug up and runningInstallingTo install btbpug from PyPI usepython3 -m pip install -U discord.pyUsageNow that you have installed btbpug, lets start writing some code to see what we can do with itLets start simple by just returning a wordimport btbpug as btb
  print(btb.word())
  #citificationsGreat, that all worked! For information on what you can do with this library look though the rest of the documentations. For more examples of using this library check outExamples, you can also vist the rest of thedocumentation
Package: btc-com
btc-comA python 3 api wrapper for btc.com block explorerdocs:https://github.com/pasquantonio/btc.com-api-wrapper/blob/master/docs.mdapi docs:https://btc.com/api-docblock explorer:https://btc.com/blockInstallto doUsageto doExamplesexamples.py shows multiple examples of calling functionshttps://github.com/pasquantonio/btc.com-api-wrapper/blob/master/examples.py
Package: btc-fake-formset
Fake Formset designed to display data of one form field (separated by characters) as a set of fields.
Adding / editing / deleting field’s data parts also is possible.Detailed documentation is in the “docs” directory.Quick startAdd “fake_formset” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'fake_formset',
)Add static files css/js:<link type="text/css" rel="stylesheet" href="{% static 'fake_formset/css/fake_formset.css' %}">
<script src="{% static 'fake_formset/js/fake_formset.js' %}"></script>Setup form field, wrap field into following containers:<div class="fake-formset-field-group-container js-fake-formset_field_group_container">
    <div class="fake-formset-field_wrapper js-fake_formset_field_wrapper">
        {{ form.my_field }}
    </div>
</div>In form setup field like this:'my_field': forms.TextInput(attrs={
    'data-fake-formset-id': 'my_field',      - unique identifier
    'data-fake-formset-max-fields': 3,       - fake field max number
    'data-fake-formset-split-symbol': '-/'   - split symbol for storing value in database (1-/2-/3-/), "," by default.
})Setup js-handler:const fake_formset = new FakeFormset();
fake_formset.add_button_text = 'Add row';
fake_formset.delete_button_text = 'Remove';
fake_formset.initSignals();

$(document).on('fake-formset:fake-field:added', function (event, fake_field, field, formset_id) {
    if (formset_id === 'my_field') {
        fake_field.mask('+7 (999) 999-99-99');  - here you can bind other handlers.
    }
})
$(document).on('fake-formset:fake-field:deleted', function (event, base_field) {
    // callback on field delete.
})
$(document).on('fake-formset:target-field:recalculated', function (event, field) {
    // callback after base hidden field recalculating.
})Example:
Package: btc-floating-windows
Floating windows for use as pop-ups, modal or separate sources of information
in a user graphical interface.Detailed documentation is in the “docs” directory.Quick startAdd “floating_windows” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'floating_windows',
)Add static files css/js:<link type="text/css" rel="stylesheet" href="{% static 'floating_windows/css/windows.css' %}">
<script src="{% static 'floating_windows/js/windows.js' %}"></script>Create and add window(s) template(s) to the base template:<!-- Separate template "sign_in_modal.html" -->
{% extends 'floating_windows/windows/default.html' %}

{% block body_content %}
    <!-- window body -->
{% endblock %}

<!-- In base template -->
{% include 'blocks/floating_windows/sign_in_modal.html' with fw_id='auth' %}You can load windows content dynamically through ajax, in this case, you need to add basic window
template that will be used by the script to copy and create new windows:<!-- In base template -->
{% include 'floating_windows/windows/default.html' %}Initialize windows script. For several windows with background on same page, which can display in same time,
you must specifyfloatingWindowZIndexattribute for background and window correct display:const fw = new FloatingWindows();
fw.config = {
    'fw-1': {
        'floatingWindowTitle': 'Title-1',
        'floatingWindowPosition': '125px,unset,unset,230px',
        'floatingWindowHideOnOutsideClick': true,             popup
        'floatingWindowShowFooter': false,
        'floatingWindowSetBackground': 'body',                background parent container (bcg of popups is ignoring)
        'floatingWindowZIndex': '200',                        set this attr to set windows hierarchy
        'floatingWindowSetToUrl': true,                       automatic window opening on page reload by
                                                              get-parameter in address-bar
        'floatingWindowPushToHistory': true                   add window open/close events to browser history
    },
    ...
}
// etc. see code for thin setup
fw.initWindows();

$(document).on('floating-window:opened', function (event, window, trigger) {
    // tracking of signals about the opening of windows for loading content in them.
    // configure content load here
});Setup trigger in template:<button type="button" data-floating-window-open="fw-1">
    Trigger
</button>Example:
Package: btchip-python
Python communication library for Ledger Hardware Wallet productsRequirementsThis API is available on pip - install with pip install btchip-pythonBuilding on a Unix platform requires libusb-1.0-0-dev and libudev-dev installed previouslyInterim Debian packages have also been built by Richard Ulrich athttps://launchpad.net/~richi-paraeasy/+archive/ubuntu/bitcoin/(btchip-python, hidapi and python-hidapi)For optional BIP 39 support during dongle setup, also installhttps://github.com/trezor/python-mnemonic- also available as a Debian package at the previous link (python-mnemonic)Building on WindowsDownload and install the latest Python 2.7 version fromhttps://www.python.org/downloads/windows/Install Microsoft Visual C++ Compiler for Python 2.7 fromhttp://www.microsoft.com/en-us/download/details.aspx?id=44266Download and install PyQt4 for Python 2.7 fromhttps://www.riverbankcomputing.com/software/pyqt/downloadInstall the btchip library (open a command prompt and enter c:python27scriptspip install btchip)Building/Installing on FreeBSDOn FreeBSD you can install the packages:pkg install security/py-btchip-pythonor build via ports:cd /usr/ports/security/py-btchip-python
make install clean
Package: btchip-python-syscoin
Python communication library for Ledger Hardware Wallet productsRequirementsThis API is available on pip - install with pip install btchip-python-syscoinBuilding on a Unix platform requires libusb-1.0-0-dev and libudev-dev installed previouslyInterim Debian packages have also been built by Richard Ulrich athttps://launchpad.net/~richi-paraeasy/+archive/ubuntu/bitcoin/(btchip-python-syscoin, hidapi and python-hidapi)For optional BIP 39 support during dongle setup, also installhttps://github.com/trezor/python-mnemonic- also available as a Debian package at the previous link (python-mnemonic)Building on WindowsDownload and install the latest Python 2.7 version fromhttps://www.python.org/downloads/windows/Install Microsoft Visual C++ Compiler for Python 2.7 fromhttp://www.microsoft.com/en-us/download/details.aspx?id=44266Download and install PyQt4 for Python 2.7 fromhttps://www.riverbankcomputing.com/software/pyqt/downloadInstall the btchip library (open a command prompt and enter c:python27scriptspip install btchip)Building/Installing on FreeBSDOn FreeBSD you can install the packages:pkg install security/py-btchip-python-syscoinor build via ports:cd /usr/ports/security/py-btchip-python-syscoin
make install clean
Package: btchip-qtum
Python communication library for Ledger Hardware Wallet productsRequirementsThis API is available on pip - install with pip install btchip-qtumBuilding on a Unix platform requires libusb-1.0-0-dev and libudev-dev installed previouslyInterim Debian packages have also been built by Richard Ulrich athttps://launchpad.net/~richi-paraeasy/+archive/ubuntu/bitcoin/(btchip-python, hidapi and python-hidapi)For optional BIP 39 support during dongle setup, also installhttps://github.com/trezor/python-mnemonic- also available as a Debian package at the previous link (python-mnemonic)Building on WindowsDownload and install the latest Python 2.7 version fromhttps://www.python.org/downloads/windows/Install Microsoft Visual C++ Compiler for Python 2.7 fromhttp://www.microsoft.com/en-us/download/details.aspx?id=44266Download and install PyQt4 for Python 2.7 fromhttps://www.riverbankcomputing.com/software/pyqt/downloadInstall the btchip library (open a command prompt and enter c:python27scriptspip install btchip)
Package: btc-lib
btc-lib: Simple Bitcoin Library.This library is a simple python cold wallet management library for the Bitcoin network. It allows you to generate private/public keys, get Bitcoin addresses from them, create transactions, deserialize already created ones, sign them, sign messages, create multi-signatures and multi-addresses using Bitcoin Script. But its most important difference from most similar libraries is support for Segwit (bech32 encoding) addresses and transactions with them. You can get address using PublicKey.get_address, or create it from your own hash.Examples:>>>frombtclibimportPrivateKey,Address,Transaction,Output,get_inputs>>>>>>my_wif='cMtnJjkY8hBrNdNN1kPBCMuTM5h4rxes9nrfRfktTn8tW6HW2pC2'>>>my_pv=PrivateKey(my_wif)>>>my_pub=my_pv.pub>>>>>>my_pub.get_address('P2PKH').string'12Nj1W9U7xvzbRFsMErK8hsm7pYGZv9jsT'>>>>>>my_pub.get_address('P2SH-P2WPKH').string'39YgiFhV8U5rWiUQLh5sDeGJvaft81k1sV'>>>>>>my_pub.get_address('P2WPKH').string'bc1qpuf7m9ysjtnxhpfvx80v6lptsk33lm2x3t9s5w'>>>>>>my_pub.get_address('P2WSH').string'bc1qxmh2drh6xsqyr5m4c8f72fwmqskmgk0rdqtggn6leswzf6m4kxvqhehfwy'>>>>>>>>>addr=my_pub.get_address('P2WSH','testnet')>>>addr.string'tb1qxmh2drh6xsqyr5m4c8f72fwmqskmgk0rdqtggn6leswzf6m4kxvqq3px5t'>>>>>># To see address info:>>>addr.get_info()# request to one of the blockchain APIsAddressINF(received=100000,sent=0,tx_count=1,balance=100000)>>>>>># To get unspents (UTXO):>>>addr.get_unspents()[Unspent(tx_id='748131e63a0c27a407316cdafb7cad20ec0994c856862d63e50e706073bc7f00',out_index=0,amount=100000)]>>>>>># To get inputs (itself converts unspent to input)>>>inps=get_inputs([my_pv,addr])# Input contains a private key to be able to sign yourself in a transaction>>>>>>out=Output(Address('tb1q7n075vj7tz4jm28zky7dzknuxujzl5vt6pxkz4'),90000)>>>>>>tx=Transaction(inps,[out])>>>tx.default_sign_inputs()# will be used: inp.default_sign() for inp in tx.inputs>>>>>># Notice: inp.default_sign (tx) will try to sign itself in the tx transaction (set the desired inp.script / inp.witness value),>>># if inp.address was obtained using PublicKey.get_address, it will succeed, but if the address hash was generated by your custom algorithm,>>># and the address object itself was obtained using address.<P2PKH/P2SH/P2WPKH/P2WSH>.from_hash, maybe the signature algorithm will differ>>># from the algorithm in inp.default_sign, for this use inp.custom_sign(script=Script(...), witness=Script(...)).>>># To summarize: if the address was obtained with PublicKey.get_address(<some_type>, <some_network>), Input.default_sign will be able to sign it.>>># else, use inp.custom_sign with custom scripts.>>>>>>tx.serialize()'02000000000101007fbc7360700ee5632d8656c89409ec20ad7cfbda6c3107a4270c3ae63181740000000000ffffffff01905f010000000000160014f4dfea325e58ab2da8e2b13cd...'>>>tx.get_id()'fff79b6d9f6a4068d5b8298c522177e9783af70d61653d628314e155a1e0e94e'>>>tx.push()TrueThis transaction -https://www.blockchain.com/ru/btc-testnet/tx/fff79b6d9f6a4068d5b8298c522177e9783af70d61653d628314e155a1e0e94e.Installationbtc-lib is distributed onPyPIand is available on Linux/macOS
and Windows and supports Python 3.10+.$python3-mpipinstallbtc-lib
Package: btclib_libsecp256k1
btclib_libsecp256k1Browse GitHub Code RepositorySimple python bindings tolibsecp256k1(v0.2.0).
It is intended to be used with thebtcliblibrary.To install (and/or upgrade):python -m pip install --upgrade btclib_libsecp256k1Build, test, develop, and contributeDisclaimer: building and testing on Windows is not currently supported;
Windows support is achieved with cross compilationThe btclib_libsecp256k1 project includeslibsecp256k1as submodule in the secp256k1 folder.
By default, when cloning a project you get the directories that contain
submodules, but none of the files within them.
You must rungit submodule initto initialize
your local configuration file,
andgit submodule updateto fetch the submodule data
and check out the appropriate commit.$ git submodule init
Submodule 'secp256k1' (git@github.com:bitcoin-core/secp256k1.git) registered for path 'secp256k1'
$ git submodule update
Cloning into 'secp256k1'...The project useshatchas a project manager.Some additional tools are required to develop and test btclib_libsecp256k1;
they can be installed with:python -m pip install -U nox cibuildwheel pre-commitTo build:hatch build -t sdist
hatch build -t wheelDevelopers might also consider installing btclib_libsecp256k1 in editable way::python -m pip install --upgrade -e ./To test:hatch -e test run pytestTo measure the code coverage provided by tests:hatch -e test run pytest --cov-report term-missing:skip-covered --cov=btclib_libsecp256k1It is however recommended to use nox to better isolate testsnox -s testsTo format the codehatch -e dev run formatTo run re-commit hookshatch -e dev run pre_commitPlease run nox to check everything before a PRnox
Package: btcmd
Bookmarked Terminal Commands - btcmdAboutIf you need to type extensive commands on a daily basis, whether to connect to a server or to clean up unused container images, this tool is for you. You can mark your favorite commands and call them from a simple shortcut, all in the comfort of an installation via pip.RequirementsPythonInstallationOpen your terminal and typepip install btcmdAfter installing run:btcmd -hfor more details. It's very easy to use.How to useTo list all saved commands, type in terminal:btcmd -lTo save a command with an nickname, type in terminal:btcmd -s 'COMMAND_YOU_WANT_TO_SAVE' -n COMMAND_NICKNAMETo rename a command's nickname, type in terminal:btcmd -n 'COMMAND_YOU_WANT_TO_RENAME'To delete a saved command, type in terminal:btcmd -d COMMAND_NICKNAMETo run the command by the nickname, type in terminal:btcmd -r COMMAND_NICKNAMEor simplybtcmd COMMAND_NICKNAMETo see help details, type in terminal:btcmd -h
Package: btcnet_info
This is a bitcoin network information library.Currently it is the backend polling implementation for bitHopper although anyone may use. Note that it uses gevent.It has two main methods.The first one returns a list of pools.EX:import btcnet_infofor pool in btcnet_info.get_pools:print pool.nameprint pool.sharesIt also allows you to iterate over know coinsEX:import btcnet_infofor pool in btcnet_info.get_coins():print coin.nameprint coin.difficultyIf you don't like this you can also get difficulties and exchange rates directlyEX:import btcnet_infoprint btcnet_info.get_difficulty('btc')print btcnet_info.get_exchange('btc')
Package: btconfig
OverviewThis is a module for reading configuration files.Currently, the module only supports YAML-formatted files.Features:Retrieve deeply nested values using dot notation, e.g.section1.key1Retrieve values using wildcards, e.g.section1.*.key2Configuration files can be templated (Jinja)Prerequisites:Python 3.4+InstallationFrom pypi:pip3 install btconfigFrom this git repo:pip3 install git+https://github.com/berttejeda/bert.config.gitNote: To install a specific version of the library from this git repo,suffix the git URL in the above command with @{ tag name }, e.g.:git+https://github.com/berttejeda/bert.config.git@3.0.0Usage ExamplesLoad a configuration file and retrieve specified key valueGiven:Config file at/home/myuser/myconfig.yamlwith contents:section1:key1:value1key2:value2key3:value3frombtconfigimportConfig# Initialize App Configconfig=Config(config_file_uri='~/myconfig.yaml').read()value=config.get('section1.key')print(value)The above should returnvalue1Load a configuration file and retrieve a deeply nested valueGiven:Config file at/home/myuser/myconfig.yamlwith contents:section1:subsection1:item1:subitem1:value1item2:value2item3:value3subsection2:item1:value1item2:value2item3:value3key1:value1key2:value2key3:value3section2:item1:value1frombtconfigimportConfig# Initialize App Configconfig=Config(config_file_uri='~/myconfig.yaml').read()value=config.get('section1.subsection1.item2')print(value)The above should returnvalue2Load a configuration file and retrieve specified key value using wildcard notationGiven:Config file at/home/myuser/myconfig.yamlwith contents:section1:subsection1:item1:subitem1:value1item2:value2item3:value3subsection2:item1:value1item2:value2item3:value3key1:value1key2:value2key3:value3section2:item1:value1frombtconfigimportConfig# Initialize App Configconfig=Config(config_file_uri='~/myconfig.yaml').read()value=config.get('section1.*.item1')print(value)The above should return[{'subitem1': 'value1'}, 'value1']Note: When retrieving values via wildcard, the return value is a list object.Load a configuration file as a python objectSame as the above examples, just invoke the Config object
withas_object=True, as withconfig = Config('~/myconfig.yaml', as_object=True).read()In this case, retrieving values from the object can be done via dot-notation,
as with:print(config.section1.subsection1.item2), or viagetmethod, as withprint(settings.section1.subsection1.item2)Note: This approach does not support retrieving values via wildcard reference.
Package: btcpay-python-sdk
BTCPay Python SDKBTCPay had a Python SDK, but it was using the old legacy API, meaning the way to connect was outdated as well as the
API responses it was giving. This library uses the Greenfield API and will follow thedocumentationprovided by the BTCPay Server team.As of right now, this is a work in progress and will be updated to add more API callsInstallationYou don't need this source code unless you want to modify the package. If you just want to use the package, run the
command:pipinstallbtcpay-python-sdkInstall from source with:pythonsetup.pyinstallDependenciesPython 2.7+RequestsSetuptoolsUsageThe library needs to be configured with your stores api key, store id, and host url.To generate an API key, you need to log in to your BTCPay instance, click "Account" in the lower left corner, click
"Manage Account", click the "API Keys" tab, and then generate your key.importbtcpaybtcpay.api_key='API_KEY_HERE'# should use an env variablebtcpay.host_url='HOST_URL'btcpay.store_id='STORE_ID'# get all invoicesinvoices=btcpay.Invoices.get_invoices()print(invoices)
Package: btc-price
btc_pricePackage to get btc prize in an easy way.DOCSGet the bitcoin price in any currency:print(btcprice("USD"))See how many bitcoin you can get with a certain amount of a  currency:print(currency_to_btc(120.50, "USD"))See how much is a certain amount of bitcoin in a currency:print(btc_to_currency(0.2, "USD"))
Package: btcprompt
btcpromptCustomize your bash prompt, and show BTC price in the prompt.git clone to your localcdinto project, run the server end in the backgroundnohuppython3btcprompt.run>/dev/null2>&1&activate your prompt configsourcebtcprompt/activatedeactivate it if you wantdeactivateNote: query BTC price fromhttps://www.coingecko.com/en/coins/bitcoin, and set every 30 secs query once.
Package: btcrs
btcrsNeeded to use some existingbitcoin-ruststuff from python.For now, just wraps address validation and generation. Will add more as needed.>>>importbtcrs>>>btcrs.address.is_valid("hello")False>>>btcrs.address.is_valid("bc1pzwu7ucw9ra9pdcu6h522zcaunz95csa6fl80uq4mun2g27r8zfcqkvnm6w")True>>>some_address=btcrs.address.random()>>>some_address'bc1py0sspskhml0t5v6w09pz08wuzyv2fh8q66s0g9vgxdn9qdjdzyfqmj8hvd'>>>btcrs.address.is_valid(some_address)True>>>btcrs.address.is_valid(some_address,is_testnet=True)False
Package: btcs-crypto-systems
crypto systems package for BTCS crypto business systemsInstallpipinstallbtcs_crypto_systemsUpdatepipinstallbtcs_crypto_systems--upgradeUsageTokenMasterfrombtcs_crypto_systemsimporttoken_mastertm=token_master.TokenMaster(env="test")print(tm.assets[7].symbol)Utilsfrombtcs_crypto_systemsimportutilscsv_writer=utils.get_csv_writer(file_name="example_output_file",headers=["address","balance"])csv_writer.writerow(["0x8c8d7c46219d9205f056f28fee5950ad564d7465","1.001"])#creates a file called 20230217_0853_example_output_file.csvAMSfrombtcs_crypto_systemsimportaddress_manangement_serviceams=address_manangement_service.AMS(env="test")print(json.dumps(ams.get_addresses(is_deposit=True,include_balances=True,limit=10,tags=["siba"]),indent=2))Update the packageNavigate to the folder where the pyproject.toml file is.python3-mbuild
python3-mtwineupload--repositorypypidist/*username: __token__
password: get an API key from here https://pypi.org/manage/account/token/
Package: btc-sentiment-analysis
btc-sentiment-analysisSmall Python package for gathering news articles and performing basic bitcoin sentiment analysis.InstallationUse the package managerpipto install btc-sentiment-analysis.pipinstallbtc-sentiment-analysisUsageThis python package contains python scripts for gathering news articles on the topic "Bitcoin." An XML file provided by a Google news RSS Feed, is parsed for all published news articles on "Bitcoin." The urls of the published articles are visited and scraped for all usable content such as title, article, published date, etc.frombtc_sentiment_analysisimportscrape_btc_news,visualizearticles=scrape_btc_news()# returns a list of Article objectsvisualize(articles)# receives list of Article objects as an argument, displays simple seaborn violin plotThe function scrape_btc_news() crawls for BTC articles on the web, scrapes important information, and creates Article objects for each news Article.
Article objects contain attributes such as title, text, news source, publication date, and link. Article objects also contain two methods.
The vader_analysis method uses the Natural Language Toolkit (nltk) library to return the sentiment of the title and text of the article as a dict type.
The blob_analysis method uses the Text Blob (textblob) library to return the sentiment of the title and text of the article as a dict type.classArticle:def__init__(self,title,source,date,link,text):...defvader_analysis(self):...return{'title':title_sentiment,'text':text_sentiment}defblob_analysis(self):...return{'title':title_sentiment,'text':text_sentiment}The function visualize simply plots an example Violin Plot using seaborn. Visualize takes any list of Article objects and returns a seaborn violin plot
showing the distribution of the sentiment analysis for Article.title and Article.text using nltk's Vader, and Text Blob.LicenseMIT