### Install Immanuel Python Library via Pip - Bash Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/2-installation.md Provides the command-line instruction to install the Immanuel library using pip. Requires Python >= 3.10 and an active Python environment with pip installed. ```bash pip install immanuel ``` -------------------------------- ### Installing Immanuel Python Library Source: https://github.com/theriftlab/immanuel-python/blob/master/README.md Provides the command-line instruction to install the Immanuel library using pip, the standard Python package installer. This is the necessary first step to use the library in a Python environment. ```bash pip install immanuel ``` -------------------------------- ### Serializing Immanuel Chart Parts to JSON Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/3-examples.md Extends the JSON serialization example by showing how to apply the `immanuel.classes.serialize.ToJSON` class to different components of a chart instance: the `native` subject, the collection of `objects` (planets, points), and the entire chart instance itself. This highlights the flexibility of the serializer for outputting various levels of chart data in JSON format. ```python # Just the chart native print(json.dumps(natal.native, cls=ToJSON, indent=4)) # Just the planets etc. print(json.dumps(natal.objects, cls=ToJSON, indent=4)) # The whole chart print(json.dumps(natal, cls=ToJSON, indent=4)) ``` -------------------------------- ### Accessing Immanuel Chart Properties Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/3-examples.md Provides examples of printing basic chart properties like `diurnal` and `moon_phase`, iterating through chart objects (`natal.objects`) to print their details, and iterating through aspects (`natal.aspects`) to print aspect information for each object. This demonstrates how to access structured data within a chart object for display. ```python print(f'Daytime: {natal.diurnal}') print(f'Moon phase: {natal.moon_phase}\n') for object in natal.objects.values(): print(object) print() for index, aspects in natal.aspects.items(): print(f'Aspects for {natal.objects[index].name}:') for aspect in aspects.values(): print(f' - {aspect}') ``` -------------------------------- ### Creating Subject and Natal Chart (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Provides the necessary code to initialize a `Subject` object with birth data and then create a `Natal` chart object from it. This setup is a prerequisite for accessing properties like `natal.aspects` and `natal.weightings` shown in other examples. ```python from immanuel import charts from immanuel.const import chart native = charts.Subject('2000-01-01 10:00', '32n43', '117w09') natal = charts.Natal(native) ``` -------------------------------- ### Initializing Immanuel Subject Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/3-examples.md Demonstrates multiple valid formats for providing date/time and coordinates when creating an `immanuel.charts.Subject` instance. It shows using ISO strings, datetime objects, various coordinate text formats, decimal numbers, and tuple/list representations, highlighting the flexibility of the constructor and the use of optional named arguments like `time_is_dst`. ```python from immanuel import charts native = charts.Subject('2000-01-01 10:00', '32n43', '117w09') native = charts.Subject('2000-01-01 10:00:00', "32°43'", "-117°09'") native = charts.Subject(datetime.fromisoformat('2000-01-01 10:00:00'), '32.71667n', '117.15w') native = charts.Subject(datetime(2000, 1, 1, 10, 0, 0), 32.71667, -117.15) native = charts.Subject(datetime(year=2000, month=1, day=1, hour=10), ('+', 32, 43, 0), ['-', 117, 9, 0]) # Or if you prefer named arguments... native = charts.Subject( date_time='2023-11-05 01:30', latitude='32n43', longitude='117w09', time_is_dst=True, ) ``` -------------------------------- ### Creating Immanuel Synastry Chart Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/3-examples.md Explains how to simulate a synastry chart by passing one chart instance (the partner's) into the `aspects_to` parameter when creating another chart instance (the native's). This causes the first chart's objects to be aspected against the second chart's objects, enabling flexible comparisons between any two chart types. ```python from immanuel import charts native = charts.Subject('2000-01-01 10:00', '32n43', '117w09') partner = charts.Subject('2001-06-21 18:30', '51n28.69', '0e0.1') partner_chart = charts.Natal(partner) native_chart = charts.Natal(native, aspects_to=partner_chart) ``` -------------------------------- ### Generating Immanuel Charts Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/3-examples.md Illustrates how to instantiate various chart types provided by the `immanuel.charts` module, including `Natal`, `SolarReturn`, `Progressed`, `Composite`, and `Transits`. It shows that most chart types require one or two `Subject` instances, while `Transits` can optionally take coordinates and is assumed to be for the present time. ```python from immanuel import charts native = charts.Subject('2000-01-01 10:00', '32n43', '117w09') partner = charts.Subject('2001-06-21 18:30', '51n28.69', '0e0.1') natal = charts.Natal(native) solar_return = charts.SolarReturn(native, 2025) progressed = charts.Progressed(native, '2025-06-20 17:00') composite = charts.Composite(native, partner) transits = charts.Transits('32n43', '117w09') ``` -------------------------------- ### Describing Immanuel Natal Chart Object JSON (Sun Example) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Provides an example JSON object representing a celestial body (the Sun) from the `natal.objects` dictionary. It showcases common properties like index, name, type, longitude, sign, house, speed, movement, and dignities, explaining variations based on the object type (planets, houses, etc.). The object's index is used as the dictionary key. ```json { "index": 4000001, "name": "Sun", "type": { "index": 4000000, "name": "Planet" }, "latitude": { "raw": 0.0002259471008556382, "formatted": "00\u00b000'01\"", "direction": "+", "degrees": 0, "minutes": 0, "seconds": 1 }, "longitude": { "raw": 280.6237802656368, "formatted": "280\u00b037'26\"", "direction": "+", "degrees": 280, "minutes": 37, "seconds": 26 }, "sign_longitude": { "raw": 10.62378026563681, "formatted": "10\u00b037'26\"", "direction": "+", "degrees": 10, "minutes": 37, "seconds": 26 }, "sign": { "number": 10, "name": "Capricorn", "element": "Earth", "modality": "Cardinal" }, "decan": { "number": 2, "name": "2nd Decan" }, "house": { "index": 2000011, "number": 11, "name": "11th House" }, "distance": 0.9833259257690341, "speed": 1.0194579691359147, "movement": { "direct": true, "stationary": false, "retrograde": false, "formatted": "Direct" }, "declination": { "raw": -23.01236501586868, "formatted": "-23\u00b000'45\"", "direction": "-", "degrees": 23, "minutes": 0, "seconds": 45 }, "out_of_bounds": false, "in_sect": true, "dignities": { "ruler": false, "exalted": false, "triplicity_ruler": false, "term_ruler": false, "face_ruler": false, "mutual_reception_ruler": false, "mutual_reception_exalted": false, "mutual_reception_triplicity_ruler": true, "mutual_reception_term_ruler": false, "mutual_reception_face_ruler": false, "detriment": false, "fall": false, "peregrine": false, "formatted": [ "Triplicity Ruler by mutual reception" ] }, "score": 3 } ``` -------------------------------- ### Accessing Nested Immanuel Properties Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/3-examples.md Demonstrates accessing nested data within a chart object by printing the `native` property and then drilling down into its `coordinates`, `latitude`, and `raw` values. This illustrates how to navigate the structured data model of an `immanuel` chart instance to retrieve specific details. ```python print(natal.native) print(natal.native.coordinates) print(natal.native.coordinates.latitude) print(natal.native.coordinates.latitude.raw) ``` -------------------------------- ### Example Output for External Object Data - JSON Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This JSON snippet shows the expected output structure and content for an external object (asteroid 1181, Lilith) when accessed from an Immanuel chart. It includes standard astrological properties like coordinates, sign, house, speed, and movement status. ```JSON { "index": 1181, "name": "Lilith", "type": { "index": 5000000, "name": "Asteroid" }, "latitude": { "raw": 4.818541410009123, "formatted": "04\u00b049'07\"", "direction": "+", "degrees": 4, "minutes": 49, "seconds": 7 }, "longitude": { "raw": 348.27965784580425, "formatted": "348\u00b016'47\"", "direction": "+", "degrees": 348, "minutes": 16, "seconds": 47 }, "sign_longitude": { "raw": 18.279657845804252, "formatted": "18\u00b016'47\"", "direction": "+", "degrees": 18, "minutes": 16, "seconds": 47 }, "sign": { "number": 12, "name": "Pisces" }, "house": { "index": 2000001, "number": 1, "name": "1st House" }, "distance": 2.4219215373717056, "speed": 0.4102596602496747, "movement": { "direct": true, "stationary": false, "retrograde": false, "formatted": "Direct" }, "declination": { "raw": -0.19720685380581718, "formatted": "-00\u00b011'50\"", "direction": "-", "degrees": 0, "minutes": 11, "seconds": 50 }, "out_of_bounds": false } ``` -------------------------------- ### Viewing Serialized Aspect Data Example (JSON) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Provides an example of the detailed JSON data structure obtained by serializing a specific aspect object. It includes properties such as the active/passive object indices, aspect type, orb, raw and formatted distance/difference values, and boolean flags for movement and condition states. ```json { "active": 4000002, "passive": 4000001, "type": "Sextile", "aspect": 60.0, "orb": 6.0, "distance": { "raw": 54.29916852653977, "formatted": "54\u00b017'57\"", "direction": "+", "degrees": 54, "minutes": 17, "seconds": 57 }, "difference": { "raw": -5.700831473460227, "formatted": "-05\u00b042'03\"", "direction": "-", "degrees": 5, "minutes": 42, "seconds": 3 }, "movement": { "applicative": false, "exact": false, "separative": true, "formatted": "Separative" }, "condition": { "associate": true, "dissociate": false, "formatted": "Associate" } } ``` -------------------------------- ### Describing Immanuel Natal Chart House JSON (1st House Example) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Illustrates the JSON structure for a specific house (the 1st House) from the `natal.houses` dictionary. Similar to celestial objects, it includes index, number, name, type, longitude, sign, and declination, but adds a `size` property unique to houses. The house's index serves as the dictionary key. ```json { "index": 2000001, "number": 1, "name": "1st House", "type": { "index": 2000000, "name": "House" }, "longitude": { "raw": 335.61047303445594, "formatted": "335\u00b036'38\"", "direction": "+", "degrees": 335, "minutes": 36, "seconds": 38 }, "sign_longitude": { "raw": 5.610473034455936, "formatted": "05\u00b036'38\"", "direction": "+", "degrees": 5, "minutes": 36, "seconds": 38 }, "sign": { "number": 12, "name": "Pisces", "element": "Water", "modality": "Mutable" }, "decan": { "number": 1, "name": "1st Decan" }, "speed": 516.3767707094903, "declination": { "raw": -9.453470857404115, "formatted": "-09\u00b027'12\"", "direction": "-", "degrees": 9, "minutes": 27, "seconds": 12 }, "size": 42.38404742743842 } ``` -------------------------------- ### Serializing Immanuel Property to JSON Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/3-examples.md Explains how to use the `immanuel.classes.serialize.ToJSON` class with Python's built-in `json.dumps()` function to serialize a specific chart property, such as the `native` subject data, into a formatted JSON string. This is useful for understanding the structure of the data programmatically or for API responses. ```python import json from immanuel import charts from immanuel.classes.serialize import ToJSON native = charts.Subject('2000-01-01 10:00', '32n43', '117w09') natal = charts.Natal(native) print(json.dumps(natal.native, cls=ToJSON, indent=4)) ``` -------------------------------- ### Creating Immanuel Chart Instance (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/README.md Demonstrates how to create a Subject instance representing a person or event using different input formats for date/time (string or datetime object) and coordinates (string or decimal), and then initialize a Natal chart instance from the Subject. It also shows how to iterate and print basic details of the chart objects. ```python from immanuel import charts native = charts.Subject( date_time='2000-01-01 10:00', latitude='32n43', longitude='117w09', ) # or, alternatively... from datetime import datetime native = charts.Subject( date_time=datetime(2000, 1, 1, 10, 0, 0), latitude=32.71667, longitude=-117.15, ) # and then... natal = charts.Natal(native) for object in natal.objects.values(): print(object) ``` -------------------------------- ### Setting Multiple Immanuel Settings (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet shows an alternative method for updating multiple configuration options simultaneously using the `settings.set()` method. It takes a dictionary where keys are string names of the settings and values are the desired configuration values (typically constants). This provides a concise way to apply several changes at once. ```python settings.set({ 'house_system': chart.CAMPANUS, 'mc_progression_method': calc.DAILY_HOUSES, }) ``` -------------------------------- ### Running Immanuel Library Tests (Bash) Source: https://github.com/theriftlab/immanuel-python/blob/master/README.md Provides the command to execute the automated tests for the Immanuel library using the pytest framework. This command is typically run from the project's root directory after cloning the repository to verify functionality. ```bash python -m pytest ``` -------------------------------- ### Changing Individual Immanuel Settings (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet demonstrates how to modify individual configuration options, such as `house_system` and `mc_progression_method`, by assigning new values directly to attributes of the `settings` object. It then creates `Natal` and `Progressed` chart objects to show that these changes affect subsequent chart calculations globally. Requires importing necessary modules and constants. ```python from immanuel import charts from immanuel.const import calc, chart from immanuel.setup import settings settings.house_system = chart.CAMPANUS native = charts.Subject('2000-01-01 10:00', '32n43', '117w09') # natal.houses will now use Campanus. natal = charts.Natal(native) settings.mc_progression_method = calc.DAILY_HOUSES # progressed.houses will now use Campanus, # and its progression method will be Daily Houses. progressed = charts.Progressed(native, '2025-06-20 17:00') ``` -------------------------------- ### Default Chart Data Setting Structure (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet displays the default structure of the `settings.chart_data` dictionary. It defines which data points (represented by `data.*` constants) are included by default for each chart type (represented by `chart.*` constants). Users can remove items from these lists to reduce the amount of data returned. ```python { chart.NATAL: [ data.NATIVE, data.HOUSE_SYSTEM, data.SHAPE, data.DIURNAL, data.MOON_PHASE, data.OBJECTS, data.HOUSES, data.ASPECTS, data.WEIGHTINGS, ], chart.SOLAR_RETURN: [ data.NATIVE, data.SOLAR_RETURN_YEAR, data.SOLAR_RETURN_DATE_TIME, data.PROGRESSION_METHOD, data.HOUSE_SYSTEM, data.SHAPE, data.DIURNAL, data.MOON_PHASE, data.OBJECTS, data.HOUSES, data.ASPECTS, data.WEIGHTINGS, ], chart.PROGRESSED: [ data.NATIVE, data.PROGRESSION_DATE_TIME, data.PROGRESSED_DATE_TIME, data.PROGRESSION_METHOD, data.HOUSE_SYSTEM, data.SHAPE, data.DIURNAL, data.MOON_PHASE, data.OBJECTS, data.HOUSES, data.ASPECTS, data.WEIGHTINGS, ], chart.COMPOSITE: [ data.NATIVE, data.PARTNER, data.HOUSE_SYSTEM, data.SHAPE, data.DIURNAL, data.MOON_PHASE, data.OBJECTS, data.HOUSES, data.ASPECTS, data.WEIGHTINGS, ], chart.TRANSITS: [ data.NATIVE, data.HOUSE_SYSTEM, data.SHAPE, data.DIURNAL, data.MOON_PHASE, data.OBJECTS, data.HOUSES, data.ASPECTS, data.WEIGHTINGS, ], } ``` -------------------------------- ### Serializing Entire Immanuel Chart to JSON (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/README.md Shows how to serialize the complete Natal chart instance, including all its properties like objects, houses, aspects, settings, etc., into a JSON string using the ToJSON serializer and Python's json library for easy data exchange. ```python print(json.dumps(natal, cls=ToJSON, indent=4)) ``` -------------------------------- ### Accessing Weightings Summary (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Demonstrates how to access the human-readable summary string for a specific weighting category (like 'elements') from the `natal.weightings` dictionary using the category name as the key. ```python print(natal.weightings['elements']) ``` -------------------------------- ### Defining Default Planet Aspect Rules - Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md Defines the default aspect rules for astrological planets. It uses the 'initiate' and 'receive' keys to specify which aspects are considered for planets initiating or receiving an aspect, defaulting to the values in `self.aspects`. ```python { 'initiate': self.aspects, 'receive': self.aspects, } ``` -------------------------------- ### Adding External Object to Immanuel Chart - Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet demonstrates how to configure Immanuel to load ephemeris files from a custom directory using `settings.add_filepath` and include an external object (like asteroid 1181) in a chart by adding its index to `settings.objects`. It then creates a natal chart and prints the data for the added object in JSON format. ```Python import json from immanuel import charts from immanuel.classes.serialize import ToJSON from immanuel.setup import settings settings.add_filepath('my/directory/path') settings.objects.append(1181) native = charts.Subject('2000-01-01 10:00', '32n43', '117w09') natal = charts.Natal(native) print(json.dumps(natal.objects[1181], cls=ToJSON, indent=4)) ``` -------------------------------- ### Defining Default Point Aspect Rules - Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md Defines the default aspect rules for calculated astrological points. It specifies 'CONJUNCTION' for initiating aspects and defaults to `self.aspects` for receiving aspects. ```python { 'initiate': (calc.CONJUNCTION,), 'receive': self.aspects, } ``` -------------------------------- ### Accessing Object Data by Constant in Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md This snippet demonstrates how to access the data for a specific astronomical object, the Sun, from the `objects` property of a calculated chart (`natal`). It uses the predefined constant `chart.SUN` as the key to retrieve the object's details. Requires a populated `natal` chart object. ```python print(natal.objects[chart.SUN]) ``` -------------------------------- ### Describing Immanuel Natal Chart Native JSON Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Illustrates the structure of the `native` property, containing detailed date/time and coordinate information for the chart's subject. It shows the format of the `date_time` and `coordinates` objects, which are consistent across the library. The `ambiguous` flag highlights how DST transitions are handled based on input parameters. ```json { "date_time": { "datetime": "2000-01-01 10:00:00-08:00", "timezone": "PST", "ambiguous": false, "julian": 2451545.25, "deltat": 0.0007387629899254968, "sidereal_time": "16:54:13" }, "coordinates": { "latitude": { "raw": 32.71666666666667, "formatted": "32N43.0", "direction": "+", "degrees": 32, "minutes": 43, "seconds": 0 }, "longitude": { "raw": -117.15, "formatted": "117W9.0", "direction": "-", "degrees": 117, "minutes": 9, "seconds": 0 } } } ``` -------------------------------- ### Serializing Immanuel Chart Objects to JSON (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/README.md Illustrates how to use the bundled ToJSON serializer class along with Python's json library to convert the chart's objects property (containing planets, points, etc.) into a detailed JSON format. It specifies an indent of 4 for pretty-printing the output. ```python import json from immanuel.classes.serialize import ToJSON from immanuel import charts native = charts.Subject( date_time='2000-01-01 10:00', latitude='32n43', longitude='117w09' ) natal = charts.Natal(native) print(json.dumps(natal.objects, cls=ToJSON, indent=4)) ``` -------------------------------- ### Adding Objects to Immanuel Chart (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/README.md Shows how to include additional astrological objects like asteroids (Ceres) in the chart calculation by appending them to the library's settings.objects list before creating the Natal chart instance. It then prints the updated list of objects demonstrating the addition. ```python from immanuel import charts from immanuel.const import chart from immanuel.setup import settings native = charts.Subject( date_time='2000-01-01 10:00', latitude='32n43', longitude='117w09' ) settings.objects.append(chart.CERES) natal = charts.Natal(native) for object in natal.objects.values(): print(object) ``` -------------------------------- ### Default Aspect Rule Setting (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet shows the default structure of the `settings.default_aspect_rule` dictionary. It defines the default behavior for chart objects regarding which aspects they can 'initiate' or 'receive'. By default, both lists inherit the global list of calculated aspects from the `settings.aspects` attribute. ```python { 'initiate': self.aspects, 'receive': self.aspects, } ``` -------------------------------- ### Showing Immanuel Natal Chart House System String Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Displays the simple string value returned by the `house_system` property, indicating the specific house division method used. This value reflects the setting configured for the chart generation. ```text "Placidus" ``` -------------------------------- ### Default Included Chart Objects List (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet shows the default list of astronomical objects included when calculating a chart, as defined by the `settings.objects` attribute. It includes common angles, nodes, planets, and key asteroids using constants from the `chart` module. Users can modify this list to include or exclude specific objects. ```python [ chart.ASC, chart.DESC, chart.MC, chart.IC, chart.TRUE_NORTH_NODE, chart.TRUE_SOUTH_NODE, chart.VERTEX, chart.PART_OF_FORTUNE, chart.TRUE_LILITH, chart.SUN, chart.MOON, chart.MERCURY, chart.VENUS, chart.MARS, chart.JUPITER, chart.SATURN, chart.URANUS, chart.NEPTUNE, chart.PLUTO, chart.CHIRON, ] ``` -------------------------------- ### Default Calculated Aspects List (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet provides the default list of astrological aspects that the library calculates between chart objects, as specified by the `settings.aspects` attribute. It includes common aspects represented by constants from the `calc` module. Modifying this list changes the set of aspects considered for all chart calculations. ```python [ calc.CONJUNCTION, calc.OPPOSITION, calc.SQUARE, calc.TRINE, calc.SEXTILE, calc.QUINCUNX, ] ``` -------------------------------- ### Accessing Aspect Data by Constants in Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md This snippet shows how to access the aspect information between two astronomical objects, the Sun and the Moon, from the `aspects` property of a calculated chart (`natal`). It uses the predefined constants `chart.SUN` and `chart.MOON` as keys to retrieve the aspect data. Requires a populated `natal` chart object with calculated aspects. ```python # chart.SUN = 4000001, chart.MOON = 4000002 print(natal.aspects[chart.SUN][chart.MOON]) ``` -------------------------------- ### Adding Fixed Star to Immanuel Objects (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet demonstrates how to add a specific fixed star to the list of objects included in chart calculations (`settings.objects`) by appending its name as a string to the list. This allows for the inclusion of fixed stars not part of the default set. ```python settings.objects.append('Antares') ``` -------------------------------- ### Accessing Specific Aspect Object (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Demonstrates how to access a specific aspect object (e.g., Sun-Moon) from the nested `natal.aspects` dictionary using the numerical indices corresponding to the two chart objects involved in the aspect. ```python print(natal.aspects[4000001][4000002]) ``` -------------------------------- ### Serializing Aspect Object to JSON (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Shows how to serialize a specific aspect object into a formatted JSON string using the `json.dumps` function with a custom `ToJSON` class and indentation for easier reading, allowing for detailed inspection of the object's properties. ```python print(json.dumps(natal.aspects[4000001][4000002], cls=ToJSON, indent=4)) ``` -------------------------------- ### Defining Gendered Translations in Gettext PO Files Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/7-contributions.md This snippet illustrates the method for providing gender-specific translations for a single message ID within a Gettext .po file. It utilizes the 'msgctxt' directive to specify the gender context (e.g., 'masculine', 'feminine'), allowing the same original string ('msgid') to have different translations ('msgstr') based on the grammatical gender required. ```Gettext msgctxt "masculine" msgid "Applicative" msgstr "Aplicativo" msgctxt "feminine" msgid "Applicative" msgstr "Aplicativa" ``` -------------------------------- ### Correctly Modifying Cascading Setting (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet illustrates the correct method for updating specific entries within a cascading setting like `settings.aspect_rules`. Instead of direct item assignment, you must assign a dictionary containing the desired updates to the attribute itself. The library will then merge these changes into the existing structure, locking in the specified rule for that entry. ```python settings.aspect_rules = { chart.ASC: settings.default_aspect_rule, } ``` -------------------------------- ### Representing Weightings Data Structure (JSON) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Illustrates the JSON structure of the `natal.weightings` property. It contains nested dictionaries for 'elements', 'modalities', and 'quadrants', where each category is a key mapping to a dictionary of subcategories (e.g., 'fire', 'earth') containing arrays of chart object indices. ```json { "elements": { "fire": [ 3000003, 6000003, 6000007, 4000004, 4000006, 4000010, 5000001 ], "earth": [ 3000002, 6000005, 6000009, 4000001, 4000003, 4000007 ], "air": [ 3000004, 6000004, 4000005, 4000008, 4000009 ], "water": [ 3000001, 4000002 ] }, "modalities": { "cardinal": [ 6000009, 4000001, 4000003, 4000006 ], "fixed": [ 6000003, 6000004, 4000002, 4000005, 4000007, 4000008, 4000009 ], "mutable": [ 3000001, 3000002, 3000003, 3000004, 6000005, 6000007, 4000004, 4000010, 5000001 ] }, "quadrants": { "first": [ 3000001, 4000006, 4000007 ], "second": [ 3000004, 6000003 ], "third": [ 3000002, 6000005, 6000007, 4000002, 4000004, 4000010, 5000001 ], "fourth": [ 3000003, 6000004, 6000009, 4000001, 4000003, 4000005, 4000008, 4000009 ] } } ``` -------------------------------- ### Default Chart Shape Objects List (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet presents the default list of astronomical objects used by the library to calculate a chart's overall shape, as defined by the `settings.chart_shape_objects` attribute. By default, this includes the classical planets. Users can modify this list to change which objects are considered for shape analysis. ```python [ chart.SUN, chart.MOON, chart.MERCURY, chart.VENUS, chart.MARS, chart.JUPITER, chart.SATURN, chart.URANUS, chart.NEPTUNE, chart.PLUTO, ] ``` -------------------------------- ### Defining Default Chart Object Orbs - Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md Defines the default orb dictionary for each specific chart object (planets, points, angles). Objects not listed default to `default_orb`. It assigns the planet orbs to planets and the point orbs to calculated points and angles. ```python { chart.ASC: self.planet_orbs, chart.DESC: self.planet_orbs, chart.MC: self.planet_orbs, chart.IC: self.planet_orbs, chart.SUN: self.planet_orbs, chart.MOON: self.planet_orbs, chart.MERCURY: self.planet_orbs, chart.VENUS: self.planet_orbs, chart.MARS: self.planet_orbs, chart.JUPITER: self.planet_orbs, chart.SATURN: self.planet_orbs, chart.URANUS: self.planet_orbs, chart.NEPTUNE: self.planet_orbs, chart.PLUTO: self.planet_orbs, chart.NORTH_NODE: self.point_orbs, chart.SOUTH_NODE: self.point_orbs, chart.TRUE_NORTH_NODE: self.point_orbs, chart.TRUE_SOUTH_NODE: self.point_orbs, chart.SYZYGY: self.point_orbs, chart.PART_OF_FORTUNE: self.point_orbs, chart.PART_OF_SPIRIT: self.point_orbs, chart.PART_OF_EROS: self.point_orbs, chart.VERTEX: self.point_orbs, chart.LILITH: self.point_orbs, chart.TRUE_LILITH: self.point_orbs, chart.INTERPOLATED_LILITH: self.point_orbs, } ``` -------------------------------- ### Defining Default Dignity Scores - Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md Specifies the default numerical scores assigned to various astrological dignities and mutual receptions. These scores are based on Astro Gold's system and are used to calculate a planet's overall dignity state. ```python { dignities.RULER: 5, dignities.EXALTED: 4, dignities.TRIPLICITY_RULER: 3, dignities.TERM_RULER: 2, dignities.FACE_RULER: 1, dignities.MUTUAL_RECEPTION_RULER: 5, dignities.MUTUAL_RECEPTION_EXALTED: 4, dignities.MUTUAL_RECEPTION_TRIPLICITY_RULER: 3, dignities.MUTUAL_RECEPTION_TERM_RULER: 2, dignities.MUTUAL_RECEPTION_FACE_RULER: 1, dignities.DETRIMENT: -5, dignities.FALL: -4, dignities.PEREGRINE: -5, } ``` -------------------------------- ### Describing Immanuel Natal Chart Moon Phase JSON Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Details the JSON structure of the `moon_phase` object, which includes boolean flags for the eight traditional moon phases and a human-readable formatted string for the current phase. This structure is a common pattern for properties representing discrete states. ```json { "new_moon": false, "waxing_crescent": false, "first_quarter": false, "waxing_gibbous": false, "full_moon": false, "disseminating": false, "third_quarter": true, "balsamic": false, "formatted": "Third Quarter" } ``` -------------------------------- ### Representing Aspect Data Structure (JSON) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Illustrates the JSON structure used to represent aspects data. It's a nested dictionary where the outer keys are indices of objects with aspects, and the inner keys are indices of the objects they aspect, with the values being placeholders for aspect objects. ```json { "3000001": { "4000005": }, "3000003": { "6000007": , "4000010": , "5000001": }, "6000003": { "4000004": }, "6000004": { "4000004": , "4000009": }, "6000009": { "4000001": , "4000007": }, "6000007": { "3000003": , "4000010": }, "4000001": { "6000009": , "4000002": , "4000003": , "4000007": }, "4000002": { "4000001": , "4000007": , "4000008": }, "4000003": { "4000001": , "4000005": , "4000006": , "4000007": }, "4000004": { "6000003": , "6000004": , "4000005": , "4000009": , "4000010": }, "4000005": { "3000001": , "4000003": , "4000004": , "4000006": }, "4000006": { "4000003": , "4000005": , "4000009": }, "4000007": { "6000009": , "4000001": , "4000002": , "4000003": , "4000008": , "4000009": , "4000010": , "5000001": }, "4000008": { "4000002": , "4000007": , "4000010": , "5000001": }, "4000009": { "6000004": , "4000004": , "4000006": , "4000007": }, "4000010": { "3000003": , "6000007": , "4000004": , "4000007": , "4000008": , "5000001": }, "5000001": { "3000003": , "4000007": , "4000008": , "4000010": } } ``` -------------------------------- ### Defining Default Planet Aspect Orbs - Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md Specifies the default orb (maximum angle difference) for each aspect type when applied to planets. These values are used unless overridden for specific objects. ```python { calc.CONJUNCTION: 10.0, calc.OPPOSITION: 10.0, calc.SQUARE: 10.0, calc.TRINE: 10.0, calc.SEXTILE: 6.0, calc.SEPTILE: 3.0, calc.SEMISQUARE: 3.0, calc.SESQUISQUARE: 3.0, calc.SEMISEXTILE: 3.0, calc.QUINCUNX: 3.0, calc.QUINTILE: 2.0, calc.BIQUINTILE: 2.0, } ``` -------------------------------- ### Merging Changes to Cascading Setting (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet shows using the dictionary merge operator (`|=`) to update a cascading setting. While functionally merging the dictionary, the documentation warns that this specific operation reads and then re-writes all existing entries in the cascading setting, effectively locking them in and preventing them from inheriting further cascading changes. ```python settings.aspect_rules |= { chart.ASC: settings.default_aspect_rule, } ``` -------------------------------- ### Incorrectly Modifying Cascading Setting (Python) Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md This snippet demonstrates an attempt to modify a specific sub-entry within a cascading setting (`settings.aspect_rules`) using standard dictionary item assignment. The documentation notes that this approach will silently fail for these types of attributes due to the internal mechanisms handling cascading behavior. ```python settings.aspect_rules[chart.ASC] = settings.default_aspect_rule ``` -------------------------------- ### Defining Default Point Aspect Orbs - Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md Specifies the default orb (maximum angle difference) for each aspect type when applied to calculated points. Default orbs are set to 0.0 for these points. ```python { calc.CONJUNCTION: 0.0, calc.OPPOSITION: 0.0, calc.SQUARE: 0.0, calc.TRINE: 0.0, calc.SEXTILE: 0.0, calc.SEPTILE: 0.0, calc.SEMISQUARE: 0.0, calc.SESQUISQUARE: 0.0, calc.SEMISEXTILE: 0.0, calc.QUINCUNX: 0.0, calc.QUINTILE: 0.0, calc.BIQUINTILE: 0.0, } ``` -------------------------------- ### Showing Immanuel Natal Chart Diurnal Boolean Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Shows the boolean value of the `diurnal` property, which is `true` if the chart represents a daytime birth (Sun above the horizon) and `false` for a nighttime birth. ```text true ``` -------------------------------- ### Defining Default Chart Object Aspect Rules - Python Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/5-settings.md Defines the default aspect rule dictionary for each specific chart object (planets, points, angles). Objects not listed default to `default_aspect_rule`. It typically assigns `planet_aspect_rule` to planets and `point_aspect_rule` to points and angles. ```python { chart.ASC: self.point_aspect_rule, chart.DESC: self.point_aspect_rule, chart.MC: self.point_aspect_rule, chart.IC: self.point_aspect_rule, chart.SUN: self.planet_aspect_rule, chart.MOON: self.planet_aspect_rule, chart.MERCURY: self.planet_aspect_rule, chart.VENUS: self.planet_aspect_rule, chart.MARS: self.planet_aspect_rule, chart.JUPITER: self.planet_aspect_rule, chart.SATURN: self.planet_aspect_rule, chart.URANUS: self.planet_aspect_rule, chart.NEPTUNE: self.planet_aspect_rule, chart.PLUTO: self.planet_aspect_rule, chart.NORTH_NODE: self.point_aspect_rule, chart.SOUTH_NODE: self.point_aspect_rule, chart.TRUE_NORTH_NODE: self.point_aspect_rule, chart.TRUE_SOUTH_NODE: self.point_aspect_rule, chart.SYZYGY: self.point_aspect_rule, chart.PART_OF_FORTUNE: self.point_aspect_rule, chart.PART_OF_SPIRIT: self.point_aspect_rule, chart.PART_OF_EROS: self.point_aspect_rule, chart.VERTEX: self.point_aspect_rule, chart.LILITH: self.point_aspect_rule, chart.TRUE_LILITH: self.point_aspect_rule, chart.INTERPOLATED_LILITH: self.point_aspect_rule, } ``` -------------------------------- ### Showing Immanuel Natal Chart Shape String Source: https://github.com/theriftlab/immanuel-python/blob/master/docs/4-data.md Presents the string value representing the calculated overall geometrical shape formed by the specified celestial objects in the chart. The objects included and orb used are configurable via settings. ```text "Bowl" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.