This package allows interactions with the BuyCoins API.

Overview

BuyCoins Python Library

Build Status

The BuyCoins Python library allows interactions with the BuyCoins API from applications written in Python.

Documentation

You can view the documentation for the BuyCoins Python library here.

The official BuyCoins API documentation can be found on the BuyCoins developer portal.

Installation

This package can be installed from PyPi using the command:

pip install buycoins-python

Install from source:

python setup.py install

Requirements

  • Python 3.6+

Usage

The library depends on an authentication key to communicate, send requests and receive responses from the BuyCoins API.

Create a .env file and set your authentication key in the format below:

auth_key="public key:private key"

If you don't have a public and private key, follow the procedures on How to get access?.

Example usage of the library is:

from buycoins import Wallet

buycoins_user = Wallet()

# Print the account balances of each cryptocurrency the buycoins_user have.

print(buycoins_user.get_balances())

Handling Exceptions

The library comes built-in with exception handlers for unsuccessful requests. This is documented in the exceptions page.

Executing your own queries

In a situtation where you need to run a query different from what is provided in the library, create an instance of the BuyCoinsClient class and run your query:

from buycoins import BuyCoinsClient

# Write your query

query = """
  query queryName{
    query body
  }
"""

# Write your variables if any
variables = {
    "x": x,
    "y": y
}

# Execute your request

response = BuyCoinsClient()._execute_request(query=query, variables=variables)

# Print the response from the request sent

print(response)

Contributing

Check CONTRIBUTING.MD

Authors

License

See LICENCE.MD.

Comments
  • Build wallet class.

    Build wallet class.

    Create a wallet.py file in the buycoins folder that will have methods for:

    • Creating a receiving address for a cryptocurrency
    • Allowing the purchase of a cryptocurrency
    • Allowing the sale of a cryptocurrency.
    • Calculating the network fee for a currency's amount.

    Documenting the class is key. You should also create a custom wallet exception class in buycoins/exceptions/exceptions.py.

    Do you mind doing this today so we can wrap up basic functionalities and move on to testing and documentation?

    opened by Youngestdev 3
  • Add new changes to main.

    Add new changes to main.

    This PR contains the following changes:

    • Wallet class for handing buying, selling and wallet address creation.
    • Improved setup.py file
    • Version one of the README file.
    • Remove the mandatory use of auth_key in classes NGNT, P2P and Wallet.
    opened by Youngestdev 2
  • Development - Phase I

    Development - Phase I

    Big boss, @overrideveloper. I still have some pending work to do on how the response is displayed. However, I'll like to request a code review before merging this PR. Thanks!

    opened by Youngestdev 1
  • Test, minor changes

    Test, minor changes

    • Changed error codes after a review session from Ademola
    • Wrote tests for NGNT and P2P for a start
    • Added a .travis.yml to check builds
    • installed httpretty and updated requirements file.
    opened by Youngestdev 0
  • Major changes

    Major changes

    Ths PR contains:

    • A new Webhook class
    • Improved README
    • CONTRIBUTING guide
    • Updated P2P class
    • Package version bumped to 0.3.4

    My boss @gabbyprecious, do review and merge if worthy. Thx

    opened by Youngestdev 0
  • New Updates

    New Updates

    This PR contains a couple of changes:

    • Improved error reporting.
    • Better custom exception classes
    • Reduced noise in files
    • new utils file to house helper functions.
    opened by Youngestdev 0
  • Implemented wallet class for buying, selling, creating and retrieving…

    Implemented wallet class for buying, selling, creating and retrieving…

    … wallet address and also checking network fee

    Wallet Class:

    Creating a receiving address for a cryptocurrency Allowing the purchase of a cryptocurrency Allowing the sale of a cryptocurrency. Calculating the network fee for a currency's amount

    opened by gabbyprecious 0
  • Experimental dev

    Experimental dev

    I am quite inexperienced in this field so I am stuck on whether letting the dev have access to the query and variables been sent over. Here's what I mean:

    test = NGNT("auth_key")
    test.variables # I'm not sure this should be allowed.
    test.query # I'm not sure this should be allowed.
    

    I believe the only field that should be accessible is the accountName such that:

    test.accountName # It can be retrieved and used for testing purposes.
    

    Waiting for your review and feedback, boss @ajejoseph22.

    opened by Youngestdev 0
