Skip to main content

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 endpoint
  • post - Make a POST request to an endpoint
  • put - Make a PUT request to an endpoint
  • delete - 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blapi-0.1.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blapi-0.1.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

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

Hashes for blapi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 51d53db14459929efc4928d7fbc05ac5a9040dbad503095117d13dd9ee51a460
MD5 5fef442ce8cca3376e944c5a3784acea
BLAKE2b-256 7650f23bebc6092926d88e1fdf608cddcd3317effef0ba2e8280b93fd79d22c5

See more details on using hashes here.

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

Hashes for blapi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 406b369570bfc858e0e8d9ed7ddafa455e7c1087e9d2864933729c7a86b79865
MD5 4fe5b75d8a866734f37bcb6fb6680a6f
BLAKE2b-256 6489515f88a5c084a6676da6f86e9f7cd24b979d938e3b2d7ff5f62dde0ff79a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page