Skip to main content

hank-sec-egress

hank-sec-egress owns SEC HTTP identity, URL containment, retry/redirect policy, and pacing. Its explicit backends serve different deployment contracts:

  • hank_sec_egress.portable.get() coordinates across local processes through the same version-1 machine limiter at ~/.sec_budget/machine_limiter.state under fcntl.flock, with no process-local bypass. It admits requests against the host's allocated SEC_BUDGET_SITE (prod: 7/1.1s, dev: 3/1.1s), requiring SEC_BUDGET_SITE to be explicitly configured (fails closed with SECSiteBindingError if unallocated). It returns HTTP errors without automatic retries or server-directed sleeps, preserving MCP worker availability. It honors standard Requests proxy and CA environment settings, including destination-specific NO_PROXY exclusions and explicit per-scheme or per-destination overrides — None disables proxying for that key — on redirects. SEC_USER_AGENT overrides the public EDGAR client identity; caller-supplied User-Agent headers cannot override this owner. Requests owns redirect preparation and cross-origin credential isolation; the portable session owns proxy credential isolation, projecting Proxy-Authorization only from the proxy a hop actually uses. The adapter checks SEC URL containment and paces every actual request hop against the machine limiter.
  • hank_sec_egress.get() / async_get() are for managed Unix services. They coordinate the version-1 machine limiter at ~/.sec_budget/machine_limiter.state, including socket-write admission. They require SEC_BUDGET_SITE (prod or dev) and SEC_USER_AGENT. SEC_EXPECTED_MACHINE_IDENTITY is optional and is never an admission condition: site_measurement() reports the configured site, the measured current_machine_identity() (hardware/OS machine identity: macOS IOPlatformUUID, Linux /etc/machine-id, or hostname fallback), and whether the optional expected value matches. Every managed response carries that dict as sec_site_measurement, beside sec_budget_wait_seconds. No private hostnames ship in the package.

Both APIs require a nonempty product-owned caller_label. Both accept only sec.gov URLs, replace caller User-Agent headers, and apply the same compression and redirect bounds. Managed admission retains its bounded retry count. Managed consumers may call effective_headers() for request-time identity projection. Limiter implementation classes and mutable host configuration are not package-root exports.

Public EDGAR MCP submissions metadata deliberately calls SEC directly through portable.get(). Scratch document extraction remains an HTTP call to the hosted EDGAR API. Managed deployments remain pinned to their existing package versions until their deployment configuration and dependency locks are updated together.

Metadata

Release files for hank-sec-egress 0.2.12

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

Source distribution (sdist)

Source distribution for hank-sec-egress 0.2.12
File Size Uploaded
hank_sec_egress-0.2.12.tar.gz 21.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hank-sec-egress 0.2.12
File Interpreter ABI Platform
hank_sec_egress-0.2.12-py3-none-any.whl Python 3 none any Details

Total release size: 34.7 kB

Release files / hank_sec_egress-0.2.12.tar.gz

Download URL hank_sec_egress-0.2.12.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ce34fd50ea5a7674e5b82f5a781bbf5adef9b96c95238460ed7bd24c803ab7c5
BLAKE2b-256 checksum
How to use checksums
0865af2c7856c6e657a4f95bea3030fd91495bef42b5ea977480cff03268ec77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / hank_sec_egress-0.2.12-py3-none-any.whl

Download URL hank_sec_egress-0.2.12-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e004e8f3d080eb248a8066a096e44568986c2dcd6d668a54537aeda6cbea1eb4
BLAKE2b-256 checksum
How to use checksums
6fe336991ba3070ef922f05edd49a05c2c38d057e0c205bf9dc3460a55edb637
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

This release

0.2.12 This release

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

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