Package: privex-exchange
Python Crytocurrency Exchange all-in-one LibraryA small library for querying Cryptocurrency exchanges and other price sourcesOfficial Repo:https://github.com/privex/python-exchangeWARNING:Under constructionInformationThis Python Exchange library has been developed atPrivex Inc.by @someguy123 for
easily obtaining exchange rates between arbitrary coins, including ones which don't generally have pairs
on exchanges such asHIVE/LTCIt uses the following libraries:HTTPXfor async requests to exchangesAttrsfor nicer objects likeprivex.exchange.base.PriceDataPrivex's Helpers libraryfor various small functions used throughout the package.+===================================================+
|                 © 2020 Privex Inc.                |
|               https://www.privex.io               |
+===================================================+
|                                                   |
|        Python Exchange Library                    |
|        License: X11/MIT                           |
|                                                   |
|        Core Developer(s):                         |
|                                                   |
|          (+)  Chris (@someguy123) [Privex]        |
|                                                   |
+===================================================+

Python Exchange Library - A small library for querying Cryptocurrency exchanges and other price sources
Copyright (c) 2020    Privex Inc. ( https://www.privex.io )Quick Install / Usagepip3installprivex-exchangefromprivex.exchangeimportExchangeManagerexm=ExchangeManager()asyncdefmain():rate=awaitexm.get_pair('btc','usd')print(rate)# 6900.318tickers=awaitexm.get_tickers('btc','usd')print(tickers)# {'binance': Decimal('6679.70000000'),#  'bittrex': Decimal('6691.56500000'),#  'kraken': Decimal('6689.10000'),#  'coingecko': Decimal('6704.97999999')}For full parameter documentation, IDEs such as PyCharm and even Visual Studio Code should show our PyDoc
comments when you try to use the class.For PyCharm, press F1 with your keyboard cursor over the class to see full function documentation, including
return types, parameters, and general usage information. You can also press CMD-P with your cursor inside of
a method's brackets (including the constructor brackets) to see the parameters you can use.Alternatively, just view the files inside ofprivex/steemengine/- most methods and constructors
are adequately commented with PyDoc.DocumentationFull documentation for this project is available above (click the Read The Docs image), including:How to install the application and it's dependenciesHow to use the various functions and classesGeneral documentation of the modules and classes for contributorsTo build the documentation:gitclonehttps://github.com/Privex/python-exchangecdpython-exchange/docs
pip3install-rrequirements.txt# It's recommended to run make clean to ensure old HTML files are removed# `make html` generates the .html and static files in docs/build for productionmakeclean&&makehtml# After the files are built, you can live develop the docs using `make live`# then browse to http://127.0.0.1:8100/# If you have issues with content not showing up correctly, try make clean && make html# then run make live again.makeliveInstallWe recommend that you use at least Python 3.4+ due to the usage of parameter and return type hinting.Install from PyPi usingpipYou can install this package via pip:pip3installprivex-exchange(Alternative) Manual install from GitIf you don't want to PyPi (e.g. for development versions not on PyPi yet), you can install the
project directly from our Git repo.Unless you have a specific reason to manually install it, youshould install it using pip3 normallyas shown above.Option 1 - Use pip to install straight from Githubpip3installgit+https://github.com/Privex/python-exchangeOption 2 - Clone and install manually# Clone the repository from Githubgitclonehttps://github.com/Privex/python-exchangecdpython-exchange# RECOMMENDED MANUAL INSTALL METHOD# Use pip to install the source codepip3install.# ALTERNATIVE INSTALL METHOD# If you don't have pip, or have issues with installing using it, then you can use setuptools instead.python3setup.pyinstallLoggingBy default, this package will log anything >=WARNING to the console. You can override this by adjusting theprivex.exchangelogger instance.We recommend checking out our Python packagePython Loghelperwhich
makes it easy to manage your logging configuration, and copy it to other logging instances such as this one.# Without LogHelperimportloggingl=logging.getLogger('privex.exchange')l.setLevel(logging.ERROR)# With LogHelper (pip3 install privex-loghelper)fromprivex.loghelperimportLogHelper# Set up logging for **your entire app**. In this case, log only messages >=errorlh=LogHelper('myapp',handler_level=logging.ERROR)lh.add_file_handler('test.log')# Log messages to the file `test.log` in the current directorylh.copy_logger('privex.exchange')# Easily copy your logging settings to any other module loggerslog=lh.get_logger()# Grab your app's logging instance, or use logging.getLogger('myapp')log.error('Hello World')Unit TestsUnit tests are available intests/. We also have the project set up with [Travis CI](https://travis-ci.com/Privex/python-exchange)
to alert us when new releases cause the tests to break.To run the tests manually, use pytest:gitclonehttps://github.com/Privex/python-exchangecdpython-exchange
pipenvinstall--dev
pipenvshell

python3-mpytest-v-rxXs--log-cli-level=INFOtests/ContributingWe're very happy to accept pull requests, and work on any issues reported to us.Here's some important information:Reporting Issues:For bug reports, you should include the following information:Version ofprivex-exchange,httpx, and other libraries tested on - usepip3 freezeIf not installed via a PyPi release, git revision number that the issue was tested on -git log -n1Your python3 version -python3 -VYour operating system and OS version (e.g. Ubuntu 18.04, Debian 7)For feature requests / changesPlease avoid suggestions that require new dependencies. This tool is designed to be lightweight, not filled with
external dependencies.Clearly explain the feature/change that you would like to be addedExplain why the feature/change would be useful to us, or other users of the toolBe aware that features/changes that are complicated to add, or we simply find un-necessary for our use of the tool
may not be added (but we may accept PRs)Pull Requests:We'll happily accept PRs that only add code comments or README changesUse 4 spaces, not tabs when contributing to the codeYou can use features from Python 3.4+ (we run Python 3.7+ for our projects)Features that require a Python version that has not yet been released for the latest stable release
of Ubuntu Server LTS (at this time, Ubuntu 18.04 Bionic) will not be accepted.Clearly explain the purpose of your pull request in the title and descriptionWhat changes have you made?Why have you made these changes?Please make sure that code contributions are appropriately commented - we won't accept changes that involve
uncommented, highly terse one-liners.Legal Disclaimer for ContributionsNobody wants to read a long document filled with legal text, so we've summed up the important parts here.If you contribute content that you've created/own to projects that are created/owned by Privex, such as code or
documentation, then you might automatically grant us unrestricted usage of your content, regardless of the open source
license that applies to our project.If you don't want to grant us unlimited usage of your content, you should make sure to place your content
in a separate file, making sure that the license of your content is clearly displayed at the start of the file
(e.g. code comments), or inside of it's containing folder (e.g. a file named LICENSE).You should let us know in your pull request or issue that you've included files which are licensed
separately, so that we can make sure there's no license conflicts that might stop us being able
to accept your contribution.If you'd rather read the whole legal text, it should be included asprivex_contribution_agreement.txt.LicenseThis project is licensed under theX11 / MITlicense. See the fileLICENSEfor full details.Here's the important bits:You must include/display the license & copyright notice (LICENSE) if you modify/distribute/copy
some or all of this project.You can't use our name to promote / endorse your product without asking us for permission.
You can however, state that your product uses some/all of this project.Thanks for reading!If this project has helped you, considergrabbing a VPS or Dedicated Server from Privex-
prices start at as little as US$8/mo (we take cryptocurrency!)