Natal MicroService

image info

The Natal Chart microservice is an integral feature of the Falomen app, offering users a deep dive into astrological analysis based on the exact moment of their birth. This service constructs a detailed astrological chart that maps the positions of the planets, the sun, and the moon, along with the astrological houses, at the time of the user's birth. Utilizing advanced AI algorithms, this microservice interprets these celestial positions to provide insights into personality traits, potential life paths, and future trends that align with astrological predictions. The Natal Chart microservice is designed to cater to both astrology enthusiasts and newcomers by providing a comprehensive yet understandable analysis. It breaks down complex astrological aspects into actionable insights, offering a personalized exploration of how celestial bodies influence an individual's character, relationships, career, and other life areas. This service considers the intricate details of astrological signs, houses, and planetary aspects to deliver a nuanced and holistic view of the user's life and potential future directions. By offering this detailed astrological analysis, the Natal Chart microservice enriches the Falomen app's suite of fortune-telling features, allowing users to explore the impact of astrology on their personal identity and life journey. It embodies the app's commitment to blending traditional divinatory practices with cutting-edge technology, providing a unique platform for self-discovery and personal growth.


1) Requirements:

  • grpcio==1.62.0
  • grpcio-tools==1.59.0
  • pandas==2.0.1
  • numpy==1.23.5
  • prometheus_client==0.18.0
  • matplotlib==3.7.1
  • kerykeion==3.4.2
  • scikit-image==0.21.0
  • scikit_learn==1.2.2
  • openpyxl==3.1.2
  • minio == 7.2.3
  • arabic-reshaper == 3.0.0
  • python-bidi == 0.4.2
  • python-dotenv == 1.0.0
  • grpcio-reflection==1.62.0

2) API Documentation:

3) Assets:

  • gRPC Proto Files:
    • Falomen.proto
    • Falomen_pb2.py
    • Falomen_pb2_grpc.py
  • JSON Files:
    • Natal_Brief_Traits.json : Brief Traints for Natal Chart
    • natal_chart_score.json : Natal Chart Scoring Dictionery File
    • Natal_Cats.json : Natal Chart Category Names Dictionery File
    • multilingual_Cats.json : Natal Chart Multilingual Scoring Dictionery File
    • chart_config.json : Charts Config Parameters
  • Images:
    • first_ar.png : Natal Radar Chart Background Image in Arabic Language
    • first_en.png : Natal Radar Chart Background Image in English Language
    • first_fa.png : Natal Radar Chart Background Image in Farsi Language
    • first_tr.png : Natal Radar Chart Background Image in Turkish Language

4) Modules:

  • 4-1) Horoscope.py

    • Classes:

      horoscope
      A class to Calculate Natal Chart, Transit Chart and composit chart scores and planet aspects

      Attributes:
      • chart (function): kerykeion "MakeSvgInstance" functions output
      • cat_name (str): Main Category Name in each chart Type (ex. "Romance", "Financial", "Career", ...)
      • subcat_name(str): SubCategory Name in each Main Category
      • chart_type: Chart Type ("Natal", "Transit" or "Composite")
      • subcat_planets (list): Important Planets list in each SubCategory
      • subcat_houses (list): Important Houses list in each SubCategory
      • User_name_1 (str): Input User Name
      • background (int): Background image Number used for Radar Chart (1: for Transit Radar Chart Background , 2: for Natal Radar Chart Background)
      • label_height (int): Height of Labels in Radar Chart

      • Methods:

        • chart_score()
          Claculates Chart Score based on Planets Placement in each subCategory

          Attributes:

          • cat_name (str): Main Category Name in each chart Type (ex. "Romance", "Financial", "Career", ...)
          • subcat_name(str): SubCategory Name in each Main Category
          • chart (function): kerykeion "MakeSvgInstance" functions output
          • chart_type: Chart Type ("Natal", "Transit" or "Composite")
          • subcat_planets (list): Important Planets list in each SubCategory
          • subcat_houses (list): Important Houses list in each SubCategory

          • return (int): Chart Score based on Planets Placement in each subCategory

        • radar_plot_natal()
          Plots Radar Chart for input Chart Types

          Attributes:

          • User_name_1 (str): Input User Name
          • sub_category (list): SubCategory Name list in each Main Category
          • sub_category_score (list): Score list calculated for each SubCategory
          • background (int): Background image Number used for Radar Chart (1: for Transit Radar Chart Background , 2: for Natal Radar Chart Background)
          • label_height (int): Height of Labels in Radar Chart

          • return (url): URL of save Radar Chart

        • Natal_Brief_Report()
          Generates Brief Report for Natal Radar Chart

          Attributes:

          • User_name_1 (str): Input User Name
          • final_score (list): List of Normalized Final Score for each SubCategory
          • input_language (str): User prefered language ("fa": for Persian, "tr": for Turkish, "en": for english, "arb": for arabic,)

          • return (list): Returns list of Brief Translated Report for Natal chart Analysis

        • get_horoscope_natal()
          Main Function to Calculate Natal Chart Total Scores(placement_aspect) in each subCategory

          Attributes:

          • User_name_1 (str): Input User Name
          • Birthyear_1 (int): Input User Birth Year
          • BirthMonth_1 (int): Input User Birth Month
          • BirthDay_1 (int): Input User Birth Day
          • BirthHour_1 (int): Input User Birth Houre
          • BirthMin_1 (int): Input User Birth Minute
          • BirthCity_1 (int): Input User City
          • input_language (str): User prefered language ("fa": for Persian, "tr": for Turkish, "en": for english, "arb": for arabic)

          • return (list): Returns Saved Radar Chart file URL and Brief Translated Report for Natal chart Analysis

  • 4-2) minio_client.py

    • Methods:

      • upload_file_to_minio()
        This method is used to upload files to minio Storage

        Attributes:
        • bucket_name (str): Bucket name on minio storage
        • object_name (str): Object name on minio storage
        • file_path (str): File Path on Local Storage
        • return (str): urn of uploaded file on minio storage

      • download_file_from_minio()
        This Methos is used to download files from minio Storage

        Attributes:
        • bucket_name (str): Bucket name on minio storage
        • object_name (str): Object name on minio storage
        • file_path (str): Path to save downloaded file on Local Storage
        • return (str): urn of downloaded file on minio storage