Skip to main content

Python library to interact with switcheo APIs

Project description

Switcheo Decentralized Exchange

License: MIT CircleCI Coverage Documentation Status

pyswitcheo is a simple python client to interact with Switcheo Decentralized Exchange

Current Alpha Version

0.1.1

Installation

pip

$ pip install pyswitcheo

Getting Started

Client example

import json
from http import HTTPStatus
from pyswitcheo.api import SwitcheoApi

if __name__ == '__main__':
    client = SwitcheoApi(base_url="https://test-api.switcheo.network")

    resp = client.list_contracts()
    if resp.status_code == HTTPStatus.OK:
        print(json.loads(resp.text.encode("UTF-8")))

More examples are located at examples

Development Installation

  • This project uses pipenv for python environment management.

  • Download/Install pipenv like this pip install --user pipenv

  • Clone the project.

  • Inside the project directory run pipenv install.

  • This will create a python virtualenv which can be activated using pipenv shell.

  • Now install the application in editable mode and you are ready to start development

    $ pip install -e .

Test

To run the tests:

make test

Documentation theme is highly inspired by Aiohttp.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyswitcheo-0.1.1.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

pyswitcheo-0.1.1-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

Details for the file pyswitcheo-0.1.1.tar.gz.

File metadata

  • Download URL: pyswitcheo-0.1.1.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for pyswitcheo-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3f7468d114b90c9ecdf389bf864ae6150d3ccaafa65b6940f6297e67c298b65e
MD5 52028eca4bdab72d49a77e68c193595c
BLAKE2b-256 d181fd9133355afce8c795f3d270d7f0a0a765df0d32db3af5fd0305bde309f0

See more details on using hashes here.

File details

Details for the file pyswitcheo-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyswitcheo-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for pyswitcheo-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f470f5680964b07442fb58e22f10bef782522f7a6bf63b2f32e336e7d16924b0
MD5 9183ad955c4c957fb409b03886fe7a42
BLAKE2b-256 d31227f731dbc68d82946af417e391457918d0838831bbc423f5f587f5f1b0a9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page