Utility classes and methods for Wplace.live
Project description
wplace
Utility classes and methods for Wplace.live
Installation
wplace is available on pypi:
python3 -m pip install --upgrade wplace
Example
Basic usage example (can be found in examples/tile_image_url.py):
from wplace import Pixel
wplace_link = "https://wplace.live/?lat=52.53835814390717&lng=13.37545865302734"
pixel = Pixel.from_link(wplace_link)
print(f"Selected pixel: {pixel!r}.")
region = pixel.region
print(f"Lies within {region!r}. Coords within region: {pixel.region_pixel}.")
print(f"Navigate to region origin: {region.origin.link(select=True)}")
tile = pixel.tile
print(f"Lies within {tile!r}. Coords within tile: {pixel.tile_pixel}.")
print(f"Tile image URL: {tile.url}")
Output:
Selected pixel: Pixel(x=1100091, y=671480).
Lies within Region(x=275, y=167). Coords within region: (91, 3480).
Navigate to region origin: https://wplace.live/?lat=52.90885200790681&lng=13.359462890624988&select=0
Lies within Tile(x=1100, y=671). Coords within tile: (91, 480).
Tile image URL: https://backend.wplace.live/files/s0/tiles/1100/671.png
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
wplace-0.0.3.tar.gz
(13.2 kB
view details)
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
wplace-0.0.3-py3-none-any.whl
(13.4 kB
view details)
File details
Details for the file wplace-0.0.3.tar.gz.
File metadata
- Download URL: wplace-0.0.3.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce321d386bd2492b165089d7e61bcc2a3bed69d64d2a8323f911f1d6e93a627e
|
|
| MD5 |
182be5764bb4d0ee62d3dd4264f39c6d
|
|
| BLAKE2b-256 |
547c335870aa740358ba9415a2314704646d5e9b210e6d440d75658a80ca399f
|
File details
Details for the file wplace-0.0.3-py3-none-any.whl.
File metadata
- Download URL: wplace-0.0.3-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a299b54350c038c1c49dd2c5e3a787c67ac0e375c33d05c7b91d156bdd08ece8
|
|
| MD5 |
287fe8ef7bcf9b519ffdd307aa9e2fa3
|
|
| BLAKE2b-256 |
f895492372e3ee3abeafea422e0dc11da506eb942270bd866b58e68be6ea627b
|