paycensus 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PayCensus Labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: paycensus
3
+ Version: 0.2.0
4
+ Summary: Read-only client for the PayCensus machine-payment census (x402 + MPP, protocol-agnostic entity layer)
5
+ Author: PayCensus Labs
6
+ License: MIT
7
+ Project-URL: Homepage, https://paycensus.com
8
+ Project-URL: Source, https://github.com/OneLight1688/paycensus
9
+ Keywords: x402,mpp,machine-payments,census,analytics,ai-agents
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Office/Business :: Financial
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Dynamic: license-file
18
+
19
+ # paycensus
20
+
21
+ Read-only Python client for the [PayCensus](https://paycensus.com) machine-payment
22
+ census data layer — *"The census of the machine economy."*
23
+
24
+ PayCensus indexes **who pays whom** across machine-payment protocols — **x402**
25
+ (EIP-3009 settlements on Base, facilitator programs on Solana) and **MPP**
26
+ (Machine Payments Protocol; Tempo chain sampled hourly, offer graph parsed from
27
+ sellers' 402 challenges) — per entity, not per protocol. The ingest layer records
28
+ the protocol source; the entity layer does not care. A daily calendar is never
29
+ backfilled, and a chained digest of every day's snapshot is anchored to Bitcoin
30
+ via [OpenTimestamps](https://opentimestamps.org) — publicly verifiable, zero cost.
31
+
32
+ ## Install
33
+
34
+ No PyPI release yet — install from source:
35
+
36
+ ```bash
37
+ pip install git+https://github.com/OneLight1688/paycensus.git
38
+ ```
39
+
40
+ ## Usage
41
+
42
+ Zero dependencies (stdlib only).
43
+
44
+ ```python
45
+ from paycensus import PayCensus
46
+
47
+ pc = PayCensus()
48
+
49
+ pc.stats() # census totals + tempo_mpp sampled estimate
50
+ pc.calendar() # daily calendar (never backfilled)
51
+ pc.anchoring() # Bitcoin-anchored daily digests (verify with ots)
52
+ pc.audit() # collection lineage + methodology
53
+
54
+ pc.edges(limit=20, min_volume=10) # top buyer x seller relationship edges
55
+ pc.seller("0x…") # who pays this seller, daily series
56
+ pc.buyer("0x…") # what this buyer pays for
57
+
58
+ pc.mpp() # MPP/Tempo monitor: chain samples, offer graph,
59
+ # seller-side protocol census (x402/mpp/dual)
60
+ ```
61
+
62
+ ## Protocol coverage
63
+
64
+ | Protocol | Settlement rail | Observation |
65
+ |---|---|---|
66
+ | x402 (EIP-3009) | Base USDC (counted), Solana facilitators (counted) | enumerated on-chain |
67
+ | MPP | Tempo chain (sampled estimate), Stripe fiat rails (not observable) | hourly 50-block samples + 402-challenge offer graph |
68
+
69
+ Sampled estimates are never merged into counted totals. When a new payment
70
+ protocol with real adoption emerges, it is added at the ingest layer — the
71
+ entity graph does not change.
72
+
73
+ ## Data boundaries
74
+
75
+ - On-chain facts (addresses, amounts, timing) are public data.
76
+ - Seller entities (domain/title/description) and 402-challenge quotes are the
77
+ seller's own public storefront info.
78
+ - **Contact information is never collected into the public layer and never published.**
79
+ - Any seller can be removed from the entity layer within 24h (opt-out).
80
+ - Anchoring preserves *integrity*, not *correctness* — correctness comes from the
81
+ public methodology in `/data/audit.json`, which anyone can independently re-run.
82
+
83
+ ## License
84
+
85
+ MIT
@@ -0,0 +1,67 @@
1
+ # paycensus
2
+
3
+ Read-only Python client for the [PayCensus](https://paycensus.com) machine-payment
4
+ census data layer — *"The census of the machine economy."*
5
+
6
+ PayCensus indexes **who pays whom** across machine-payment protocols — **x402**
7
+ (EIP-3009 settlements on Base, facilitator programs on Solana) and **MPP**
8
+ (Machine Payments Protocol; Tempo chain sampled hourly, offer graph parsed from
9
+ sellers' 402 challenges) — per entity, not per protocol. The ingest layer records
10
+ the protocol source; the entity layer does not care. A daily calendar is never
11
+ backfilled, and a chained digest of every day's snapshot is anchored to Bitcoin
12
+ via [OpenTimestamps](https://opentimestamps.org) — publicly verifiable, zero cost.
13
+
14
+ ## Install
15
+
16
+ No PyPI release yet — install from source:
17
+
18
+ ```bash
19
+ pip install git+https://github.com/OneLight1688/paycensus.git
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ Zero dependencies (stdlib only).
25
+
26
+ ```python
27
+ from paycensus import PayCensus
28
+
29
+ pc = PayCensus()
30
+
31
+ pc.stats() # census totals + tempo_mpp sampled estimate
32
+ pc.calendar() # daily calendar (never backfilled)
33
+ pc.anchoring() # Bitcoin-anchored daily digests (verify with ots)
34
+ pc.audit() # collection lineage + methodology
35
+
36
+ pc.edges(limit=20, min_volume=10) # top buyer x seller relationship edges
37
+ pc.seller("0x…") # who pays this seller, daily series
38
+ pc.buyer("0x…") # what this buyer pays for
39
+
40
+ pc.mpp() # MPP/Tempo monitor: chain samples, offer graph,
41
+ # seller-side protocol census (x402/mpp/dual)
42
+ ```
43
+
44
+ ## Protocol coverage
45
+
46
+ | Protocol | Settlement rail | Observation |
47
+ |---|---|---|
48
+ | x402 (EIP-3009) | Base USDC (counted), Solana facilitators (counted) | enumerated on-chain |
49
+ | MPP | Tempo chain (sampled estimate), Stripe fiat rails (not observable) | hourly 50-block samples + 402-challenge offer graph |
50
+
51
+ Sampled estimates are never merged into counted totals. When a new payment
52
+ protocol with real adoption emerges, it is added at the ingest layer — the
53
+ entity graph does not change.
54
+
55
+ ## Data boundaries
56
+
57
+ - On-chain facts (addresses, amounts, timing) are public data.
58
+ - Seller entities (domain/title/description) and 402-challenge quotes are the
59
+ seller's own public storefront info.
60
+ - **Contact information is never collected into the public layer and never published.**
61
+ - Any seller can be removed from the entity layer within 24h (opt-out).
62
+ - Anchoring preserves *integrity*, not *correctness* — correctness comes from the
63
+ public methodology in `/data/audit.json`, which anyone can independently re-run.
64
+
65
+ ## License
66
+
67
+ MIT
@@ -0,0 +1,7 @@
1
+ # -*- coding: utf-8 -*-
2
+ """paycensus: read-only client for the PayCensus machine-payment census data layer
3
+ (x402 + MPP and successors — protocol-agnostic entity layer)."""
4
+ from .client import PayCensus
5
+
6
+ __version__ = "0.2.0"
7
+ __all__ = ["PayCensus"]
@@ -0,0 +1,81 @@
1
+ # -*- coding: utf-8 -*-
2
+ """stdlib-only client — zero dependencies, zero cost, read-only.
3
+
4
+ All data comes from public endpoints of https://paycensus.com:
5
+ /data/stats.json aggregate machine-payment census (x402 + MPP; tempo_mpp is a sampled estimate)
6
+ /data/calendar.json daily calendar (self-contained records, never backfilled)
7
+ /data/audit.json collection lineage + methodology
8
+ /data/anchoring.json daily Bitcoin anchoring (OpenTimestamps receipts)
9
+ /data/entities.json payTo -> domain/title/description (sellers only)
10
+ /data/leads.json tier + protocol counters (counts only; contact emails are never published)
11
+ /data/mpp.json MPP/Tempo monitor: chain samples, offer graph, seller-side protocol census
12
+ /api/seller /api/buyer /api/edges processed commercial info (who pays whom)
13
+
14
+ The entity layer is protocol-agnostic: protocol source is recorded at the ingest
15
+ layer only; buyers, sellers and edges do not care which protocol carried the payment.
16
+ """
17
+ import json
18
+ from urllib.parse import urlencode
19
+ from urllib.request import Request, urlopen
20
+
21
+ DEFAULT_BASE = "https://paycensus.com"
22
+
23
+
24
+ class PayCensus:
25
+ def __init__(self, base: str = DEFAULT_BASE, timeout: int = 15, user_agent: str = "paycensus/0.2"):
26
+ self.base = base.rstrip("/")
27
+ self.timeout = timeout
28
+ self.headers = {"User-Agent": user_agent, "Accept": "application/json"}
29
+
30
+ def _get(self, path: str, **params):
31
+ url = self.base + path
32
+ if params:
33
+ url += "?" + urlencode(params)
34
+ req = Request(url, headers=self.headers)
35
+ with urlopen(req, timeout=self.timeout) as r:
36
+ return json.loads(r.read().decode("utf-8"))
37
+
38
+ # ---- aggregate / trust layer -------------------------------------------------
39
+ def stats(self) -> dict:
40
+ """Aggregate census: txs, volume, unique buyers/sellers/edges (per chain),
41
+ plus tempo_mpp — the sampled MPP/Tempo estimate (never merged into counts)."""
42
+ return self._get("/data/stats.json")
43
+
44
+ def calendar(self) -> dict:
45
+ """Daily calendar — each day is a self-contained record and is never backfilled."""
46
+ return self._get("/data/calendar.json")
47
+
48
+ def audit(self) -> dict:
49
+ """Collection lineage: collectors, last runs, methodology, error counts."""
50
+ return self._get("/data/audit.json")
51
+
52
+ def anchoring(self) -> dict:
53
+ """Proof-of-Integrity: chained digests + OpenTimestamps Bitcoin receipts."""
54
+ return self._get("/data/anchoring.json")
55
+
56
+ # ---- enriched layers ----------------------------------------------------------
57
+ def entities(self) -> dict:
58
+ """payTo -> domain/title/description for on-chain matched sellers only."""
59
+ return self._get("/data/entities.json")
60
+
61
+ def leads(self) -> dict:
62
+ """Tier + protocol census counters (counts only). Emails are never published."""
63
+ return self._get("/data/leads.json")
64
+
65
+ def mpp(self) -> dict:
66
+ """MPP/Tempo monitor: hourly chain samples, offer graph parsed from
67
+ sellers' 402 challenges, seller-side protocol census (x402/mpp/dual)."""
68
+ return self._get("/data/mpp.json")
69
+
70
+ # ---- query API -----------------------------------------------------------------
71
+ def seller(self, addr: str) -> dict:
72
+ """Seller view: totals, daily series, buyers (where money comes from)."""
73
+ return self._get("/api/seller", addr=addr)
74
+
75
+ def buyer(self, addr: str) -> dict:
76
+ """Buyer view: totals, sellers paid (where money goes)."""
77
+ return self._get("/api/buyer", addr=addr)
78
+
79
+ def edges(self, limit: int = 50, min_volume: float = 0.0) -> dict:
80
+ """Top buyer x seller relationship edges."""
81
+ return self._get("/api/edges", limit=limit, min_volume=min_volume)
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: paycensus
3
+ Version: 0.2.0
4
+ Summary: Read-only client for the PayCensus machine-payment census (x402 + MPP, protocol-agnostic entity layer)
5
+ Author: PayCensus Labs
6
+ License: MIT
7
+ Project-URL: Homepage, https://paycensus.com
8
+ Project-URL: Source, https://github.com/OneLight1688/paycensus
9
+ Keywords: x402,mpp,machine-payments,census,analytics,ai-agents
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Office/Business :: Financial
14
+ Requires-Python: >=3.8
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Dynamic: license-file
18
+
19
+ # paycensus
20
+
21
+ Read-only Python client for the [PayCensus](https://paycensus.com) machine-payment
22
+ census data layer — *"The census of the machine economy."*
23
+
24
+ PayCensus indexes **who pays whom** across machine-payment protocols — **x402**
25
+ (EIP-3009 settlements on Base, facilitator programs on Solana) and **MPP**
26
+ (Machine Payments Protocol; Tempo chain sampled hourly, offer graph parsed from
27
+ sellers' 402 challenges) — per entity, not per protocol. The ingest layer records
28
+ the protocol source; the entity layer does not care. A daily calendar is never
29
+ backfilled, and a chained digest of every day's snapshot is anchored to Bitcoin
30
+ via [OpenTimestamps](https://opentimestamps.org) — publicly verifiable, zero cost.
31
+
32
+ ## Install
33
+
34
+ No PyPI release yet — install from source:
35
+
36
+ ```bash
37
+ pip install git+https://github.com/OneLight1688/paycensus.git
38
+ ```
39
+
40
+ ## Usage
41
+
42
+ Zero dependencies (stdlib only).
43
+
44
+ ```python
45
+ from paycensus import PayCensus
46
+
47
+ pc = PayCensus()
48
+
49
+ pc.stats() # census totals + tempo_mpp sampled estimate
50
+ pc.calendar() # daily calendar (never backfilled)
51
+ pc.anchoring() # Bitcoin-anchored daily digests (verify with ots)
52
+ pc.audit() # collection lineage + methodology
53
+
54
+ pc.edges(limit=20, min_volume=10) # top buyer x seller relationship edges
55
+ pc.seller("0x…") # who pays this seller, daily series
56
+ pc.buyer("0x…") # what this buyer pays for
57
+
58
+ pc.mpp() # MPP/Tempo monitor: chain samples, offer graph,
59
+ # seller-side protocol census (x402/mpp/dual)
60
+ ```
61
+
62
+ ## Protocol coverage
63
+
64
+ | Protocol | Settlement rail | Observation |
65
+ |---|---|---|
66
+ | x402 (EIP-3009) | Base USDC (counted), Solana facilitators (counted) | enumerated on-chain |
67
+ | MPP | Tempo chain (sampled estimate), Stripe fiat rails (not observable) | hourly 50-block samples + 402-challenge offer graph |
68
+
69
+ Sampled estimates are never merged into counted totals. When a new payment
70
+ protocol with real adoption emerges, it is added at the ingest layer — the
71
+ entity graph does not change.
72
+
73
+ ## Data boundaries
74
+
75
+ - On-chain facts (addresses, amounts, timing) are public data.
76
+ - Seller entities (domain/title/description) and 402-challenge quotes are the
77
+ seller's own public storefront info.
78
+ - **Contact information is never collected into the public layer and never published.**
79
+ - Any seller can be removed from the entity layer within 24h (opt-out).
80
+ - Anchoring preserves *integrity*, not *correctness* — correctness comes from the
81
+ public methodology in `/data/audit.json`, which anyone can independently re-run.
82
+
83
+ ## License
84
+
85
+ MIT
@@ -0,0 +1,9 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ paycensus/__init__.py
5
+ paycensus/client.py
6
+ paycensus.egg-info/PKG-INFO
7
+ paycensus.egg-info/SOURCES.txt
8
+ paycensus.egg-info/dependency_links.txt
9
+ paycensus.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ paycensus
@@ -0,0 +1,24 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "paycensus"
7
+ version = "0.2.0"
8
+ description = "Read-only client for the PayCensus machine-payment census (x402 + MPP, protocol-agnostic entity layer)"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "PayCensus Labs" }]
13
+ keywords = ["x402", "mpp", "machine-payments", "census", "analytics", "ai-agents"]
14
+ classifiers = [
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ "Topic :: Office/Business :: Financial",
19
+ ]
20
+ dependencies = []
21
+
22
+ [project.urls]
23
+ Homepage = "https://paycensus.com"
24
+ Source = "https://github.com/OneLight1688/paycensus"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+