A friendly Python wrapper for the BOOXDrop API — unofficial, but built with care.
Project description
📖 pyBooxDrop
📚 Great if you want to manage files on your BOOX device programmatically, automate uploads/downloads, or plug it into your own tools and scripts.
✨ Features
- Clean and consistent API client for BOOXDrop
- Fully typed (with
pydantic) and 100% modern Python 3.12+ - No external HTTP dependency — bring your own client, if you will
- HTTP client agnostic – plug in your own via simple
HttpClientinterface - Open-source, MIT-licensed, built with readability in mind
Supported endpoints
POST /api/1/users/sendVerifyCode
POST /api/1/users/signupByPhoneOrEmail
📦 Installation
pip install pybooxdrop
🚀 Quick start
from boox import Boox
# Given it is the very first connection, and no token is available:
with Boox(base_url="https://eur.boox.com") as client:
payload = {"mobi": "foo@bar.com"}
_ = client.users.send_verification_code(payload=payload)
# OR, if you don't want to use the context manager
client = Boox(base_url="https://eur.boox.com")
payload = {"mobi": "foo@bar.com"}
_ = client.users.send_verification_code(payload=payload)
client.close()
🔌 Custom HTTP client support
Boox lets you plug in your own HTTP client.
To do this, implement a simple HttpClient protocol with the required methods and pass your adapter to Boox.
Example
import httpx
from boox import Boox, HttpClient
class MyAdapter(HttpClient):
def post(self, url: str, json: dict | None = None) -> Any:
# your logic using requests, httpx, or anything else
...
with Boox(client=MyAdapter(httpx.Client())) as boox: ...
Why? This gives you full control over things like:
- ⏰ timeouts
- ♻️ retries
- 🧾 logging
- 🌍 proxies or custom headers
- 🔐 session/cookie handling
By design, Boox does not depend on any specific HTTP library. It only uses Python’s built-in
urllibby default — you're free to userequests,httpx, or your own logic.
🧪 Testing
Running unit tests
# to run all but e2e tests do the following:
uv sync
uv run pytest
Alternatively, use:
make test
Running E2E tests
Please note that since the E2E tests are heavy, require real internet connection, and they connect with the real BOOXDrop server, it is not recommended to run them often.
# required environment variables:
# E2E_SMTP_EMAIL - the e-mail address on smtp.dev
# E2E_SMTP_X_API_KEY - the X-API-KEY for the account
# E2E_TARGET_DOMAIN - the target BOOXDrop domain, e.g. push.boox.com
uv sync
uv run pytest -m e2e --e2e
Alternatively, use:
make e2e
E2E_SMTP_EMAILmust lead to an e-mail that is connected to a real Boox account. It must be verified prior to the tests.E2E_TARGET_DOMAINis the domain that the Boox account is used with. AFAIK it can be any Boox' domain, because the account is not bound to any in particular. This might change in the future though, so I would rather play safe there.X-API-KEYfor SMTP.dev is required, as this is the client that is being used. Currently there are no plans to support other providers.
📮 Feedback
Got ideas, feedback, or feature requests? Feel free to open an issue or pull request!
👷 Contributing
Contributions are welcome!
- Please fork the repository and create a branch for your feature or bugfix.
- Use pytest to run tests and add new tests when applicable.
- Follow the existing code style, checked by ruff, bandit and pyupgrade.
- Open a pull request with a clear description of your changes.
🫶 Special thanks
Big thanks to hrw for the project onyx-send2boox. The project was the main inspiration behind this library. While pyBooxDrop is a fresh, focused take on just the API, this project wouldn’t exist without this awesome groundwork.
Thanks for the great job!
🪪 License
MIT – use it, hack it, ship it.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybooxdrop-0.2.3.tar.gz.
File metadata
- Download URL: pybooxdrop-0.2.3.tar.gz
- Upload date:
- Size: 33.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
622e04b8667868ada8a254ea824d042d56f0f8882db4c27e6259d25674bf3c6a
|
|
| MD5 |
876a9768a3ac1543c81fd61dfd926db5
|
|
| BLAKE2b-256 |
e39b042249f794fd7ff9dd758f3f5f36b96fef31ac02a9168f29405b709ebe66
|
File details
Details for the file pybooxdrop-0.2.3-py3-none-any.whl.
File metadata
- Download URL: pybooxdrop-0.2.3-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a76608bdcbe16d8603068d50a09234b803bad2646c77c448ab09548a3c11bca
|
|
| MD5 |
50735e8450f0d2d7fc654ec7eb3bc8e9
|
|
| BLAKE2b-256 |
407d1f7366c0c5c96de7521b4269faa274bcfeee522c987a680015538449dbe8
|