Allows you to use the PixelPlanet.Fun API
Project description
ppfun
ppfun allows you to use the PixelPlanet.Fun's (hence the name) API in your Python code. I personally didn't come up with any use case besides auto-drawing bots. But you may. Please e-mail me if you come up with any idea, I will truly be interested.
Example code:
# import the library
import ppfun
# create an API object
pp = ppfun.PPFun_api()
# print the list of available canvases
print('---------')
print('Canvases:')
for c in pp.list_canv():
print(c['title'] + '\t\t' +
c['description'] + '\t\t' +
str(c['size']) + 'x' + str(c['size']) + '\t\t' +
'(' + c['identifier'] + ')')
print('---------')
# get the main canvas (Earth)
canv = pp.get_canv('d')
# print the approximation of the lime color for this canvas
print('Lime color ID: ' + str(canv.approx_color((0, 255, 0))))
# set a pixel at (-1532, -550) and print the cooldown time
canv.set_pixel((-1532, -550), canv.approx_color((0, 255, 0)))
print('Cooldown after setting the pixel: ' + str(canv.remaining_cooldown()))
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
ppfun-1.0.1.tar.gz
(2.9 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
ppfun-1.0.1-py3-none-any.whl
(3.5 kB
view details)
File details
Details for the file ppfun-1.0.1.tar.gz.
File metadata
- Download URL: ppfun-1.0.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b6cda68d9fa233554319707f2d307fe955e01ed82e6265215c1ce0c670bc635
|
|
| MD5 |
873d376c89349b1e91ad962581849153
|
|
| BLAKE2b-256 |
a1ae82887b1fdb784fe02af09f1d5494163c5bb9f6cfa299e5290ae06a6be609
|
File details
Details for the file ppfun-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ppfun-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88844ce9771f45ae9a15257bad6ebbac59fc4ceee777b5aacfdfbd92f11f4891
|
|
| MD5 |
d6d48cbb8d262bc3c39c3e047b8f844e
|
|
| BLAKE2b-256 |
3ef3cd40c1c3a951af7ffd97e088a13705595c7a5f0e405b69fa8c40b4232aa9
|