squaremap-api
A simple python library that allows interfacing with squaremap.
Examples
Tiles API
import squaremapapi
squaremapinstance = squaremapapi.SquareMapInstance("https://map.earthmc.net/")
world = squaremapinstance.tiles.getworld("minecraft_overworld")
zoomlevel = world.getzoomlevel(0)
tile = zoomlevel.gettile(0, 0)
open("output.png", "wb").write(tile)
This script outputs a image of the tile 0_0.png at zoom level 0 on the earthmc map.
Player Tracking
import squaremapapi
squaremapinstance = squaremapapi.SquareMapInstance("https://map.earthmc.net/")
coordinates = squaremapinstance.players.findplayer("cautionarytale08")
print(coordinates)
This script outputs the coordinates of the player cautionarytale08. If the player is not online or is not visible on the map the findplayer() function will output None. If the player is visible on the map then it returns a dictionary with uuid, name, coordinates and yaw. Here is an example function output:
{'world': 'minecraft_overworld', 'name': 'cautionarytale08', 'x': 50961, 'y': 69, 'z': 11272, 'display_name': 'cautionarytale08', 'uuid': '36b4f689cac04a11a52b9c4da432e3bc', 'yaw': -160}
Source code
This source code for this library is available on github at: https://github.com/cautionarytale09/squaremap-api.
PyPi package
This project is hosted on PyPi and can be installed with pip install squaremapapi. https://pypi.org/project/squaremapapi/
Metadata
Release files for squaremapapi 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| squaremapapi-1.1.1.tar.gz | 2.4 kB | Without provenance | Details for squaremapapi-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| squaremapapi-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for squaremapapi-1.1.1-py3-none-any.whl |
Total release size: 6.2 kB
Release files / squaremapapi-1.1.1.tar.gz
| Download URL | squaremapapi-1.1.1.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d9e7e586dee54292375c32cb4fe3e54ef94ec2d281f11250428f4fed8b3e494
|
|
BLAKE2b-256 checksum How to use checksums |
65a02096ba416503c3ecc7f99f674ea5264fd66b4780c698d1bf465ace92bef6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / squaremapapi-1.1.1-py3-none-any.whl
| Download URL | squaremapapi-1.1.1-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4d2881c3c4998f9cad32992f161bca1f71ca6ae3be683369f2e8a7bfe9a8053
|
|
BLAKE2b-256 checksum How to use checksums |
8d84ff7f2068e55b3ff90b0d2c4a04a738d89805436251137bc09942d46e8c59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for squaremapapi 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.