+
Skip to content

thurstonsand/hackerpet

Repository files navigation

hackerpet

GitHub Release GitHub license

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.

Overview

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 game
  • set_max_kibbles(max_kibbles: MaxKibbles): set the max kibbles distributed in a day
  • set_dst(dst_on: bool): enable or disable DST
  • set_timezone(tz_offset: int): set timezone (-12, 13)
  • set_hub_mode(hub_mode: HubMode): set hub mode between STAY_OFF, STAY_ON, and SCHEDULED
  • set_schedule(schedule: Schedule): set weekday/weekend schedule when HubMode == SCHEDULED

Dependencies

The only dependencies for the project is aiohttp and aiohttp-retry.

Development

Here are a couple notes to help myself when trying to continue development, since I am a new Python dev.

Local Development

To run, simply use:

poetry run python -m hackerpet

Releasing

To tag a version for release, use bumpver:

bumpver update -t final --major/--minor/--patch

where

  • -t final describes which tag to use (between alpha, beta, rc, post, and final)
  • --major/--minor/--patch describes which part of the version to bump
  • Optionally use -d for dry-run

About

python bindings for the hackerpet HTTP API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载