{"id":3399,"date":"2024-06-08T18:44:23","date_gmt":"2024-06-08T13:14:23","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=3399"},"modified":"2024-06-08T18:44:23","modified_gmt":"2024-06-08T13:14:23","slug":"kp-astrology-rest-server-part-2","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/","title":{"rendered":"KP Astrology REST Server: Part 2"},"content":{"rendered":"<p>In my earlier <a href=\"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/\" target=\"_blank\" rel=\"noopener\"><em><strong>article<\/strong><\/em><\/a>, I had briefly described the REST server I wanted to build for <em><strong>Krishnamurti Padhdhati<\/strong> <\/em>system of astrology. After a long time I have managed to complete the implementation and it is now ready for deployment.<\/p>\n<p>In this article, I will go over some of its features with the hope it will be useful to developers interested in building astrology applications, in particular, using the <em><strong>KP<\/strong><\/em> System.<\/p>\n<h3>KPRest: A REST Engine<\/h3>\n<p>The product is named <em><strong>\u201cKPRest\u201d<\/strong><\/em> and as the name suggests, it is a REST server engine. The core engine is written in <em><strong>C++<\/strong><\/em> and is based on my astrology software called <a href=\"https:\/\/www.kpastrosoftware.com\" target=\"_blank\" rel=\"noopener\"><em><strong>\u201cKPAstro\u201d<\/strong><\/em><\/a>. <em><strong>KPAstro<\/strong><\/em> is hugely popular among <em><strong>KP<\/strong><\/em> system followers and has users in many countries across the world. The inspiration for developing the REST engine was the many requests I received from application developers who wanted to build interesting astrology applications using the KP System, but who did not have the basic resource or the time to build the core astrology engine. <em><strong>KPRest<\/strong><\/em> solves this problem elegantly.<\/p>\n<p>Let us get back to the product. This is a <em><strong>Windows-based<\/strong><\/em> product and when you launch it, this is the startup screen:<\/p>\n<figure id=\"attachment_3400\" aria-describedby=\"caption-attachment-3400\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/Start.jpg?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"3400\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/start\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/Start.jpg\" data-orig-size=\"601,348\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1717748268&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"KPRest Application Window\" data-image-description=\"&lt;p&gt;KPRest Application Window&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;KPRest Application Window&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/Start.jpg\" class=\"wp-image-3400\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/Start.jpg?resize=500%2C290&#038;ssl=1\" alt=\"KPRest Application Window\" width=\"500\" height=\"290\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/Start.jpg?resize=300%2C174&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/Start.jpg?w=601&amp;ssl=1 601w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-3400\" class=\"wp-caption-text\"><em><strong>KPRest Application Window<\/strong><\/em><\/figcaption><\/figure>\n<p>To start the server, click <em><strong>\u201cStart\u201d<\/strong><\/em>. If you want to test the product in your browser, click <em><strong>\u201cOpen Browser\u201d<\/strong><\/em>. This will launch the default browser, which connects to the server and displays the initial message from the engine.<\/p>\n<figure id=\"attachment_3401\" aria-describedby=\"caption-attachment-3401\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/welcome.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"3401\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/welcome\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/welcome.jpg\" data-orig-size=\"867,259\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1717748485&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Welcome Message in Browser\" data-image-description=\"&lt;p&gt;Welcome Message in Browser&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Welcome Message in Browser&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/welcome.jpg\" class=\"wp-image-3401\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/welcome.jpg?resize=500%2C149&#038;ssl=1\" alt=\"Welcome Message in Browser\" width=\"500\" height=\"149\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/welcome.jpg?resize=300%2C90&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/welcome.jpg?resize=768%2C229&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/welcome.jpg?w=867&amp;ssl=1 867w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-3401\" class=\"wp-caption-text\"><strong>Welcome Message in Browser<\/strong><\/figcaption><\/figure>\n<p>Let us say that we want to create a <em><strong>Natal<\/strong><\/em> chart. The request is made using the query <em><strong>\u201c\/natal\u201d<\/strong><\/em> with the following additional parameters (the values are just for example):<\/p>\n<p style=\"padding-left: 40px;\"><strong>Day = 13, Month = 6, Year = 1965<\/strong><\/p>\n<p style=\"padding-left: 40px;\"><strong>Hour = 10, Min = 30, Sec = 20<\/strong><\/p>\n<p style=\"padding-left: 40px;\"><strong>Latitude = 28:36:0 North<\/strong><\/p>\n<p style=\"padding-left: 40px;\"><strong>Longitude = 77:12:0 East<\/strong><\/p>\n<p style=\"padding-left: 40px;\"><strong>Standard Time, Time zone = GMT +5.5 hrs, Daylight Savings = 0<\/strong><\/p>\n<p>This could be entered as part of the <em><strong>URL<\/strong><\/em> as under:<\/p>\n<figure id=\"attachment_3402\" aria-describedby=\"caption-attachment-3402\" style=\"width: 550px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/natal.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"3402\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/natal\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/natal.jpg\" data-orig-size=\"1475,259\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1717748600&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Creating Natal Chart in Browser\" data-image-description=\"&lt;p&gt;Creating Natal Chart in Browser&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Creating Natal Chart in Browser&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/natal-1024x180.jpg\" class=\"wp-image-3402\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/natal.jpg?resize=550%2C97&#038;ssl=1\" alt=\"Creating Natal Chart in Browser\" width=\"550\" height=\"97\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/natal.jpg?resize=300%2C53&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/natal.jpg?resize=1024%2C180&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/natal.jpg?resize=768%2C135&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/natal.jpg?w=1475&amp;ssl=1 1475w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><figcaption id=\"caption-attachment-3402\" class=\"wp-caption-text\"><strong>Creating Natal Chart in Browser<\/strong><\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>The system responds with an <em><strong>\u201cOK\u201d<\/strong><\/em>message.<\/p>\n<p>Once the chart is created, we can send other requests to the server, for example, to get the <em><strong>Planets\u2019<\/strong><\/em> positional details, <em><strong>Significators<\/strong><\/em>, <em><strong>Aspects<\/strong><\/em>, <em><strong>Bala<\/strong><\/em>, etc. Each request has a unique <em><strong>URL<\/strong><\/em> end point.<\/p>\n<p>Instead of interacting with the server via the <em><strong>Browser<\/strong><\/em>, it is more convenient to write a client application. Following this idea, I have implemented a <em><strong>Python<\/strong><\/em> program to interact with the <em><strong>REST<\/strong><\/em> server.<\/p>\n<p>Here is a sample output from the <em><strong>Python<\/strong><\/em> program. It creates a <em><strong>Natal<\/strong><\/em> chart (as we did in the <em><strong>Browser<\/strong><\/em>), prints the chart details for verification and fetches the <em><strong>Day Lord<\/strong><\/em>, <em><strong>Thithi<\/strong><\/em>, <em><strong>Hora<\/strong><\/em>, <em><strong>Karana<\/strong><\/em>, and <em><strong>Nithya Yoga<\/strong><\/em>:<\/p>\n<figure id=\"attachment_3403\" aria-describedby=\"caption-attachment-3403\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/run1.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3403\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/run1-4\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/run1.jpg\" data-orig-size=\"849,331\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1717749048&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Creating Chart in Python Client\" data-image-description=\"&lt;p&gt;Creating Chart in Python Client&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Creating Chart in Python Client&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/run1.jpg\" class=\"wp-image-3403\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/run1.jpg?resize=500%2C195&#038;ssl=1\" alt=\"Creating Chart in Python Client\" width=\"500\" height=\"195\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/run1.jpg?resize=300%2C117&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/run1.jpg?resize=768%2C299&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/run1.jpg?w=849&amp;ssl=1 849w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-3403\" class=\"wp-caption-text\"><em><strong>Creating Chart in Python Client<\/strong><\/em><\/figcaption><\/figure>\n<p>Here is the code fragment for creating <em><strong>Natal<\/strong><\/em> and <em><strong>Horary<\/strong><\/em> charts:<\/p>\n<figure id=\"attachment_3404\" aria-describedby=\"caption-attachment-3404\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-chartcreation.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3404\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/code-chartcreation\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-chartcreation.jpg\" data-orig-size=\"1159,347\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1717749916&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Creating Charts in Python\" data-image-description=\"&lt;p&gt;Creating Charts in Python&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Creating Charts in Python&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-chartcreation-1024x307.jpg\" class=\"wp-image-3404\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-chartcreation.jpg?resize=500%2C150&#038;ssl=1\" alt=\"Creating Charts in Python\" width=\"500\" height=\"150\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-chartcreation.jpg?resize=300%2C90&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-chartcreation.jpg?resize=1024%2C307&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-chartcreation.jpg?resize=768%2C230&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-chartcreation.jpg?w=1159&amp;ssl=1 1159w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-3404\" class=\"wp-caption-text\"><strong>Code for Creating Charts in Python<\/strong><\/figcaption><\/figure>\n<p>The detailed information regarding various planets such as <em><strong>Position<\/strong><\/em>, <em><strong>Sign<\/strong><\/em>, <em><strong>House<\/strong><\/em>, <em><strong>Star<\/strong><\/em>, and the <em><strong>lords<\/strong><\/em> (<em><strong>Sign\/Star, Sub, Subsub, S3, and S4<\/strong><\/em>) can be retrieved.<\/p>\n<figure id=\"attachment_3405\" aria-describedby=\"caption-attachment-3405\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-details.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3405\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/planet-details\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-details.jpg\" data-orig-size=\"892,414\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1717749476&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Planetary Details\" data-image-description=\"&lt;p&gt;Planetary Details&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Planetary Details&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-details.jpg\" class=\"wp-image-3405\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-details.jpg?resize=500%2C232&#038;ssl=1\" alt=\"Planetary Details\" width=\"500\" height=\"232\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-details.jpg?resize=300%2C139&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-details.jpg?resize=768%2C356&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-details.jpg?w=892&amp;ssl=1 892w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-3405\" class=\"wp-caption-text\"><strong>Planetary Details<\/strong><\/figcaption><\/figure>\n<p><em><strong>Western Aspects<\/strong><\/em> between planets can also be obtained from the server. Here is a sample:<\/p>\n<figure id=\"attachment_3406\" aria-describedby=\"caption-attachment-3406\" style=\"width: 400px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-western-aspects.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3406\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/planet-western-aspects\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-western-aspects.jpg\" data-orig-size=\"570,357\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1717749696&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Western Aspects Between Planets\" data-image-description=\"&lt;p&gt;Western Aspects Between Planets&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Western Aspects Between Planets&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-western-aspects.jpg\" class=\"wp-image-3406\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-western-aspects.jpg?resize=400%2C251&#038;ssl=1\" alt=\"Western Aspects Between Planets\" width=\"400\" height=\"251\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-western-aspects.jpg?resize=300%2C188&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/planet-western-aspects.jpg?w=570&amp;ssl=1 570w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><figcaption id=\"caption-attachment-3406\" class=\"wp-caption-text\"><strong>Western Aspects Between Planets<\/strong><\/figcaption><\/figure>\n<p>Although it is not directly used in <em><strong>KP<\/strong><\/em> System, many astrologers make use of <em><strong>\u201cBala\u201d<\/strong><\/em> in their analysis. <em><strong>KPRest<\/strong><\/em> engine can calculate this too. Here is the <em><strong>Python<\/strong><\/em> code to get it from the server:<\/p>\n<figure id=\"attachment_3407\" aria-describedby=\"caption-attachment-3407\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-bala.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3407\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/code-bala\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-bala.jpg\" data-orig-size=\"687,427\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1717787760&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Python Code for Retrieving Bala\" data-image-description=\"&lt;p&gt;Python Code for Retrieving Bala&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Python Code for Retrieving Bala&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-bala.jpg\" class=\"wp-image-3407\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-bala.jpg?resize=500%2C311&#038;ssl=1\" alt=\"Python Code for Retrieving Bala\" width=\"500\" height=\"311\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-bala.jpg?resize=300%2C186&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/code-bala.jpg?w=687&amp;ssl=1 687w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-3407\" class=\"wp-caption-text\"><strong>Python Code for Retrieving Bala<\/strong><\/figcaption><\/figure>\n<p>Here is the output from the program:<\/p>\n<figure id=\"attachment_3408\" aria-describedby=\"caption-attachment-3408\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/bala.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3408\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2024\/06\/08\/kp-astrology-rest-server-part-2\/bala\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/bala.jpg\" data-orig-size=\"1167,202\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1717749752&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Bala Output from Program\" data-image-description=\"&lt;p&gt;Bala Output from Program&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Bala Output from Program&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/bala-1024x177.jpg\" class=\"wp-image-3408\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/bala.jpg?resize=500%2C87&#038;ssl=1\" alt=\"Bala Output from Program\" width=\"500\" height=\"87\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/bala.jpg?resize=300%2C52&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/bala.jpg?resize=1024%2C177&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/bala.jpg?resize=768%2C133&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2024\/06\/bala.jpg?w=1167&amp;ssl=1 1167w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-3408\" class=\"wp-caption-text\"><strong>Bala Output from Program<\/strong><\/figcaption><\/figure>\n<p>There is a lot more that we can ask the engine to provide. As I mentioned earlier, the engine supports <em><strong>Natal<\/strong><\/em> as well as <em><strong>Horary<\/strong><\/em> (1 to 2193) charts. <span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>If you are interested to know more about the engine and how it will be useful to you as a software developer, feel free to contact me at <em><strong>ranga@mmsindia.com<\/strong><\/em> or <em><strong>ranga@kpastrosoftware.com<\/strong><\/em><\/p>\n<p>Have a nice weekend!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my earlier article, I had briefly described the REST server I wanted to build for Krishnamurti Padhdhati system of astrology. After a long time I have managed to complete the implementation and it is now ready for deployment. In this article, I will go over some of its features with the hope it will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[112,49],"tags":[389,114,115],"class_list":["post-3399","post","type-post","status-publish","format-standard","hentry","category-astrology","category-c","tag-kp-rest-server","tag-kpastro","tag-krishnamurti-padhdhati"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-SP","jetpack-related-posts":[{"id":599,"url":"https:\/\/www.rangakrish.com\/index.php\/2017\/08\/30\/kp-astrology-rest-api\/","url_meta":{"origin":3399,"position":0},"title":"KP Astrology REST API","author":"admin","date":"August 30, 2017","format":false,"excerpt":"In today's post I want to share my experience in implementing a set of REST API calls for Astrology. The series on iLangGen will resume after this. As readers of this column probably know, I am the author of an Astrology software called KPAstro. You can read about it here.\u2026","rel":"","context":"In &quot;Astrology&quot;","block_context":{"text":"Astrology","link":"https:\/\/www.rangakrish.com\/index.php\/category\/astrology\/"},"img":{"alt_text":"Project Step 1","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image1.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image1.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2017\/08\/Project-image1.png?resize=525%2C300 1.5x"},"classes":[]},{"id":4285,"url":"https:\/\/www.rangakrish.com\/index.php\/2026\/04\/22\/exploring-astronomy-with-wolfram-mathematica\/","url_meta":{"origin":3399,"position":1},"title":"Exploring Astronomy with Wolfram Mathematica","author":"admin","date":"April 22, 2026","format":false,"excerpt":"As a student of astrology and who has written software for Krishnamurti Padhdhati (KP) System, I am fascinated by astronomy. We all know that there is a deep computational\u00a0connection between astronomy and astrology. Every astrological system \u2014 Western tropical, Vedic sidereal, KP, Jaimini, Chinese \u2014 is ultimately dependent on an\u2026","rel":"","context":"In &quot;Mathematica&quot;","block_context":{"text":"Mathematica","link":"https:\/\/www.rangakrish.com\/index.php\/category\/mathematica\/"},"img":{"alt_text":"Planetary Positions","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/04\/position-example-300x232.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/04\/position-example-300x232.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2026\/04\/position-example-300x232.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":41,"url":"https:\/\/www.rangakrish.com\/index.php\/2015\/10\/08\/learning-lisp-resources\/","url_meta":{"origin":3399,"position":2},"title":"Learning LISP &#8211; Resources","author":"admin","date":"October 8, 2015","format":false,"excerpt":"During my talks on Lisp Programming, I am invariably asked to suggest good books to start learning the language. Here is a (partial) list that I readily recommend. Beginner Level: ANSI Common Lisp, Paul Graham, Prentice Hall, 1996. Common LISP: A Tutorial, Wendy L.Milner, Prentice Hall, 1988. Land of LISP:\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2351,"url":"https:\/\/www.rangakrish.com\/index.php\/2021\/03\/14\/calling-c-methods-from-lispworks-lisp-part-2\/","url_meta":{"origin":3399,"position":3},"title":"Calling C# Methods from LispWorks Lisp &#8211; Part 2","author":"admin","date":"March 14, 2021","format":false,"excerpt":"In the last article, I showed how we can invoke C# methods from LispWorks Enterprise Edition, through the COM\/Automation interface. That approach relied on invoking the Automation methods dynamically, without depending on the Type library (*.tlb).\u00a0 In this article, I will discuss the other approach, which uses the Type library.\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"C# Code","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/03\/Code2-236x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/03\/Code2-236x300.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/03\/Code2-236x300.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":912,"url":"https:\/\/www.rangakrish.com\/index.php\/2018\/04\/22\/question-answering-using-dependency-trees\/","url_meta":{"origin":3399,"position":4},"title":"Question Answering\u00a0Using Dependency Trees","author":"admin","date":"April 22, 2018","format":false,"excerpt":"A few weeks ago I had written about my brief experiment with Mathematica's new feature, which provides answers to questions based on given text. After that post, I spent some time thinking about how to implement something similar. In today's post, I want to show you what I have been\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Dependency Tree","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/04\/Deptree-example.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1349,"url":"https:\/\/www.rangakrish.com\/index.php\/2018\/12\/30\/natural-language-interaction-with-ilexicon-using-luis\/","url_meta":{"origin":3399,"position":5},"title":"Natural Language Interaction with iLexicon Using LUIS","author":"admin","date":"December 30, 2018","format":false,"excerpt":"Some time ago, I had written a series of articles on my iLexicon project. It is a Lisp package that supports many interesting queries on English words. When I was discussing this project with a client recently, she asked me if it was possible to query the system in natural\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Talking to iLexicon","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Code2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Code2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2018\/12\/Code2.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/3399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=3399"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/3399\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=3399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=3399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=3399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}