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.stateunderfcntl.flock, with no process-local bypass. It admits requests against the host's allocatedSEC_BUDGET_SITE(prod: 7/1.1s,dev: 3/1.1s), requiringSEC_BUDGET_SITEto be explicitly configured (fails closed withSECSiteBindingErrorif 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-specificNO_PROXYexclusions and explicit per-scheme or per-destination overrides —Nonedisables proxying for that key — on redirects.SEC_USER_AGENToverrides 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, projectingProxy-Authorizationonly 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 requireSEC_BUDGET_SITE(prodordev) andSEC_USER_AGENT.SEC_EXPECTED_MACHINE_IDENTITYis optional and is never an admission condition:site_measurement()reports the configured site, the measuredcurrent_machine_identity()(hardware/OS machine identity: macOSIOPlatformUUID, Linux/etc/machine-id, or hostname fallback), and whether the optional expected value matches. Every managed response carries that dict assec_site_measurement, besidesec_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.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hank_sec_egress-0.2.11.tar.gz | 21.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hank_sec_egress-0.2.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.9 kB
Release files / hank_sec_egress-0.2.11.tar.gz
| Download URL | hank_sec_egress-0.2.11.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8e1e2393fc615a2f2386f3a11f675126835b43934e123ce471a102282d6f616
|
|
BLAKE2b-256 checksum How to use checksums |
7edbdb63febe37b5438849147e6aa96a922d4186e7604833e06c7130256f497c
|
| 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.11-py3-none-any.whl
| Download URL | hank_sec_egress-0.2.11-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
622dfc0e41da3ead2e58c819625c7f69f603dd705a564c0efe77549d5a37897c
|
|
BLAKE2b-256 checksum How to use checksums |
b3598823d3051b93679675a43b1470d48f0a7f78f9f827d3521012b149546c47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|