pybanana


Namepybanana JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/robinxoxo/pybanana
SummaryA Python wrapper for the GameBanana API
upload_time2025-08-30 04:47:36
maintainerNone
docs_urlNone
authorrobin
requires_python>=3.10
licenseNone
keywords gamebanana api wrapper async mods gaming
VCS
bugtrack_url
requirements aiohttp pytest pytest-asyncio
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🍌 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

```python
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
```bash
pip install pybanana
```

## Documentation
For detailed documentation and examples, check out:
- [Getting Started](docs/getting_started.md)
- [API Reference](docs/api_reference.md)
- [Models Reference](docs/models.md)

## Requirements

### Runtime Dependencies
- Python 3.7+
- `requests` >= 2.25.0
- `python-dateutil` >= 2.8.2

### Development Dependencies
- `pytest` >= 8.0.0
- `requests-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:

```python
# 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:
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments
- Thanks to GameBanana for providing the API
- All contributors who help improve this library

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/robinxoxo/pybanana",
    "name": "pybanana",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "gamebanana api wrapper async mods gaming",
    "author": "robin",
    "author_email": "xrobinsong@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/45/4b/86dd3e781e5e22ec0f5d3903b4ff60c072ace77dfffe9bf835d0c666827c/pybanana-0.5.0.tar.gz",
    "platform": null,
    "description": "# \ud83c\udf4c PyBanana\r\nA 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.\r\n\r\n> **Note**: This library is currently a Work in Progress (WIP). Features and APIs may change.\r\n\r\n## Features\r\n- \ud83d\udd0d **Comprehensive API Coverage**\r\n  - Search for mods across GameBanana\r\n  - Fetch detailed mod information\r\n  - Access user profiles and statistics\r\n  - Get game information and categories\r\n  - Browse mod sections and categories\r\n- \ud83d\udee0 **Developer-Friendly**\r\n  - Full type hints support with Optional return types\r\n  - Intuitive object-oriented models\r\n  - Robust error handling with graceful failure (returns None)\r\n  - Well-documented API methods\r\n- \ud83d\ude80 **Easy to Use**\r\n  - Simple and clean API\r\n  - Pythonic interface\r\n  - Extensive examples provided\r\n\r\n## Quick Start\r\n\r\n```python\r\nfrom pybanana.api import PyBanana\r\nfrom pybanana.enums import ModelType\r\n\r\n# Initialize the client\r\napi = PyBanana()\r\n\r\n# Get a member's profile\r\nmember = api.get_member(1382)  # Tom's ID\r\nif member:\r\n    print(f\"Name: {member.name}\")\r\n    print(f\"Online: {member.is_online}\")\r\n\r\n# Search for mods\r\nresults = api.search(\"sound effects\", ModelType.MOD)\r\nif results:\r\n    for mod in results.records:\r\n        print(f\"Mod: {mod.name} - {mod.description}\")\r\n```\r\n\r\n## Installation\r\n```bash\r\npip install pybanana\r\n```\r\n\r\n## Documentation\r\nFor detailed documentation and examples, check out:\r\n- [Getting Started](docs/getting_started.md)\r\n- [API Reference](docs/api_reference.md)\r\n- [Models Reference](docs/models.md)\r\n\r\n## Requirements\r\n\r\n### Runtime Dependencies\r\n- Python 3.7+\r\n- `requests` >= 2.25.0\r\n- `python-dateutil` >= 2.8.2\r\n\r\n### Development Dependencies\r\n- `pytest` >= 8.0.0\r\n- `requests-mock` >= 1.11.0\r\n\r\n## Error Handling\r\nAll 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:\r\n\r\n```python\r\n# Safe API usage with None check\r\nmod = api.get_mod_profile(12345)\r\nif mod:\r\n    print(f\"Found mod: {mod.name}\")\r\nelse:\r\n    print(\"Mod not found or API error occurred\")\r\n```\r\n\r\n## Contributing\r\nContributions are welcome! Here's how you can help:\r\n1. Fork the repository\r\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\r\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\r\n4. Push to the branch (`git push origin feature/amazing-feature`)\r\n5. Open a Pull Request\r\n\r\n## License\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Acknowledgments\r\n- Thanks to GameBanana for providing the API\r\n- All contributors who help improve this library\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python wrapper for the GameBanana API",
    "version": "0.5.0",
    "project_urls": {
        "Homepage": "https://github.com/robinxoxo/pybanana"
    },
    "split_keywords": [
        "gamebanana",
        "api",
        "wrapper",
        "async",
        "mods",
        "gaming"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d82dd719f52bf0f08eba7006f5255282c4da7e6daf215e309569aef4b356efc7",
                "md5": "0c5887e91b9eb064c4d25b9883abd4da",
                "sha256": "0e0e57230b3fcb461cd4395cc641e1fb7a46a181bed185b6f0fc9646d728767a"
            },
            "downloads": -1,
            "filename": "pybanana-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0c5887e91b9eb064c4d25b9883abd4da",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 31006,
            "upload_time": "2025-08-30T04:47:35",
            "upload_time_iso_8601": "2025-08-30T04:47:35.018474Z",
            "url": "https://files.pythonhosted.org/packages/d8/2d/d719f52bf0f08eba7006f5255282c4da7e6daf215e309569aef4b356efc7/pybanana-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "454b86dd3e781e5e22ec0f5d3903b4ff60c072ace77dfffe9bf835d0c666827c",
                "md5": "44f27ba2dc22f7d46657c8c33a76ad47",
                "sha256": "46e2c4079c4021911c4a61c5b0af53625b2ced33802b0399e360f71a1ef8d161"
            },
            "downloads": -1,
            "filename": "pybanana-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "44f27ba2dc22f7d46657c8c33a76ad47",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 31577,
            "upload_time": "2025-08-30T04:47:36",
            "upload_time_iso_8601": "2025-08-30T04:47:36.209406Z",
            "url": "https://files.pythonhosted.org/packages/45/4b/86dd3e781e5e22ec0f5d3903b4ff60c072ace77dfffe9bf835d0c666827c/pybanana-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-30 04:47:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "robinxoxo",
    "github_project": "pybanana",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "aiohttp",
            "specs": [
                [
                    "==",
                    "3.12.15"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "8.4.1"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    "==",
                    "1.1.0"
                ]
            ]
        }
    ],
    "lcname": "pybanana"
}
        
Elapsed time: 3.76896s