Skip to main content

Unofficial SDK for BUX Zero API.

Project description

Bux

Python SDK for BUX Zero (getbux.com).

Features:

  • 100% type safe.
  • Multiple network libraries supported.
  • Both sync and async APIs.
  • Open-world assumption, changes in API won't break the library.

Supported networking libraries:

Disclaimer

  • This is an unofficial library! I'm not affiliated with BUX B.V., don't work there, don't know anyone who works there. BUX B.V. is not responsible for any bugs in this library and does not provide technical support for the library usage or development.
  • This is an OSS distributed under MIT License. I don't provide warranty nor technical support for the project. I'm not responsible for any bugs or issues you may encounter. See LICENSE.
  • The library uses public API, in a sense that it is publicly available and all you need to get access to it is an account (which you own, thanks to GDPR). However, this API is not documented and can be broken by BUX B.V. at any moment.
  • Keep in mind that BUX Client Agreement forbids placing orders in other way than the official mobile app: "You can only provide Orders to BUX through a mobile application". However, it doesn't say anything about other API endpoints, like getting historical data. Hence all endpoints, except those that place orders, are legal.
  • So, use it at your own risk! If you found a bug, you're the only one who can fix it. Please, when you fix something, contribute it back, the project is open for contributions.

Getting started

Installation

Install bux and the networking library you want to use. If you don't know which one you need, just use requests.

python3 -m pip install bux requests

Getting token

To make requests to the API, you need to get token. The library provides a CLI command specifically for this:

python3 -m bux get-token

Keep this token in secret! This is all you need to get full access to the API.

Usage

import bux

api = bux.UserAPI(token=your_token)

me = api.me().requests()

Every API endpoint is represented as a method of UserAPI. Every such method returns a bux.Request method which provides a method for every supported networking library (requests, httpx, and so on). Just call this method and you get the result. The result is represented as bux.Response object which is just a dict with some additional type-safe properties.

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

bux-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

bux-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file bux-0.1.0.tar.gz.

File metadata

  • Download URL: bux-0.1.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for bux-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e83995a327643979436dd7d7a439d15b22976a1ff5d898c6697bd91ab39584d1
MD5 9b202d1b76b32ec6219e66750c219870
BLAKE2b-256 71c70f19c386f39d93bf96567a6df1b097951b3ac5b02754434a449390ed8b78

See more details on using hashes here.

File details

Details for the file bux-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bux-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for bux-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8d82338eddd7959fb811e4af936de993b5ce26cfebc6c195b6a0fe19e34ae9a
MD5 4130edc18baeba608d10f26434d494c1
BLAKE2b-256 aeed6231fb32befb56483c8e73ba8a0c0b84cf07cbb28a35f4833b755b199d8c

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