rpsa-client
A Python client library for the RPSA public API.
Installation
# Via pip
pip install rpsa-client
# Or with Poetry
poetry add rpsa-client
Quickstart
from rpsa_client import RPSAClient, exceptions
# Initialize the client
client = RPSAClient(
api_key="YOUR_API_KEY",
base_url="https://rockpapercode.onespire.hu/api/v1/public"
)
# List arenas
resp = client.list_arenas(page=1, per_page=10)
for arena in resp.data:
print(arena.id, arena.created_at)
# Get arena details
arena = client.get_arena(arena_id=1)
print(arena)
# Fetch game results
results = client.get_game_results(game_id=42)
for r in results:
print(r.strategy_name, r.score)
# Strategy summary
summary = client.get_strategy_summary(strategy_id=7)
print(summary.total_score)
# Always close client when done
client.close()
Error handling
UnauthorizedError(401)NotFoundError(404)BadRequestError(400)RateLimitError(429)- Generic
APIErrorfor other statuses.
Testing
poetry install
poetry run pytest
Metadata
Release files for rpsa-client 0.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 |
|---|---|---|---|---|
| rpsa_client-0.1.1.tar.gz | 10.2 kB | Without provenance | Details for rpsa_client-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rpsa_client-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for rpsa_client-0.1.1-py3-none-any.whl |
Total release size: 21.9 kB
Release files / rpsa_client-0.1.1.tar.gz
| Download URL | rpsa_client-0.1.1.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec515e540f35ddbaa0d79911ee3f92d491bbd0038dd271c3bd75a22bf5ee5dd5
|
|
BLAKE2b-256 checksum How to use checksums |
0925ab3897a3e616d9d1ebce25b10fec635c861aa2632c846d73b05ab484f05e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.1 Windows/10
|
Release files / rpsa_client-0.1.1-py3-none-any.whl
| Download URL | rpsa_client-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5020dd438879af549fc8588f151d0cbb13d37f911da98a099d35de2fb32afbb8
|
|
BLAKE2b-256 checksum How to use checksums |
b88ad99d74bf278c0f8f061360c5e59aee7e54a3518afb87f69170d7caaade16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.1 Windows/10
|
Security for rpsa-client 0.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.