Skip to main content

A BlueMap Wrapper to get data from a BlueMap Map

Project description

bluemap logo BlueMapWrapper

Discord Link Buy Me a Coffee at ko-fi.com

An open-sourced API wrapper for BlueMap for Python!!

This wrapper is used for getting information from existing Blue Maps, NOT to create one.

Installation

Windows

pip install bluemap_wrapper

Linux

python -m pip install bluemap_wrapper

Quick Example

import asyncio
from BlueMapWrapper import AsyncClient, KEYS


async def main():
  # printing out all players and lands plugin markers

  # Setting up Async Client, AsyncClient Object
  client = AsyncClient(base_url='http://map.eldrath.com:20098')

  # Fetching player and marker Collection from map, Collection Object
  collection = await client.fetch_collection('world')

  for player in collection.player_collection:  # Iterate through all players
    print(f"Player: {player.name}\nPosition: {player.position}")

  # Getting MarkerCollection Object from Collection
  marker_collection = collection.marker_collection

  # Getting Marker for Lands Plugin   
  lands = marker_collection.from_key(KEYS.LANDS)

  for marker in lands:  # Iterate though markers in lands
    print(f"Name: {marker.label}\nPosition: {marker.position}")

  await client.close()  # Close client after use


if __name__ == '__main__':
  asyncio.run(main())

Documentation Contents

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

bluemapwrapper-1.0.4.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

bluemapwrapper-1.0.4-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file bluemapwrapper-1.0.4.tar.gz.

File metadata

  • Download URL: bluemapwrapper-1.0.4.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for bluemapwrapper-1.0.4.tar.gz
Algorithm Hash digest
SHA256 eeeafbc372860302e40860a4d15081b9075f776600713cc24851fd02e1d867ef
MD5 80f0e6324506edc50c827da7644d1033
BLAKE2b-256 b05b0c1975e90f1e4e1987528e30a202af6772e166f7787909d808bbcc769966

See more details on using hashes here.

File details

Details for the file bluemapwrapper-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: bluemapwrapper-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for bluemapwrapper-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 80844fe8ed1e94c80b55b443a326d7e04ce3feba769244a12fbca844b831a939
MD5 f5926a14ae14d0e452438800e2ba0179
BLAKE2b-256 ee8de71b7bd94fac3a0a733623d42f407c70fb775207417fa0a7bdde26d6ddca

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