Skip to main content

dannykeane

Official Python SDK and CLI for the dannykeane.com public API: Danny Keane's work history, GitHub contribution calendar, live visitor stats, and the Habbo room NPC chat.

Zero dependencies, standard library only. Python 3.9+, fully typed.

pip install dannykeane

Usage

from dannykeane import DannyKeane

dk = DannyKeane()
for role in dk.iter_work():
    print(role["company"], role["years"])

Every endpoint is public, so there is no API key. Pass base_url to point at a local or preview deploy.

Method API operation Endpoint
list_work(limit=None, cursor=None) listWork GET /api/v1/work
iter_work(limit=None) listWork, every page GET /api/v1/work
get_stats() getStats GET /api/v1/stats
get_github_contributions() getGithubContributions GET /api/v1/github-contributions
npc_chat(message, npc_id, context=None) npcChat POST /api/v1/npc-chat
npc_chat_health() npcChatHealth GET /api/v1/npc-chat
run_batch(requests) runBatch POST /api/v1/batch

Results are the API's own JSON as TypedDicts. The full contract is the OpenAPI document at https://dannykeane.com/openapi.json.

Pagination

list_work returns one page: {"data": [...], "next_cursor": "..."}, with next_cursor set to None on the last page. iter_work follows the cursors for you.

Errors

Every non-2xx response raises ApiError, parsed from the API's ErrorResponse body:

from dannykeane import ApiError, DannyKeane

try:
    DannyKeane().list_work(limit=50)
except ApiError as error:
    print(error.status, error.code, error.message, error.hint)
    # 400 invalid_parameter limit must be an integer from 1 to 20 ...

error.body holds the full parsed body. Network failures raise the standard library's urllib.error.URLError.

Rate limits

On a 429 the client waits out Retry-After and retries, up to max_retries (default 2). A Retry-After longer than max_retry_delay (default 60 seconds) raises immediately instead, with the wait on error.retry_after. Set max_retries=0 to handle every 429 yourself.

CLI

The package installs a dannykeane command. Run it without installing:

pipx run dannykeane work --limit 5
Command Operation
dannykeane work [--limit N] [--cursor TOKEN] [--all] listWork; --all walks every page and prints one array
dannykeane stats getStats
dannykeane github-contributions getGithubContributions
dannykeane npc-chat [--npc-id ID] <message> npcChat
dannykeane npc-chat-health npcChatHealth
dannykeane batch <operationId>... runBatch

The API's JSON goes to stdout, indented when stdout is a terminal (--pretty forces it). Failures go to stderr as one line of ErrorResponse JSON, with stdout empty. --base-url or DANNYKEANE_BASE_URL points it at another deploy.

Exit codes: 0 success, 1 the API returned an error, 2 usage error, 3 the API could not be reached.

The npm package dannykeane ships the same client and CLI for TypeScript and Node.

License

MIT

Release files for dannykeane 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dannykeane 0.1.0
File Size Uploaded
dannykeane-0.1.0.tar.gz 9.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dannykeane 0.1.0
File Interpreter ABI Platform
dannykeane-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.2 kB

Release files / dannykeane-0.1.0.tar.gz

Download URL dannykeane-0.1.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
668ff170797f57f260946192ebdc5e172a235348bf0f227b82f9f83bfcdffb6c
BLAKE2b-256 checksum
How to use checksums
4747827617a3c8143c08ed2c8d670fb3a6ac3dcac031d58211676ad3e86b2ee4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / dannykeane-0.1.0-py3-none-any.whl

Download URL dannykeane-0.1.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d418d01ed3cac7966ef34c69e5b94da0efbb92c8a592fd2f48a5124f756326d
BLAKE2b-256 checksum
How to use checksums
50249e3a7cbcbba20606ba1105eef94773846f611cb8f7f928a8345093cb7bb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page