Skip to main content

Generate and plot North-Indian Lagna Kundali charts using pyswisseph. Flexible astrokundali package with Different house calculation methods and interpretation JSONs

Project description

astrokundali

  • version = "0.1.2"
  • description = "Flexible astrokundali package with Different house calculation methods and interpretation JSONs"
  • authors = name="Mirjan Ali Sha"
  • requires-python = ">=3.7"

Request: If anyone would like to collaborate or discuss new features, please send me an email. I will get in touch with you.
If you want access to this project's source code, please do the same. I am planning to make this project fully open source in the near future.


USER OPTIONS

Ayanāṃśa Options

  • fagan_bradley
    Fagan–Bradley Ayanāṃśa: a Western sidereal offset fixed at 24°02′31″ (January 1 1950) and widely used in Western sidereal astrology.

  • lahiri (default)
    Lahiri (Chitra‑Paksha/Rohini) Ayanāṃśa: India’s official Vedic ayanāṃśa, zeroed at Spica (Chitra), and by far the most prevalent in Hindu astrology.

  • deluce
    de Luce Ayanāṃśa: proposed by Robert DeLuce (1877–1964), theoretically set to 1 CE but in practice anchored to ~26°24′47″ (1900) using Newcomb’s precession theory.

  • raman
    Raman Ayanāṃśa: introduced by B. V. Raman to better align with traditional nakṣatra positions, favored by his school of Vedic astrology.

  • krishnamurti
    Krishnamurti (KP) Ayanāṃśa: developed by K. S. Krishnamurti for the KP system, emphasizing precise divisional‑chart timing.

  • sassanian
    Sassanian Ayanāṃśa: reconstructs pre‑Islamic Persian/Sassanian zodiac data (via Al‑Biruni), often used with whole‑sign houses for ancient chart revival.

  • aldebaran
    Aldebaran Ayanāṃśa: fixes zero at the bright star Aldebaran (15° Taurus), popular in fixed‑star and esoteric charting.

  • galcenter
    Galcenter Ayanāṃśa: anchors the zodiac at the Milky Way’s center (~5° Sagittarius), used in modern “galactic” sidereal astrology.

House‑System Options

  • equal
    Equal Houses: twelve 30° houses measured from the exact Ascendant degree, offering simplicity and uniformity across latitudes.

  • whole_sign (default)
    Whole‑Sign: the sign containing the Ascendant becomes the 1st house, the next sign the 2nd, etc.; the oldest division from Hellenistic to Vedic traditions.

  • porphyry
    Porphyry: each quadrant (Ascendant→MC, MC→Descendant, etc.) is trisected into three equal parts, creating houses by trisection of angle arcs; described by Vettius Valens in the 2nd CE.

  • placidus
    Placidus: the most common Western quadrant system, trisecting diurnal/nocturnal arcs between the four angles to set cusps; can fail near polar circles.

  • koch
    Koch: a time‑based quadrant method dividing right‑ascension arcs equally between angles; popular in research and German circles, defined only within ~66° latitude.

  • campanus
    Campanus: divides the prime vertical into twelve equal segments, projecting them onto the ecliptic; emphasizes Earth‑centered spatial divisions.

  • regiomontanus
    Regiomontanus: splits the celestial equator into twelve equal arcs then projects those onto the ecliptic; a medieval Renaissance favorite attributed to Johann Müller.

Example Usage

  pip install astrokundali
  or
  !pip install astrokundali [Notebook]
    

Configure AstroData

    from astrokundali import AstroData
    data = AstroData(2009,3,30,9,36,0,5,30,19.0760,72.8777,ayanamsa='lahiri')
  

Plot Lagna Chart

    from astrokundali import plot_lagna_chart
    houses = plot_lagna_chart(data, house_system= 'whole_sign') 
      or 
    houses = plot_lagna_chart(data) 
  

Plot Moon/Chandra Chart

from astrokundali import plot_moon_chart
houses = plot_moon_chart(data, house_system= 'whole_sign')
or
houses = plot_moon_chart(data)
Plot Navamsa/Navamsha/D9 Chart

    from astrokundali import plot_navamsa_chart
    houses = plot_navamsa_chart(data, house_system= 'whole_sign') 
      or 
    houses = plot_navamsa_chart(data)
  

Read Astrokundali House Objects

   from astrokundali import format_houses        
   import json
   readable = format_houses(houses) 
   print(json.dumps(readable, indent=2))
  

Get Planetary Positions and Dispositions

    from astrokundali import get_dispositions
    import json
    disp = get_dispositions(data, house_system= 'whole_sign')
      or
    disp = get_dispositions(data)
    print(json.dumps(report, ensure_ascii=False, indent=2)) 
  

Get Interpretation Report

    from astrokundali import generate_report, json_sanitize
    import json
    report  = json_sanitize(generate_report(data, house_system= 'whole_sign'))
      or
    report  = json_sanitize(generate_report(data))
    print(json.dumps(report, ensure_ascii=False, indent=2))
  
  • to use json_sanitize function please install ftfy using pip install ftfy
    Marriage Matching
    from astrokundali import AstroData, match_kundli
    boy = AstroData(1990,1,1,10,0,0,5,30,19.07,72.88)
    girl = AstroData(1992,6,15,16,30,0,5,30,28.61,77.23)
    from pprint import pprint
    pprint(match_kundli(boy, girl))
      or
    from astrokundali import AstroData, match_kundli
    boy = AstroData(1990,1,1,10,0,0,5,30,19.07,72.88,ayanamsa='lahiri')
    girl = AstroData(1992,6,15,16,30,0,5,30,28.61,77.23,ayanamsa='lahiri')
    from pprint import pprint
    pprint(match_kundli(boy, girl, house_system= 'whole_sign')) [Version should be >=0.2.1]
  

Format Match Table in Pandas DataFrame

    from astrokundali import AstroData, match_kundli
    boy = AstroData(1990,1,1,10,0,0,5,30,19.07,72.88)
    girl = AstroData(1992,6,15,16,30,0,5,30,28.61,77.23)
    astro_match = match_kundli(boy, girl)
    print(astro_match['interpretation'])
    import pandas as pd
    df = pd.DataFrame(astro_match['table'])
    df
  

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astrokundali-0.2.2.tar.gz (46.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astrokundali-0.2.2-py3-none-any.whl (53.0 kB view details)

Uploaded Python 3

File details

Details for the file astrokundali-0.2.2.tar.gz.

File metadata

  • Download URL: astrokundali-0.2.2.tar.gz
  • Upload date:
  • Size: 46.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for astrokundali-0.2.2.tar.gz
Algorithm Hash digest
SHA256 b7daaa6c1d3fe9befd4356736588fc0bdf554704533f2add416672fc80537822
MD5 acfb61abdbbb78ba8d574dd88db580a2
BLAKE2b-256 990f22816953440128ca0740358c1f5ebcb7ceaa6ba5e49e3da554dcb76f2d9d

See more details on using hashes here.

File details

Details for the file astrokundali-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: astrokundali-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 53.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for astrokundali-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 70564edb25603b0751a737d16f6c5bcc1da1762e720a0988fb25cbf2fca9996a
MD5 842e46c14b6c2e6c946e365407e19b1a
BLAKE2b-256 057e3a8e8a73a198b02fc51ae0037c221029e4f4967dc01fe5031c39ac90a787

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page