arxiv.canonical.domain.listing module

Provides domain concepts and logic for event listings.

class arxiv.canonical.domain.listing.AllListings(name, years)[source]

Bases: arxiv.canonical.domain.base.CanonicalBase

All listings in the canonical record.

class arxiv.canonical.domain.listing.Listing(identifier, events)[source]

Bases: arxiv.canonical.domain.base.CanonicalBase

A collection of announcement-related events on a particular day.

property date

The date of this listing.

Return type

date

property end_datetime

Timestamp of the most recent event in this listing.

Return type

datetime

events = None

Events in this listing.

classmethod from_dict(data)[source]

Reconstitute from a native dict.

Return type

Listing

identifier = None

Unique identifier for this listing, based on the date and name.

property number_of_events

Total number of events in this listing.

Return type

int

property number_of_events_by_type

Number of events in this listing by event type.

Return type

Dict[EventType, int]

property number_of_versions

Total number of :class:`.Version`s represented in this listing.

Return type

int

property start_datetime

Timestamp of the earliest event in this listing.

Return type

datetime

to_dict()[source]

Generate a native dict representation.

Return type

Dict[str, Any]

class arxiv.canonical.domain.listing.ListingDay(date, listings)[source]

Bases: arxiv.canonical.domain.base.CanonicalBase

Represents all of the listings for a particular day.

date = None

Date on which the events occurred.

listings = None

All of the listings on this date.

class arxiv.canonical.domain.listing.ListingIdentifier(value)[source]

Bases: str

Unique identifier for a Listing.

Comprised of an ISO-8601 date and a name string.

classmethod from_parts(date, name)[source]

Generate from date and name parts.

Return type

ListingIdentifier

class arxiv.canonical.domain.listing.ListingMonth(name, listings)[source]

Bases: arxiv.canonical.domain.base.CanonicalBase

A collection of listings over a month.

listings = None

All of the listings in this month.

property month

Month represented by this block.

Return type

int

name = None

The year and month of this collection.

property year

Year represented by this block.

Return type

int

class arxiv.canonical.domain.listing.ListingYear(year, months)[source]

Bases: arxiv.canonical.domain.base.CanonicalBase

A collection of listings over a year.

months = None

All of the listings in this year.

year = None

The year of this collection.