Skip to main content

Bux

Python SDK and CLI 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.

CLI Usage

Show available commands:

python3 -m bux --help

Every command requires --token argument. It's up to you how you store it. For example, in a file:

echo "MY_TOKEN" > .token
python3.9 -m bux info --token $(cat .token) NL0011540547

SDK 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.

See the source code for CLI commands (bux/_commands) for the real-world usage examples.

Release files for bux 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bux 0.2.0
File Size Uploaded
bux-0.2.0.tar.gz 22.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bux 0.2.0
File Interpreter ABI Platform
bux-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 53.6 kB

Release files / bux-0.2.0.tar.gz

Download URL bux-0.2.0.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5084dceea027122b58aaf6b25ae834bc0f4a6debb2afd4821ffaf1cd951e21ab
BLAKE2b-256 checksum
How to use checksums
b713816e513fad8a72bce4c3598448701cf8243cfa4dc6083a327c464b6e6b3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release files / bux-0.2.0-py3-none-any.whl

Download URL bux-0.2.0-py3-none-any.whl
Size 31.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f70effd21f05073e661108296630ca33e74d44005d1e1799e67e0cc55511b11
BLAKE2b-256 checksum
How to use checksums
6d4a395aa07e6b895a2d16cd4e3ff250b8677e0280e3645908012b071ee51d2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page