intersection.py
An easy to use API wrapper with some basic functionality you would expect an API wrapper to have.
Key Features
- User, Map, Comment and Highscore classes with their corresponding features.
- Functions used to get said objects from different sources.
- It's not really optimized but should work just fine.
Installing
You can either use pip or copy the github repository.
pip (replace "version" with the version you want to download or alternatively just don't specify it.):
pip install intersection.py==version
Required packages
The only other package this API wrapper requires is requests. In order to download it run this command:
pip install requests
Quick example
import intersection
my_user = intersection.user.get_details_for_user(userId=2452411)
print(my_user.name)
my_maps = my_user.get_user_maps()
for map in my_maps:
print(map.name)
comment = map.get_comments(limit=1)
if len(comment):
print("Latest comment: " + comment[0].comment)
if map.gameModeGroup == 2:
highscore = map.get_highscores(count=1)
print("Highscore: " + highscore[0].score)
JSON example
from intersection.ext import url
my_user = url.get_details_for_user(userId=2452411)
print(my_user["name"])
my_maps = url.list_maps_by_user(userId=my_user["objectId"])
for map in my_maps:
print(map["name"])
comment = url.list_comments_on_map(mapId=map["objectId"], limit=1)
if len(comment):
print("Latest comment: " + comment[0]["comment"])
if map["gameModeGroup"] == 2:
highscore = url.list_high_scores_on_map(mapId=map["objectId"], count=1)
print("Highscore: " + highscore[0]["score"])
External links
Metadata
Release files for intersection.py 2.1.0
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 |
|---|---|---|---|---|
| intersection.py-2.1.0.tar.gz | 7.9 kB | Without provenance | Details for intersection.py-2.1.0.tar.gz |
Release files / intersection.py-2.1.0.tar.gz
| Download URL | intersection.py-2.1.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e47fde97ad4ba2e88c28caa458c481f56f2031155caaee56ec1e2ca5de55033f
|
|
BLAKE2b-256 checksum How to use checksums |
ace74230a6779e76cd944f7948fe800a5ad9491ac3d09bbd6ad2f9645d4819f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
|
Security for intersection.py 2.1.0
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.