python bindings for the hackerpet HTTP API. Code is fully documented, so see src/hackerpet/__init__.py
for more information.
This is strictly a library, with no executable or CLI.
Start communication by initializing a Hackerpet
class. Since this opens a client session, it is the responsibility of the caller to eventually call hackerpet.close()
.
It is possible to interact with the hackerpet in the following ways:
.status()
: Get current status of the hackerpet.set_game(game: Game)
: set the currently playing gameset_max_kibbles(max_kibbles: MaxKibbles)
: set the max kibbles distributed in a dayset_dst(dst_on: bool)
: enable or disable DSTset_timezone(tz_offset: int)
: set timezone (-12, 13)set_hub_mode(hub_mode: HubMode)
: set hub mode betweenSTAY_OFF
,STAY_ON
, andSCHEDULED
set_schedule(schedule: Schedule)
: set weekday/weekend schedule whenHubMode == SCHEDULED
The only dependencies for the project is aiohttp
and aiohttp-retry
.
Here are a couple notes to help myself when trying to continue development, since I am a new Python dev.
To run, simply use:
poetry run python -m hackerpet
To tag a version for release, use bumpver
:
bumpver update -t final --major/--minor/--patch
where
-t final
describes which tag to use (betweenalpha
,beta
,rc
,post
, andfinal
)--major/--minor/--patch
describes which part of the version to bump- Optionally use
-d
for dry-run