CollectedPost

Documentation for eth_defi.feed.database.CollectedPost Python class.

class CollectedPost

Bases: object

A single normalised post ready for database insertion.

Attributes summary

external_post_id

Stable external identifier derived from the feed entry or a deterministic fallback.

title

Entry title when the feed provides one.

post_url

Canonical link to the source post when available.

published_at

Original post publication timestamp in naive UTC.

fetched_at

Timestamp when the collector fetched this post in naive UTC.

short_description

Short preview text stored alongside the post.

full_text

Best available full text extracted from the feed entry.

ai_summary

Optional future AI-generated summary, null in the current version.

raw_payload

JSON-serialised raw payload from the source API (e.g.

Methods summary

__init__(external_post_id, title, post_url, ...)

external_post_id: str

Stable external identifier derived from the feed entry or a deterministic fallback.

title: Optional[str]

Entry title when the feed provides one.

post_url: Optional[str]

Canonical link to the source post when available.

published_at: Optional[datetime.datetime]

Original post publication timestamp in naive UTC.

fetched_at: datetime.datetime

Timestamp when the collector fetched this post in naive UTC.

short_description: str

Short preview text stored alongside the post.

Capped at 200 characters for compact listings; this is not the complete post body. See full_text for the full content.

full_text: str

Best available full text extracted from the feed entry.

For X/Twitter this is the complete note tweet body for tweets longer than 280 characters, populated via eth_defi.feed.twitter_api._extract_full_tweet_text(). See short_description for the truncated preview.

ai_summary: Optional[str]

Optional future AI-generated summary, null in the current version.

raw_payload: Optional[str]

JSON-serialised raw payload from the source API (e.g. full tweet object from X API).

__init__(external_post_id, title, post_url, published_at, fetched_at, short_description, full_text, ai_summary=None, raw_payload=None)
Parameters
Return type

None