Owner
Abdulazeez Abdulazeez Adeshina
I work with Python ( FastAPI ) and JavaScript ( React ). I author technical content, occasionally.
Abdulazeez Abdulazeez Adeshina
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
Typed interactions with the GitHub API v3

PyGitHub PyGitHub is a Python library to access the GitHub API v3 and Github Enterprise API v3. This library enables you to manage GitHub resources su

null 5.7k Jan 6, 2023
A python package that allows you to place automated trades using the TD Ameritrade API.

Template Repo Table of Contents Overview Setup Usage Support These Projects Overview Setup Setup - Requirements Install:* For this particular project,

Alex Reed 4 Jan 25, 2022
One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind them.

AwesomeVersion One version package to rule them all, One version package to find them, One version package to bring them all, and in the darkness bind

Joakim Sørensen 39 Dec 31, 2022
Rock API is an API that allows you to view rocks and find the ratings on them

Rock API The best Rock API What is Rock API? Rock API is an API that allows you to view rocks and find the ratings on them. However, this isn't a regu

Conos 21 Sep 21, 2022
Useful tools for building interactions in Python

discord-interactions-python Types and helper functions for Discord Interactions webhooks. Installation Available via pypi: pip install discord-interac

Discord 77 Dec 7, 2022
📷 Instagram Bot - Tool for automated Instagram interactions

InstaPy Tooling that automates your social media interactions to “farm” Likes, Comments, and Followers on Instagram Implemented in Python using the Se

Tim Großmann 13.5k Dec 1, 2021
It is a temporary project to study discord interactions. You can set permissions conveniently when you invite a particular disk code bot.

Permission Bot 디스코드 내에 있는 message-components 를 연구하기 위하여 제작된 봇입니다. Setup /config/config_example.ini 파일을 /config/config.ini으로 변환합니다. config 파일의 기본 양식은 아

gunyu1019 4 Mar 7, 2022
Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and also everything you could possibly need for raids

Discord Panel Discord Panel is an AIO panel for Discord that aims to have all the needed tools related to user token interactions, as in nuking and al

null 11 Mar 30, 2022
Unit testing AWS interactions with pytest and moto. These examples demonstrate how to structure, setup, teardown, mock, and conduct unit testing. The source code is only intended to demonstrate unit testing.

Unit Testing Interactions with Amazon Web Services (AWS) Unit testing AWS interactions with pytest and moto. These examples demonstrate how to structu

AWS Samples 21 Nov 17, 2022
A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)

Articuno (discord-interactions) A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py) Get started If you wa

Blue 8 Dec 26, 2022
A discord http interactions framework built on top of Sanic

snowfin An async discord http interactions framework built on top of Sanic Installing for now just install the package through pip via github # Unix b

kaj 13 Dec 15, 2022
Boilerplate template for the discord-py-interactions library

discord-py-interactions_boilerplate Boilerplate template for the discord-py-interactions library Currently, this boilerplate supports discord-py-inter

Ventus 7 Dec 3, 2022
A secure and customizable bot for controlling cross-server announcements and interactions within Discord

DiscordBot A secure and customizable bot for controlling cross-server announcements and interactions within Discord. Within the code of the bot, you c

Jacob Dorfmeister 1 Jan 22, 2022
Python Package For MTN Zambia Momo API. This package can also be used by MTN momo in other countries.

MTN MoMo API Lite Python Client Power your apps with Lite-Python MTN MoMo API Usage Installation Add the latest version of the library to your project

Mathews Musukuma 7 Jan 1, 2023
Discord-disnake - This package allows to use disnake without changing the discord namespace

This package is a shim This module allows to use disnake using discord namespace. This is not an independent library. Installing Python 3.8 or higher

null 5 Dec 13, 2022
WhatSender is a python package that allows you to send Whatsapp messages at a given time.

WhatSender is a python package that allows you to send Whatsapp messages at a given time.

IdoBarel 0 Apr 21, 2022
This package accesses nitrotype's official api along with its unofficial user api

NitrotypePy This package accesses nitrotype's official api along with its unofficial user api. Currently still in development. Install To install, run

The Moon That Rises 2 Sep 4, 2022