Skip to main content

humanhours (Python)

The ROI meter for your AI agents. One HTTP call per task, automatic proof of hours and euros saved.

pip install humanhours

60-second quickstart

from humanhours import Humanhours

hh = Humanhours(api_key="hh_live_...")

hh.track(
    agent_id="support-classifier",
    task_type="email_classification",
    outcome="success",
)

That's it. The dashboard at humanhours.dev shows the saved hours and euros.

Decorator

from humanhours import Humanhours, track

hh = Humanhours(api_key="...", default_agent_id="support-classifier")

@track(hh, task_type="email_classification")
def classify(subject: str) -> str:
    ...

The decorator times the function, captures the outcome (success on return, failure on raise), and reports automatically. Failures re-raise — your code keeps its normal control flow.

Ambient client (context manager)

with Humanhours(api_key="...") as hh:
    @track(task_type="contract_clause_review", agent_id="legal-clause-reviewer")
    def review_clause(text):
        ...
    review_clause("...")

@track without client= picks up the active with scope. Useful when you can't pass the client through a deep call tree.

Read your numbers

hh.summary(period="30d")
hh.agents()
hh.report("/time-saved", {"period": "30d", "group_by": "agent"})

Errors

from humanhours import Humanhours, HumanhoursError

try:
    hh.track(task_type="...", agent_id="...", outcome="success")
except HumanhoursError as e:
    if e.code == "unknown_task_type":
        ...
    raise

Configuration

Argument Default Notes
api_key (required) hh_live_... from the dashboard
base_url https://humanhours.dev Override for self-hosted or local dev
default_agent_id None Skip the field on every track()
timeout 10.0 Per-call seconds
client None Inject your own httpx.Client

The decorator also reads HUMANHOURS_API_KEY / HUMANHOURS_BASE_URL from the environment as a fallback.

License

MIT.

Metadata

Release files for humanhours 0.0.1

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

Source distribution (sdist)

Source distribution for humanhours 0.0.1
File Size Uploaded Provenance Actions
humanhours-0.0.1.tar.gz 4.6 kB Without provenance Details for humanhours-0.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 9.8 kB

Release files / humanhours-0.0.1.tar.gz

Download URL humanhours-0.0.1.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e30929a0a7c9ec40882e632a213d3ac2e5fbeec03e46f1f50d0da79d284e0a93
BLAKE2b-256 checksum
How to use checksums
6759105148a5f6ad3f6280d127155e29435460e3650766aedf85dcf875ac9a1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / humanhours-0.0.1-py3-none-any.whl

Download URL humanhours-0.0.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b055a860ee1c0bf0811db9ef660f26047b9b359ae05dadd57cbe5e3cc4a26f3
BLAKE2b-256 checksum
How to use checksums
5ccaeae8ed4a38e1a6a90c5b398a320c44ca7afe7049eb4c6c2d37d9cc851535
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for humanhours 0.0.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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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