PyBoostyAPI is a powerful asynchronous Python library for seamless interaction with the Boosty.to API
Project description
🚀 PyBoostyAPI
PyBoostyAPI is a powerful asynchronous Python library for seamless interaction with Boosty.to through its internal API. It supports posts, subscribers, dialogs, sales, donations, and detailed statistics.
PyPi page https://pypi.org/project/PyBoostyApi/
✨ Features
- 🔐 Authentication with token auto-refresh
- 📬 User dialog handling
- 📊 Fetching statistics and sales data
- 💬 Get free and paid subscribers
- 📝 Create and delete posts
- 💰 Get donation and subscription tier info
⚙️ Installation
pip install PyBoostyApi
Or manually:
git clone https://github.com/HOCKI1/py_boosty_api.git
cd py_boosty_api
pip install .
🔧 Basic Usage Example
import asyncio
from boosty_api import BoostyAPI
async def main():
api = await BoostyAPI.create("auth.json")
try:
href = await api.get_blog_href()
print("🔗 Blog href:", href)
stats = await api.get_blog_stats() # Get stats of your Blog
print("📊 Stats:", stats)
finally:
await api.close()
if __name__ == "__main__":
asyncio.run(main())
🗂 auth.json Structure
{
"access_token": "your_token",
"refresh_token": "your_refresh_token",
"expiresAt": 1722193100,
"isEmptyUser": "0",
"redirectAppId": "web",
"_clientId": "your_uuid"
}
To get this data:
- Copy script below to Tampermonkey
// ==UserScript==
// @name Boosty Auth Extractor
// @namespace https://boosty.to/
// @version 2.1
// @description Экспорт полного auth.json
// @author HOCKI1
// @match https://boosty.to/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
function createExportButton() {
if (document.getElementById("export-auth-btn")) return;
const btn = document.createElement("button");
btn.id = "export-auth-btn";
btn.textContent = "📦 Сохранить auth.json";
btn.style.position = "fixed";
btn.style.bottom = "20px";
btn.style.right = "20px";
btn.style.zIndex = "9999";
btn.style.padding = "10px 14px";
btn.style.backgroundColor = "#ff7f00";
btn.style.color = "#fff";
btn.style.border = "none";
btn.style.borderRadius = "8px";
btn.style.cursor = "pointer";
btn.style.fontSize = "14px";
btn.style.boxShadow = "0 4px 8px rgba(0, 0, 0, 0.2)";
btn.onclick = () => {
try {
const authRaw = localStorage.getItem("auth");
const clientId = localStorage.getItem("_clientId");
if (!authRaw) {
alert("❌ Не найден ключ 'auth' в localStorage");
return;
}
if (!clientId) {
alert("❌ Не найден ключ '_clientId' в localStorage");
return;
}
const auth = JSON.parse(authRaw);
// Гарантируем наличие нужных полей
auth["_clientId"] = clientId;
if (!auth.hasOwnProperty("isEmptyUser")) {
auth["isEmptyUser"] = "0";
}
if (!auth.hasOwnProperty("redirectAppId")) {
auth["redirectAppId"] = "web";
}
const blob = new Blob([JSON.stringify(auth, null, 2)], { type: "application/json" });
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = "auth.json";
link.click();
} catch (e) {
alert("❌ Ошибка при экспорте auth.json: " + e.message);
console.error(e);
}
};
document.body.appendChild(btn);
}
const interval = setInterval(() => {
if (document.body) {
clearInterval(interval);
createExportButton();
}
}, 500);
})();
- Login to Boosty
- Press button "Сохранить auth.json" in bottom right corner
- Profit!
📌 TODO
- Posts
- Subscribers
- Dialogs
- Donations
- Sales
- Auto token refresh
- Media content (albums, images)
- More common usable functions
📄 License
This project is licensed under the MIT License. See LICENSE for details.
🤝 Contact
Author: HOCKI1 Email: hocki1.official@yandex.ru Made with ❤️ for the Boosty creator community.
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 pyboostyapi-1.0.6.tar.gz.
File metadata
- Download URL: pyboostyapi-1.0.6.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4f34c3c71bc30fa0b33417c84c6204201bd90f1f9c9f3189a212867ceff9952
|
|
| MD5 |
92e768241f9bad8714ab72422612fbd9
|
|
| BLAKE2b-256 |
75a581ec8f57c135b2bcd67039a388848b11b166d5c5e384a30a7c715e432b49
|
File details
Details for the file pyboostyapi-1.0.6-py3-none-any.whl.
File metadata
- Download URL: pyboostyapi-1.0.6-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fe407def0fb657ed3906c380353e4263195b5d598e68d855d5b141c20c0b0cf
|
|
| MD5 |
3c5af6974d82721981c74157f2eb65f3
|
|
| BLAKE2b-256 |
a8432ed85931f0c18d9ee2252c10e63b4d4fb50d49f57be70409b53cc7014a1b
|