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.
pip install BLAPIOr install from source:
pip install .from bloret_api_tool 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")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.jsonget- 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
--base-url- Base URL for the API (default: https://api.bloret.com)--token- Authorization token for API requests--output,-o- Output file (default: stdout)
To install the package in development mode:
pip install -e .To run tests:
pytestMIT