https://github.com/thevenuz/barch.py
An asynchronous wrapper for the fanmade Blue Archive API.
https://github.com/thevenuz/barch.py
bluearchive python wrapper
Last synced: 10 months ago
JSON representation
An asynchronous wrapper for the fanmade Blue Archive API.
- Host: GitHub
- URL: https://github.com/thevenuz/barch.py
- Owner: thevenuz
- License: mit
- Created: 2023-08-22T05:55:34.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-08T02:22:32.000Z (over 2 years ago)
- Last Synced: 2025-02-03T04:26:27.851Z (12 months ago)
- Topics: bluearchive, python, wrapper
- Language: Python
- Homepage: https://thevenuz.github.io/barch.py/
- Size: 641 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
barch.py
## What is this?
An asynchronous wrapper for the fanmade [Blue Archive API](https://github.com/torikushiii/BlueArchiveAPI).
## Why and what's the use?
Idk.... built it coz I don't have anything better to do.
## Installation
Python version 3.10 or greater is required to use barch.py.
```sh
pip install barch-py
```
## Features
- Get all the characters - EN and JP version
- Get a character details by id or name - EN and JP version
- Get characters based on different parameters like position, role etc
- Get current, ongoing and upcoming raids - EN and JP versions
## Usage
- Example of getting all the characters - EN and JP versions
```Python
from barch import Client
client = Client()
characters_result = await client.character.get_all_characters()
characters_result_jp = await client.character.get_all_characters_jp()
if characters_result.is_success:
characters = characters_result.value
if characters_result.is_error:
error = characters_result.error
if characters_result_jp.is_success:
characters_jp = characters_result_jp.value
if characters_result_jp.is_error:
error_jp = characters_result_jp.error
await client.close()
```
- Example of getting raid details - EN and JP versions
```python
from barch import Client
client = Client()
raids_result = await client.raid.get_raids()
raids_result_jp = await client.raid.get_raids_jp()
if raids_result.is_success:
raids = raids_result.value
if raids_result.is_error:
error = raids_result.error
if raids_result_jp.is_success:
raids_jp = raids_result_jp.value
if raids_result_jp.is_error:
error_jp = raids_result_jp.error
await client.close()
```
## License
barch.py is licensed under [MIT License](https://github.com/thevenuz/barch.py/blob/master/LICENSE).