A Python wrapper for the GameBanana API
Project description
🍌 PyBanana
A powerful and intuitive Python client library for interacting with the GameBanana API. This library provides easy access to GameBanana's extensive modding platform, allowing you to search, retrieve, and interact with mods, users, games, and more.
Note: This library is currently a Work in Progress (WIP). Features and APIs may change.
Features
- 🔍 Comprehensive API Coverage
- Search for mods across GameBanana
- Fetch detailed mod information
- Access user profiles and statistics
- Get game information and categories
- Browse mod sections and categories
- 🛠 Developer-Friendly
- Full type hints support with Optional return types
- Intuitive object-oriented models
- Robust error handling with graceful failure (returns None)
- Well-documented API methods
- 🚀 Easy to Use
- Simple and clean API
- Pythonic interface
- Extensive examples provided
Quick Start
from pybanana.api import PyBanana
from pybanana.enums import ModelType
# Initialize the client
api = PyBanana()
# Get a member's profile
member = api.get_member(1382) # Tom's ID
if member:
print(f"Name: {member.name}")
print(f"Online: {member.is_online}")
# Search for mods
results = api.search("sound effects", ModelType.MOD)
if results:
for mod in results.records:
print(f"Mod: {mod.name} - {mod.description}")
Installation
pip install pybanana
Documentation
For detailed documentation and examples, check out:
Requirements
Runtime Dependencies
- Python 3.7+
requests>= 2.25.0python-dateutil>= 2.8.2
Development Dependencies
pytest>= 8.0.0requests-mock>= 1.11.0
Error Handling
All public API methods now return Optional types and include built-in error handling. When an API call fails, methods return None instead of raising exceptions, allowing for more resilient code:
# Safe API usage with None check
mod = api.get_mod_profile(12345)
if mod:
print(f"Found mod: {mod.name}")
else:
print("Mod not found or API error occurred")
Contributing
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Thanks to GameBanana for providing the API
- All contributors who help improve this library
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 pybanana-0.4.4.tar.gz.
File metadata
- Download URL: pybanana-0.4.4.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6690c0a08c33b11e334123a9859ca1262b129f265b7b2d043502c8adf55e98ea
|
|
| MD5 |
df30811e1300c8b5c8d3b64ea4cdcc58
|
|
| BLAKE2b-256 |
ed012089c0edb4c8dd2164980f48d6631faeebf98c50dba952f18f1f59393b90
|
File details
Details for the file pybanana-0.4.4-py3-none-any.whl.
File metadata
- Download URL: pybanana-0.4.4-py3-none-any.whl
- Upload date:
- Size: 31.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d01f6395aece2646bf500dfb32e612841978e32e8f3e61ed482a3a96a02e6150
|
|
| MD5 |
b5a4ecd3c3ff6966d2cf46da1bfe014e
|
|
| BLAKE2b-256 |
49f1361651fd43a7e32c7d201afb7d5842cda01d71dfdcb027c1870575618a9d
|