models module
Classes
class Annotation
Annotation(title: str, content: str, created: datetime.datetime | None, author: str)
Dataclass fields
title: strcontent: strcreated: Unionauthor: str
class Aspect
Aspect(type: str, source_id: str, target_id: str, angle: float, orb: float)
Dataclass fields
type: strsource_id: strtarget_id: strangle: floatorb: float
class AspectContext (str, Enum)
Contexts where an aspect can be used.
class AspectDefinition
AspectDefinition(id: str, glyph: str, angle: float, default_orb: float, i18n: Dict[str, str], color: str | None = None, importance: int | None = None, line_style: str | None = None, line_width: float | None = None, show_label: bool | None = None, valid_contexts: List[module.models.AspectContext] | None = None)
Dataclass fields
id: strglyph: strangle: floatdefault_orb: floati18n: Dictcolor: Unionimportance: Unionline_style: Unionline_width: Unionshow_label: Unionvalid_contexts: Union
class AspectSettings
Settings for a single aspect definition, including display properties.
Dataclass fields
id: strenabled: boolorb: Unioncolor: Unionimportance: Unionline_style: Unionline_width: Unionshow_label: Union
class AstroModel
AstroModel(name: str, body_definitions: List[module.models.BodyDefinition], aspect_definitions: List[module.models.AspectDefinition], signs: List[module.models.Sign], settings: module.models.ModelSettings, engine: module.models.EngineType | None = None, zodiac_type: module.models.ZodiacType | None = None, ayanamsa: module.models.Ayanamsa | None = None)
Dataclass fields
name: strbody_definitions: Listaspect_definitions: Listsigns: Listsettings: ModelSettingsengine: Unionzodiac_type: Unionayanamsa: Union
class Attachment
Attachment(filename: str, url: str, type: str)
Dataclass fields
filename: strurl: strtype: str
class Ayanamsa (str, Enum)
class BodyDefinition
BodyDefinition(id: str, glyph: str, formula: str, element: module.models.Element | None, avg_speed: float, max_orb: float, i18n: Dict[str, str], object_type: module.models.ObjectType | None = None, computation_map: Dict[str, str | None] = <factory>, requires_location: bool = False, requires_house_system: bool = False)
Dataclass fields
id: strglyph: strformula: strelement: Unionavg_speed: floatmax_orb: floati18n: Dictobject_type: Unioncomputation_map: Dictrequires_location: boolrequires_house_system: bool
class CelestialBody
CelestialBody(id: str, definition_id: str, degree: float, sign: str, retrograde: bool, speed: float)
Dataclass fields
id: strdefinition_id: strdegree: floatsign: strretrograde: boolspeed: float
class ChartConfig
ChartConfig(mode: module.models.ChartMode, house_system: module.models.HouseSystem, zodiac_type: module.models.ZodiacType, included_points: List[str], aspect_orbs: Dict[str, float], display_style: str, color_theme: str, override_ephemeris: str | None = None, model: str | None = None, engine: module.models.EngineType | None = None, ayanamsa: module.models.Ayanamsa | None = None, observable_objects: List[str] | None = None, time_system: module.models.TimeSystem | None = None)
Dataclass fields
mode: ChartModehouse_system: HouseSystemzodiac_type: ZodiacTypeincluded_points: Listaspect_orbs: Dictdisplay_style: strcolor_theme: stroverride_ephemeris: Unionmodel: Unionengine: Unionayanamsa: Unionobservable_objects: Uniontime_system: Union
class ChartInstance
ChartInstance(id: str, subject: module.models.ChartSubject, config: module.models.ChartConfig, computed_chart: ForwardRef(‘Horoscope’) | None = None, tags: List[str] = <factory>)
Dataclass fields
id: strsubject: ChartSubjectconfig: ChartConfigcomputed_chart: Uniontags: List
class ChartMode (str, Enum)
class ChartPreset
ChartPreset(name: str, config: module.models.ChartConfig)
Dataclass fields
name: strconfig: ChartConfig
class ChartRelation
ChartRelation(type: module.models.RelationType, source: str, target: str, method: str, time_span: module.models.DateRange | None = None)
Dataclass fields
type: RelationTypesource: strtarget: strmethod: strtime_span: Union
class ChartSubject
ChartSubject(id: str, name: str, event_time: datetime.datetime, location: module.models.Location)
Dataclass fields
id: strname: strevent_time: datetimelocation: Location
class DateRange
DateRange(start: datetime.datetime, end: datetime.datetime)
Dataclass fields
start: datetimeend: datetime
class Element (str, Enum)
The four classical elements.
class ElementColorSettings
Color settings for the four elements.
Dataclass fields
fire: strearth: strair: strwater: str
class EngineType (str, Enum)
class EphemerisSource
EphemerisSource(name: str, backend: str)
Dataclass fields
name: strbackend: str
class Horoscope
Horoscope(for_time: datetime.datetime, location: module.models.Location, bodies: List[module.models.CelestialBody], houses: List[module.models.House], aspects: List[module.models.Aspect])
Dataclass fields
for_time: datetimelocation: Locationbodies: Listhouses: Listaspects: List
class House
House(number: int, cusp_degree: float, sign: str)
Dataclass fields
number: intcusp_degree: floatsign: str
class HouseSystem (str, Enum)
class LayoutStyle (str, Enum)
class Location
Location(name: str, latitude: float, longitude: float, timezone: str)
Dataclass fields
name: strlatitude: floatlongitude: floattimezone: str
class ModelOverrides
ModelOverrides(points: List[module.models.OverrideEntry] = <factory>, aspects: List[module.models.OverrideEntry] = <factory>, override_orbs: Dict[str, float] = <factory>)
Dataclass fields
points: Listaspects: Listoverride_orbs: Dict
class ModelSettings
ModelSettings(default_house_system: module.models.HouseSystem, default_aspects: List[str], default_bodies: List[str], standard_orb: float, default_transit_aspects: List[str] | None = None, default_direction_aspects: List[str] | None = None, default_transit_bodies: List[str] | None = None, default_direction_bodies: List[str] | None = None, degrees_in_circle: float = 360.0, obliquity_j2000: float = 23.4392911, coordinate_tolerance: float = 0.0001)
Dataclass fields
default_house_system: HouseSystemdefault_aspects: Listdefault_bodies: Liststandard_orb: floatdefault_transit_aspects: Uniondefault_direction_aspects: Uniondefault_transit_bodies: Uniondefault_direction_bodies: Uniondegrees_in_circle: floatobliquity_j2000: floatcoordinate_tolerance: float
class ObjectType (str, Enum)
Type of observable object in the chart.
class OverrideEntry
OverrideEntry(id: str, glyph: str | None = None, angle: float | None = None, default_orb: float | None = None, only_for: List[str] | None = None, i18n: Dict[str, str] | None = None, computed: bool | None = None)
Dataclass fields
id: strglyph: Unionangle: Uniondefault_orb: Uniononly_for: Unioni18n: Unioncomputed: Union
class RadixPointColorSettings
Color settings for radix (natal chart) points/planets.
Maps object IDs to color hex codes. Common objects:
- sun, moon, mercury, venus, mars, jupiter, saturn, uranus, neptune, pluto
- asc, mc, ic, desc (angles)
- north_node, south_node
- lilith, chiron, etc.
Dataclass fields
colors: Dict
class RelationType (str, Enum)
class Sign
Sign(name: str, glyph: str, abbreviation: str, element: module.models.Element, i18n: Dict[str, str])
Dataclass fields
name: strglyph: strabbreviation: strelement: Elementi18n: Dict
class TimeSystem (str, Enum)
Time representation systems.
class ViewLayout
ViewLayout(name: str, layout_style: module.models.LayoutStyle, chart_instances: List[str], relations: List[module.models.ChartRelation] = <factory>, modules: List[module.models.ViewModule] = <factory>)
Dataclass fields
name: strlayout_style: LayoutStylechart_instances: Listrelations: Listmodules: List
class ViewModule
ViewModule(type: module.models.ViewModuleType, config: Dict)
Dataclass fields
type: ViewModuleTypeconfig: Dict
class ViewModuleType (str, Enum)
class Workspace
Complete workspace container for astrological chart analysis.
A Workspace represents a project or collection of astrological work, containing all the data, settings, and configurations needed for chart computation and analysis. It serves as the top-level organizational unit for managing charts, subjects, and their associated metadata.
Structure: - Identity & Configuration: - owner: Workspace owner/creator identifier - active_model: Currently active astrological model (e.g., “western”, “vedic”) - default: Default settings (ephemeris, location, house system, language, theme)
- **Astrological Models**:
- models: Available astrological model catalogs (planet/aspect definitions, zodiac systems)
- model_overrides: Custom modifications to model definitions
- **Core Data Collections**:
- subjects: People or events for which charts can be created
- charts: Computed chart instances (actual charts with planetary positions)
- chart_presets: Reusable configuration templates (house system, display settings)
- **Organization & Presentation**:
- layouts: View configurations for displaying charts (single, dual-wheel, comparison)
- annotations: Notes, interpretations, and commentary
- aspects: List of aspect IDs enabled for this workspace
Typical Usage: 1. Load or create a workspace 2. Add subjects (people/events with birth data) 3. Create charts using subjects and presets 4. Apply layouts to visualize charts 5. Add annotations for interpretation
Example:
python ws = Workspace( owner="astrologer@example.com", active_model="western", default=WorkspaceDefaults( ephemeris_engine=EngineType.SWISSEPH, ephemeris_backend=None, default_house_system=HouseSystem.PLACIDUS ), subjects=[...], charts=[...] )
Dataclass fields
owner: strsubjects: Listcharts: Listchart_presets: Listlayouts: Listannotations: Listactive_model: Uniondefault: WorkspaceDefaultsaspects: Listbodies: Listmodels: Dictmodel_overrides: Union
class WorkspaceDefaults
Aggregated default settings for a workspace (preferred YAML shape).
This mirrors the desired manifest structure under the top-level key ‘default’. Provides workspace-wide defaults that can be overridden at the workspace level.
Dataclass fields
default_house_system: Uniondefault_bodies: Uniondefault_aspects: Unionephemeris_engine: Unionephemeris_backend: Unionelement_colors: Unionradix_point_colors: Uniondefault_location: Unionlanguage: Uniontheme: Uniontime_system: Union