A Python library for interacting with Bloret Launcher API
Project description
Bloret Launcher API Tool
A Python library for interacting with Bloret Launcher API. This library can be used both as a module that you can import in your Python applications and as a command-line tool using the BLAPI command.
Installation
pip install BLAPI
Or install from source:
pip install .
Usage
As a Library
from BLAPI import Client, request_api
# Using the Client class
client = Client(base_url="https://api.bloret.com", token="your-token")
response = client.request("GET", "/v1/games")
# Using the convenience function
response = request_api("GET", "/v1/games", token="your-token")
As a Command-Line Tool
After installation, you can use the BLAPI command:
# Make a GET request
BLAPI get /v1/games
# Make a POST request with data
BLAPI post /v1/games --data '{"name": "New Game"}'
# Specify a custom base URL and token
BLAPI --base-url https://api.bloret.com --token your-token get /v1/games
# Save output to a file
BLAPI get /v1/games --output games.json
Commands
get- Make a GET request to an endpointpost- Make a POST request to an endpointput- Make a PUT request to an endpointdelete- Make a DELETE request to an endpoint
Options
--base-url- Base URL for the API (default: https://api.bloret.com)--token- Authorization token for API requests--output,-o- Output file (default: stdout)
Development
To install the package in development mode:
pip install -e .
To run tests:
pytest
License
MIT
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
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 blapi-0.1.0.tar.gz.
File metadata
- Download URL: blapi-0.1.0.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51d53db14459929efc4928d7fbc05ac5a9040dbad503095117d13dd9ee51a460
|
|
| MD5 |
5fef442ce8cca3376e944c5a3784acea
|
|
| BLAKE2b-256 |
7650f23bebc6092926d88e1fdf608cddcd3317effef0ba2e8280b93fd79d22c5
|
File details
Details for the file blapi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: blapi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
406b369570bfc858e0e8d9ed7ddafa455e7c1087e9d2864933729c7a86b79865
|
|
| MD5 |
4fe5b75d8a866734f37bcb6fb6680a6f
|
|
| BLAKE2b-256 |
6489515f88a5c084a6676da6f86e9f7cd24b979d938e3b2d7ff5f62dde0ff79a
|