No project description provided
Project description
barch.py
What is this?
An asynchronous wrapper for the fanmade Blue Archive API.
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.
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
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
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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
barch_py-0.1.0.tar.gz
(10.0 kB
view details)
Built Distribution
barch_py-0.1.0-py3-none-any.whl
(15.1 kB
view details)
File details
Details for the file barch_py-0.1.0.tar.gz
.
File metadata
- Download URL: barch_py-0.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.0 Linux/5.15.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fa9e2df746a9ab824cf9e7c152894d2ac3c01ab7c5c0586581221006d104870 |
|
MD5 | fa5ade14ba0b514c656ced005dcf6989 |
|
BLAKE2b-256 | 4cc666238260f8f1bc5ab9abae64bad991c7b31bd3b0095430f1b70d7f369d6b |
File details
Details for the file barch_py-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: barch_py-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.0 Linux/5.15.0-1041-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3016a44a031bf8a165b38489500bfd3282e609c85086e3ba38a6977ddca212ff |
|
MD5 | f9fb09d9be3f24be26a2b3826a6647c4 |
|
BLAKE2b-256 | e52009f5ecc789e131144b1c3743ea32cd892c7bbbbcc72f46ba6b571f5151ac |