Saravanan666/pypi-org huggingface dataset:
Package: krakenohlcvt
krakenohlcvtA python package to handle Kraken exchange historial OHLCVT data without needing to unzip the Kraken_OHLCVT.zip file.InstallationpipinstallkrakenohlcvtorpotryaddkrakenohlcvtUsagefromkrakenohlcvtimportKrakenDataHandler# Enter path to the Kraken zip file:importosDATA_PATH=os.path.expanduser("~/Downloads/Kraken_OHLCVT.zip")# or simpler:DATA_PATH="path/to/Kraken_OHLCVT.zip"# load itkd=KrakenDataHandler(DATA_PATH)# you can inspect which symbols it contains:kd.list_symbols()# when searching for a specific symbol, search with either "starts_with=" or "contains="kd.list_symbols(starts_with="ETH")# then get the timeframe from the specific symboldf=kd.load_symbol_data("ETHUSDT","15m")# if timeframe not in ["1m", "15m", "1h", "1d"], then the '1m' data gets loaded and the timeframe# inferred from the 1m data!# save a timeframe of a specific symbol as df pickle:kd.save_to_df_pickle(symbol="ETHUSDT",timeframe="15m",outpath=os.path.expanduser("~/projects/python/LotusBot/src/backtester/ETHUSDT_15m.csv"),dropna_rows=True)# convert unix time in the index to human-readable datetime object[kd.unix_to_datetime(x)forxindf.index]# very slow! a lot faster:kd.unix_to_datetime(df.index)# also possible[datetime.datetime.fromtimestamp(x)forxindf.index]
Package: krakenplot
krakenplotAnalysis and plotting library for base substitution spectra and signatures.❯pipinstallkrakenplotFeatures that may be implemented include:Bar plot or scatter plot integration showing the magnitude of sequences assigned to each node in the phylogenetic tree.Method forforcingall counts either up or down a linear branch to simplify sequence classification.Clade collapsing based on taxonomic assignment and phylogenetic order.Read the documentation at:krakenplot.readthedocs.io>>>fromkrakenplotimportKrakenSummary>>>summary=KrakenSummary('sample-report.txt')>>>summary.newick'(((Mus musculus musculus:1):1,(Rattus norvegicus albus:1):1,Homo sapiens:1),unclassified:1);'>>>canvas,coords=summary.toytree.draw(>>>width=500,>>>height=175,>>>tip_labels_color=['red','black','black','black'],>>># Make Carl Linnaeus proud and italicize those species names!>>>tip_labels=[f'<i>{l}</i>'forlinsummary.toytree.get_tip_labels()])
Package: krakenpy
krakenpykrakenpy is a python integration for kraken API. This package is usingkrakenexunderneath, becausekrakenexonly provides two methodsquery_privateandquery_publicand it's really hard to guess the request params. Therefore, I have introduced PythonTypinganddataclassesto readability.Installationpip install krakenpyorpoetry add krakenpyUsagefrom krakenpy import Kraken, KrakenError

if __name__ == "__main__":
    kraken = Kraken(
        api_key="KRAKEN_API_KEY",
        api_secret="KRAKEN_API_SECRET",
    )

    # Returns the User's account balance.
    try:
        print(kraken.get_balance())
    except KrakenError as e:
        print(e)AuthorsSheikh Haris Zahid
Package: kraken-pyds
.. image::https://img.shields.io/pypi/v/kraken-pyds:target:https://pypi.org/project/kraken-pyds.. image::https://img.shields.io/pypi/pyversions/kraken-pyds:target:https://pypi.org/project/kraken-pyds.. image::https://img.shields.io/travis/com/yassineazzouz/kraken:target:https://travis-ci.com/yassineazzouz/kraken.. image::https://img.shields.io/codecov/c/github/yassineazzouz/kraken:target:https://codecov.io/gh/yassineazzouz/krakenKrakenKraken is a distributed, fast, and reliable data transfer service for efficiently moving large amounts of data between different storage technologies. It uses a distributed master worker architecture, to allow very fast data transfer speed and horizontal scaling, while implementing multiple failover, recovery and data consistency checks mechanisms to ensure robustness, fault tolerance and reliability.Krakentypical use cases include but are not limited to :Data migration (across storage technologies)Data Replication.Backup and Disaster recovery.Data life cycle management.FeaturesDistributed data transfer service.Support multiple storage technologies.Easy to setup, configurable services.Command line interface to submit and monitor jobs.Support multiple scheduling algorithms and job priority.Support multiple jobs placement policies across workers.Install::pip install kraken-pyds
Package: kraken-re
kraken-re(Work in progress)Thekraken-reprovides a rule engine to describe the components of a project. These components are translated into
build tasks using various rules.The rule engine is strongly inspired byPants.ConceptsTargetsA Target is an addressable set of metadata. The metadata is comprised offields. Each field is of a particular type,
and no two fields can be of the same type (subclasses of another field type are accepted).FieldA Field is a strongly typed description of a piece of data, such as "PythonProjectSourceDirectory". A field may be a
subclass of another field, allowing it to be taken into consideration when a generic request of fields matching its
parent class is requested.RulesA rule describes how to translate a set of input types to an output type. Often, the inputs and output types will be
targets, but they can be arbitrary Python types. Every session begins with a set of initial objects that are usually
created by a script.Every object in the rule system must be immutable and hashable. If two rules produce the same result, the results
are merged.Example scriptdocker_grpc_rust_template(name="template")docker_image(dockerfile_target=":template",platforms=["linux/arm64","linux/amd64"])Example rules@ruledefget_dockerfile_resource_from_grpc_rust_template(request:DockerGrpcRustTemplateRequest)->DockerfileResource:...returnDockerfileResource(path_to_dockerfile)@ruledefget_docker_build_requests(image:DockerImageTarget)->DockerBuildRequests:...forplatforminimage[DockerPlatforms]:requests.append(...)returnDockerBuildRequests(requests)@ruledefbuild_docker(request:DockerBuildRequest)->DockerBuildResult:...returnDockerBuildResult(...)
Package: kraken-schema-org
kraken_schema_orgHow to usefrom kraken_schema_org import kraken_schema_org as kMost common methodsNormalize recordGiven a record, returns a fully normalized recordnormalized_record = k.get_normalized_record(record)ClassGet class / get schemaReturns schema.org schema for a given record_typeschema = k.get_class(record_type)
schema = k.get_schema(record_type)Get json schemaReturns json schema for a given record_typejson_schema = k.get_json_schema(record_type)Get summary keys (subset of most commonly used keys)Returns the most commonly used keys for a given record_typesummary_keys = k.get_summary_keys(record_type)Get sample dataReturns sample record for a given record_typesample_record = k.get_data(record_type)Property methodsGet normalized keynormalized_key = k.get_key(key)Get all keyskeys = k.get_keys(record_type)Get json-ld type for a keyjson_ld_type = k.key_get_jsonld_types(key)Get json type for a keyjson_type = k.key_get_json_types(key)Get python type for a keypython_type = k.key_get_python_types(key)Get html type for a keyhtml_type = k.key_get_html_type(key)Normalize value for a keynormalized_value = k.get_normalized_value(key, value)Get localized keylocalized_key = k.get_localized_key(key, 'EN-US')Convert keyReturns official key from given key (ex: last name -> familyName)normalized_key = k.convert_key(key)Get key definitiondefn = k.get_property_definition(key)RecordsGet record typerecord_type = k.get_record_type(record)Get record idrecord_id = k.get_record_id(record)Get record namerecord_name = k.get_record_name(record)Get normalized recordnormalized_record = k.get_normalized_record(record)Get summary recordsummary_record = k.get_summary_record(record)Get localized recordlocalized_record = k.get_localized_record(record, 'EN-US')Legacy functionsFMethods provided to ensure backward compatibility. Avoid usingNormalize @typerecord_type = 'person'
normalized_type = k.normalize_type(record_type)Normalize key/attributekey = 'givenname'
normalized_key = k.normalize_key(key)Normalize value or recordrecord = {"@type": "schema:WebPage", "schema:url": "https://www.test.com"}
normalized_record = k.normalize_record(record)
normalized_value = k.normalize_value(record_type: str, key: str, value: xx, strict: bool)Get keys/attributes for a given @typerecord_type = 'person'
keys = k.get_keys(record_type)Get Datatypes for a given keyrecord_type = 'schema:Person'
key = 'schema:givenName'
datatypes = k.get_datatype(record_type, key)Normalize typenormalized_record_type = k.normalize_type(record_type)
Package: kraken-spot
Kraken SpotA Python library for interacting with theKraken Spot REST API.Quick StartInstall from source of viapippip install kraken-spotfromkraken_spotimportDefaultClientclient=DefaultClient()client.get_account_balance()The default client will attempt to configure the client with api keys from environment variables. BothKRAKEN_API_KEYandKRAKEN_PRIVATE_KEYneeds to be set.OTP AuthenticationIf the API key has 2FA enabled, you will need to provide a one time password with your call.client.set_otp(123456)client.get_account_balance()The OTP is reset after each request.FeaturesThe following endpoints are currently supported;Endpoint SetSupportedMarket Data✅User Data✅User Trading✅ (except batch orders)User Funding✅User staking✅Websocket Authentication✅
Package: kraken-std
kraken-stdThe Kraken standard library.DevelopmentIntegration testingIntegration tests are located insrc/tests/integration. The following tools need to be available to run the
integration tests:Cargo (to test Cargo building and publishing)The Cargo integration tests run against Artifactory and Cloudsmith
and requires credentials to temporarily create a new Cargo repository (available in CI).Docker (used to setup services that we run integration tests against)Helm (to test Helm packaging and publishing)Poetry (to test Python publishing and installing)Slap(to test Python publishing and installing)Test a single integration testPYTEST_FLAGS="--log-cli-level DEBUG -s -k <test_filter>" kraken run pytestIntegration -vThe integration tests create temporary files that need to be mounted into a Docker container. If you are running
the integration tests in a Coder workspace, you may need to setTMPDIR=$HOME/tmpas the workspaces often only
share the home volume with the Docker-in-Docker container.Pull RequestsBy default, Pull Requests require a changelog entry to be added via theslap changelog addcommand. If no changelog
entry was added, CI will fail. Some changes are not relevant to consumers of the API that they do not need to be
recorded in the changelog, such as typos in the README. In such cases, theno changeloglabel can be added to the
Pull Request.
Package: kraken-thing
kraken datatypeOverviewLibrary to extract, validate and normalize datatypes.datatypes:emailurldatecountryaddresstelephoneboolcurrencydomaingithubhttps://github.com/tactik8/krakcn_class_thing_v4pypihttps://pypi.org/project/kraken-thing/classes:Thing: representation of a schema.org thingThings: a collection of ThingObservation: Data points making up a thingHow to use:Basicsfrom kraken_thing.kraken_class_thing.kraken_class_thing import Thing
from kraken_thing import Thing

t = Thing()
t.url = 'https://www.test.com'
print(t.url)

print(t.record)MetadataMetadata can be provided in json record using @metadata{ 
    "@type": "person",
    "@id": "abc123",
    "name": "Bob Smith",
    "@metadata": {
        "measuredPropertyContext": "",
        "language": "EN",
        "observationCredibility": 0.5,
        "observationDate": "2023-03-01",
        "validFrom": "2023-03-01",
        "validThrough": "",
        "observationAbout": "",
        "source": {
                    "@type": "WebAPI",
                    "url": "https://someapi.com",
                    "name": "data scraper"
                    },
        "instrument": "",
        "agent": ""
    }
}HTMLthing.html.xxx return html formats of the thingprint(thing.html.doc) for full listrecord() : returns dict with enhanced values (link, etc)full() : Returns a 2 column table with key / valuescard() : returns a cardmedia() : returns the media (video or pic)video() : returns videoimage() : returns imagelink () : returns link with internal valuerecord_ref(): returns link with record_refUsing api# Set url for the api (only has to do it once)
t = Thing()
t.set_api_url('https://api_url.com')

# Save record tp api
t = Thing('test', 'abc1234')
t.url = 'https://www.test.com'
t.api_post()


# Load record from api
t.api_get()

print(t)AttributesMethods
Package: kraken-wsclient-py
Kraken WebSockets Client in PythonSample Kraken WebSockets client in Python.  This client was created for
demonstration purposes only.  It is neither maintained nor supported.Installationpip install kraken-wsclient-pySample Usagefrom kraken_wsclient_py import kraken_wsclient_py as client

def my_handler(message):
    # Here you can do stuff with the messages
    print(message)

my_client = client.WssClient()
my_client.start()

# Sample public-data subscription:

my_client.subscribe_public(
    subscription = {
        'name': 'trade'
    },
    pair = ['XBT/USD', 'XRP/USD'],
    callback = my_handler
)

# Sample private-data subscription:

my_client.subscribe_private(
    subscription = {
        'name': 'openOrders',
        'token': '__WS_TOKEN_HERE__'
    },
    callback = my_handler
)

# Sample order-entry call:

my_client.request(
    request = {
        'token': '__WS_TOKEN_HERE__',
        'event': 'addOrder',
        'type': 'buy',
        'ordertype': 'limit',
        'pair': 'XBT/USD',
        'price': '9000',
        'volume': '0.01',
        'userref': '666'
    },
    callback = my_handler
)CompatibilityThis code has been tested on Python 3.7.ContributingPull requests are not monitored and likely will be ignored.
Package: kraken-wsclient-v2
Kraken WebSockets Client v2 in PythonSample Kraken WebSockets client in Python.  This client was created for
demonstration purposes only.  It is neither maintained nor supported.Installationpip install kraken-wsclient-v2Sample Usageimport time

from kraken_wsclient_v2 import kraken_wsclient_v2 as client

def my_handler(message):
    # Here you can do stuff with the messages
    print(message)

my_websockets_token = ''

my_client = client.WssClient()
my_client.start()

# Sample public-data subscription:

my_client.subscribe_public(
    # Insert params and req_id as described in the docs
    params = {
        'channel': 'ticker',
        'snapshot': True,
        'symbol': ['BTC/USD', 'XRP/USD'],
    },
    req_id = 1234567890,
    callback = my_handler
)

time.sleep(3)

# Sample private-data subscription:

my_client.subscribe_private(
    # Insert params and req_id as described in the docs
    params = {
        'channel': 'executions',
        'snapshot': True,
        'snapshot_trades': True,
        'order_status': True,
        'ratecounter': True,
        'token': my_websockets_token
    },
    req_id = 1234567891,
    callback = my_handler
)CompatibilityThis code has been tested on Python 3.7.ContributingPull requests are not monitored and likely will be ignored.
Package: krakipy
KrakipyKrakipy is an easy to use Kraken API.
It uses theREST-APIof theKraken.comcryptocurrency exchange.For more information please visit thekrakipy documentation29.10.2023 - Updated krakipy to include new functions and fixed bugs
31.07.2021 - Updated krakipy to support staking and unstakingFeaturesAll methods of the Kraken Rest API are included (Krakipy documentation also updated)Easy and fast to useTwo factor authentification support (static and OTP)Tor supportInstallationUse the package managerpipto install krakipy.pipinstallkrakipyUsage ExamplesPublic RequestsPublic requests dont need API keys.fromkrakipyimportKrakenAPI# Create a sessionkr=KrakenAPI()# Get Ticker for Bitcoin/EURkr.get_ticker_information("XXBTZEUR")# Get OHLC for Doge/Tetherkr.get_ohlc_data("XDGUSDT")# Get Spreads for Ether/USDkr.get_recent_spreads("XETHZUSD")# Check the Kraken API system statuskr.get_system_status()Private RequestsPrivate requests need a valid API key pair to your Kraken account for validation.fromkrakipyimportKrakenAPIapi_key="*************************************************"api_key_secret="*************************************************"# Create a validated sessionkr=KrakenAPI(api_key,api_key_secret)# Create a Limit order to buy 1.5 Bitcoin under 100,000.0 EUR/BTCkr.add_standard_order("XXBTZEUR","buy","limit",volume=1.5,price=100000.0)->{'descr':{'order':'buy 1.50000000 XBTEUR @ limit 100000.0'},'txid':['OHPCQQ-HRJTQ-ZBDGSE']}# Check your account balancekr.get_account_balance()# Withdraw 1.0 Bitcoin to myBTCWalletkr.withdraw("XBT","myBTCWallet",1.0)# Unstake 300.0 Polkadotkr.unstake_asset("DOT",300.0)# Download and save an export report to kraken_reports/kr.retrieve_export_report(report_id,dir="kraken_reports/")LicenseThe krakipy code is licensed under the MIT LICENSE.
This program comes with ABSOLUTELY NO WARRANTYKrakipy Copyright (C) 2020-2023  Hubertus Wilisch
Package: kraky
KrakyPython client for Kraken API REST and Kraken Websockets API using httpx and websockets.
Supports both sync and async for API REST.DisclaimerThis software is for educational purposes only. Do not risk money which you are afraid to lose. USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS.Always start by running a trading bot in Dry-run and do not engage money before you understand how it works and what profit/loss you should expect.We strongly recommend you to have coding and Python knowledge. Do not hesitate to read the source code and understand the mechanism of this library.Installationpip install krakyDocshttps://kraky.readthedocs.io/en/latest/UsageCLIKraky provides a CLI that matches the API function names and args.You can use it like the following:krakyget_ohlc_datapair=XBTUSDinterval=240You can replace get_ohlc_data by any kraky API function and pair=XBTUSD or interval=240 by any function argument.
Please respect the format key=value.It also supports .env files so you can also create a .env file with your api_key and secret and kraky will pick them up.Example:KRAKEN_API_KEY=""KRAKEN_SECRET=""Sync REST APIfromkrakyimportKrakyApiClientdefget_web_sockets_token():kraken_api_key=""kraken_secret=""kraky_api_client=KrakyApiClient(api_key=kraken_api_key,secret=kraken_secret)ws_token=kraky_api_client.get_web_sockets_token()returnws_tokenget_web_sockets_token()Async REST APIfromkrakyimportKrakyApiAsyncClientasyncdefget_web_sockets_token():kraken_api_key=""kraken_secret=""kraky_api_client=KrakyApiAsyncClient(api_key=kraken_api_key,secret=kraken_secret)ws_token=awaitkraky_api_client.get_web_sockets_token()returnws_tokenasyncio.run(get_web_sockets_token)WebsocketimportasynciofromkrakyimportKrakyApiAsyncClient,KrakyWsClientasyncdefget_web_sockets_token():kraken_api_key=""kraken_secret=""kraky_api_client=KrakyApiAsyncClient(api_key=kraken_api_key,secret=kraken_secret)ws_token=awaitkraky_api_client.get_web_sockets_token()returnws_tokenasyncdefpublic_handler(response):print(response)asyncdefprivate_handler(response):print(response)asyncdefmain():interval=30ws_pairs=["XBT/USD","ETH/USD"]ws_token=awaitget_web_sockets_token()kraky_public_ws_client=KrakyWsClient("production")kraky_private_ws_client=KrakyWsClient("production-auth")asyncio.create_task(kraky_public_ws_client.connect(public_handler,connection_name="public"))asyncio.create_task(kraky_private_ws_client.connect(private_handler,connection_name="private"))awaitkraky_public_ws_client.subscribe({"name":"ohlc","interval":interval},ws_pairs,connection_name="public",)awaitkraky_private_ws_client.subscribe({"interval":interval,"token":ws_token,"name":"openOrders",},connection_name="private",)if__name__=="__main__":loop=asyncio.get_event_loop()loop.create_task(main())loop.run_forever()CompatibilityPython 3.8 and aboveLicenceMIT License
Package: krange
Krange PackageThis package contains a component that followsthiskata, which contains the following operations:intergerContainsRange: Checks whether a range contains certain elements of a set.containsRange: Checks whether a range is contained in another range.getAllPoints: Gets all the points in a specified range.endPoints: Gets the endpoints, or limits, in a range.overlapsRange: Checks whether a part of the range is inside another range.Equals: Checks whether two ranges are the same.The purpose of this package is to fix some of the issues that the range class has in Python. Please refer to the LICENSE file in order to check the permissions of this package.ChangelogVersion 1.0Launched the package.Version 1.1Fixed bugs with negative numbers and input strings.
Package: krangpower
KrangpowerDistribution System Simulator based onOpenDSSandOpenDSSDirect.py. Modern Syntax, DataFrames, Pint, Networkx.Design goalsProviding an even easier and more intuitive frontendIntroducing measurement units through the packagepint, allowing the user to worry less about errors, to delegate the burden of conversion and to correctly interpret the results without recurring to the OpenDSS docsReturning results in interoperable data structures and containersEnabling advanced analysis modes, for example:Exporting the network topology in anetworkxgraphSolving duty cycles that involve smart components that need to update themselves every n stepsProviding a I/O facility based on zip packages and JSON files, allowing easier bookkeping and search and procedural generation of circuits with custom toolsAnd many more!DocumentationThe documentation for krangpower is availablehere.Python versionKrangpower is a python 3.x package; currently, compatibility with python 2.x is not sought after.AcknowledgementsThe authors would like to thank the Swiss Federal Office of Energy (SFOE) and the Swiss Competence Center for Energy Research - Future Swiss Electrical Infrastructure (SCCER-FURIES), for their financial and technical support to this research work.
Package: krapplet
KrappletKrapplet is a graphical password manager for Linux.
Its name derives from 'keyring applet'.Feature overviewGraphical password manager.Passwords are considered secrets, contained in keys, organized per keyring.Keys also can also contain associated information like username, email
addresses, and/or a website URL.Contains a password generator.Technical overviewWritten in Python3, using the GTK3 toolkit.Keys are stored using:gnome-keyring, orGPG-encrypted in a format compatibe with thepasscommand line password manager.DocumentationThe documentation of krapplet Can be found onreadthedocs.io.LicenseKrapplet is licensed under aBSD-3 license.FeedbackIf something is not working properly then please log anissueagainst the project.