PYDREAMLO
Simple,free and easy-to-use Leader Board system using https://dreamlo.com.
Install
-
Use pip to install
$ pip install pydreamlo
or
$ pip3 install pydreamlo
or
$ python -m pip install pydreamlo
-
or Build from source
-
or Copy the
src/pydreamlofolder to your project directory and import it.
Usage:
-
Create a dreamlo url by going to https://dreamlo.com For using this LeaderBoard you need 2
urls (private dreamlo urlandpublic dreamplo url)- Creating the
urls-
private url: copy theprivate-keygiven by dreamlo and join it with the url.(the protocol may be different)pr_key = "http://dreamlo.com/{your_private_key}"
-
private url: copy thepublic-keygiven by dreamlo and join it with the url.(the protocol may be different)pu_key = "http://dreamlo.com/{your_public_key}"
-
- Creating the
-
Use
dreamlopyto work with your leader board.from pydreamlo import LeaderBoard pr_key = "http://dreamlo.com/{your_private_key}" pu_key = "http://dreamlo.com/{your_public_key}" cool_leader_board = LeaderBoard(pr_key,pu_key)
The module
dreamlopyis initialized,now you use the methods in the module to perform the operations.-
.add(username,score,time,text)add()is used to add a new user to the leader board.usernameandscoreare necessary parameters.Thetimeis the time taken to finish.(Sorting based on time is available)cool_leader_board.add("some-user",100,10,"user is cool")
returns a string "OK" if sucessful
-
.delete(username)delete()is used to delete a specific user from the leaderboard.usernameis the only parameter(Note:only one user can have a specific username)cool_leader_board.delete("some-user")
-
.clear()clear()is used to clear the entire leaderboard.cool_leader_board.clear()
-
.get(index:int = 0,upto:int = 0,rtype:str = 'json',sort:str='')used to get the leaderboard data.
indexdefines the index from where should the results start showing.(default is 0)uptodefines the number of users to return after the index.(default is 0,so it will return the entire leaderboard)rtypedefines the return type of thegetmethod.rtype = "json"rtype = "xml"rtype = "pipe"rtype = "quote"
sortis an additional command return the sorted leaderboard based ontimetaken by the usersort='a'for ascending(less time first)sort='d'for descending(greter time first)
""" This will return all the leaderboard data starting from index 0 to (index 0 + next 50 spaces) and will return as a "json" and arranges the leaderboard based on time(the user with less time shows at first). """ cool_leader_board.get(0,50,"json",'a')
-
.get_new_sorted(index:int = 0,upto:int = 0,rtype:str = 'json',sort:str='')used to retrieve the leaderboard with respect to time score's was added.(same parameter as
.get()) -
.get_user(username,rtype)used to get deatils of a specific user.
-
NOTE: This uses dreamlo service and cool-dev-guy is not related with the service,this module is just a python package for using the dreamlo service which was made for unity engine.So use the package at your own risk.
Metadata
Release files for pydreamlo 0.0.3
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 | |
|---|---|---|---|---|
| pydreamlo-0.0.3.tar.gz | 15.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydreamlo-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.1 kB
Release files / pydreamlo-0.0.3.tar.gz
| Download URL | pydreamlo-0.0.3.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74495ae6e5b54b9ff21848662565b59d2a4f6ae1cb1e9fc86872695e2669df15
|
|
BLAKE2b-256 checksum How to use checksums |
4dec8630e6b80f9a592f15430b32409704e0b420bb5ea742cf9d9a846d0ee841
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Release files / pydreamlo-0.0.3-py3-none-any.whl
| Download URL | pydreamlo-0.0.3-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e34d9d87128b87d188aa96885ab46281c79cac834d689e181287212249296bd1
|
|
BLAKE2b-256 checksum How to use checksums |
3f52ab3df78b13e48db5b0c4824366abc75031da808fbe7e412d72e946eab839
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.12
|
Security for pydreamlo 0.0.3
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.