Giter Site home page Giter Site logo

vedastro.python's Introduction

✨ Vedic Astrology in Python

License GitHub Issues

🗺️ What can this do?

Easily code complex vedic astrology math and logic. A powerful tool for astronomical calculations and data analysis. It provides a collection of functions and classes to perform various astronomical calculations, such as celestial object positions, time conversions, coordinate transformations, and more.

🏎️ Quick Start

Step 1: Download and install .NET 7 Runtime (How?)

Step 2: Run pip install vedastro

Step 3: Do astro calculation in less than 10 lines

from vedastro import * 

#PART 1 : PREPARE NEEDED DATA
#-----------------------------------

# set birth location
geolocation = GeoLocation("Tokyo, Japan", 139.83, 35.65)

# group all birth time data together (day/month/year)
birth_time = Time("23:40 31/12/2010 +08:00", geolocation)

#PART 2 : CALCULATE ALL DATA
#-----------------------------------

#PLANETS
allPlanetDataList = Calculate.AllPlanetData(PlanetName.Sun, birth_time)
Tools.Print(allPlanetDataList)

#HOUSES
allHouseDataList = Calculate.AllHouseData(HouseName.House1, birth_time)
Tools.Print(allHouseDataList)

#ZODIAC SIGNS
allZodiacDataList = Calculate.AllZodiacSignData(ZodiacName.Gemini, birth_time)
Tools.Print(allZodiacDataList)

⚙️ How it works

Coded & compiled in C# for maximum CPU computation efficency and speed, then wrapped in Python .NET Core CLR wrapper. Can be run in Linux, Windows & Mac OS.


.NET 7 Download & Install

Download .NET 7 for Windows

Download .NET 7 for Ubuntu

sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-7.0

DESIGN NOTES

  • Vedastro Lib code is compiled into VedAstro.dll (Release always) and injected into this python code base
  • All calls needing location data both local or production python server, will contact Live vedastro API server
  • custom 3rd party API keys not supported as in C# version

Contributing

Contributions to VedAstro Python are welcome! If you find a bug, have a feature request, or want to contribute code, please open an issue or submit a pull request. Make sure to read our contribution guidelines before getting started.

License

VedAstro Python is released under the MIT License. See LICENSE for more information.

vedastro.python's People

Contributors

actions-user avatar gjayanth715 avatar rushout09 avatar sengiv avatar tharakaumayanga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vedastro.python's Issues

For generating All Charts

Sir
Can anyone help me to Generate South Indian Birth Chart and All other Charts with Planates position and Vimsottai Dasa
Please give code for above details

TypeError: No method matches given arguments for Person..ctor:

I am getting below error and not able to understand how to solve it,

i am trying to run below code as mentioned in pip documentation

from vedastro.calculators import SaturnInAries
from vedastro.objects import GeoLocation, Time, Person, Gender
import VedAstro.Library as VedAstro

Create a GeoLocation object for Tokyo, Japan

geolocation = GeoLocation(location="Tokyo", latitude=35.6895, longitude=139.6917).geolocation

Define the birth date, time, and time offset

date = "07/05/2010"
time = "06:42"
time_offset = "+09:00"

Create a Time object for the birth date, time, and time offset

time_ob = Time(date, time, time_offset, geolocation).time_object

Define the person's ID, user ID, notes, name, and gender

id = "1234"
user_id = "123"
notes = ""
name = "John Doe"
gender = Gender.Male

Create a Person object for John Doe with the provided details

john_doe = Person(id=id, user_id=user_id, name=name, gender=gender, birth_time=time_ob, notes=notes).person

do calculation to check if saturn is in aries at a given time

saturn_aries = VedAstro.HoroscopeCalculatorMethods.SaturnInAries(time_ob)

data if the astro event occured

occurrence = saturn_aries.Occuring

get the planets or houses related to this astro event

related_body = saturn_aries.RelatedBody

Print the results

print("Occurrence of Saturn in Aries:", occurrence)
print("Related celestial body:", related_body)

TypeError: No method matches given arguments for Person..ctor: (<class 'str'>, <class 'str'>, <class 'VedAstro.Library.Time'>, <class 'VedAstro.Library.Gender'>, <class 'str'>, <class 'str'>, <class 'NoneType'>)

Python Package Index - PyPI.org

  • package lib for PyPI --> Guide

  • accessible via pip

pip install VedAstro
  • use direct from terminal
from VedAstro import Calculator

Calculator.GetMatchScore("Newton","Margret")

# Output: Score 53%

Internals:
The Python package is only a wrapper using Python.NET.
Each method in this package just points to the underlying methods in Library

New python package, quick starter doc page

SNIPPET 1

from vedastro.calculators import VenusInPisces
from vedastro.objects import GeoLocation, Time, Person, Gender

# person who born on Tokyo Japan
geolocation = GeoLocation(location="Tokyo", latitude=35.6895, longitude=-139.6917)
date = "07/05/2010"
time = "06:42"
time_offset = "+09:00"
time_ob = Time(date, time, time_offset, geolocation)
id = "1234"
user_id = "123"
notes = " "
name = "Test Person"
gender = Gender.Male

test_person = Person(id=id, user_id=user_id, name=name, gender=gender, birth_time=time_ob, notes=notes)
status = VenusInPisces(time_ob, test_person)

print(status.occuring)
print(status.related_body)

Respected Sir VedAstro Module is not installing in Python 3.12.2 Version

My os Windows 11, Python 3.12.2 Verson

Sir when i am traing to install VedAstro using with this command "pip install VedAstro" it is showing this below error. Please help to install VedAstro

ERROR: Ignored the following versions that require a different python version: 0.1b0 Requires-Python >=3.9,<3.12; 0.2 Requires-Python >=3.9,<3.12; 0.2b0 Requires-Python >=3.9,<3.12; 0.3.0 Requires-Python >=3.9,<3.12; 0.4.0 Requires-Python >=3.9,<3.12; 0.5.0 Requires-Python >=3.9,<3.12; 1.0.0 Requires-Python >=3.9,<3.12; 1.1.0 Requires-Python >=3.9,<3.12; 1.1.1 Requires-Python >=3.9,<3.12; 1.1.2 Requires-Python >=3.9,<3.12; 1.1.3 Requires-Python >=3.9,<3.12; 1.1.4 Requires-Python >=3.9,<3.12; 1.1.5 Requires-Python >=3.9,<3.12; 1.1.6 Requires-Python >=3.9,<3.12; 1.1.7 Requires-Python >=3.9,<3.12; 1.10.0 Requires-Python >=3.9,<3.12; 1.11.0 Requires-Python >=3.9,<3.12; 1.12.0 Requires-Python >=3.9,<3.12; 1.13.0 Requires-Python >=3.9,<3.12; 1.14.0 Requires-Python >=3.9,<3.12; 1.15.0 Requires-Python >=3.9,<3.12; 1.16.0 Requires-Python >=3.9,<3.12; 1.17.0 Requires-Python >=3.9,<3.12; 1.18.0 Requires-Python >=3.9,<3.12; 1.19.0 Requires-Python >=3.9,<3.12; 1.2.0 Requires-Python >=3.9,<3.12; 1.20.0 Requires-Python >=3.9,<3.12; 1.21.0 Requires-Python >=3.9,<3.12; 1.3.0 Requires-Python >=3.9,<3.12; 1.4.0 Requires-Python >=3.9,<3.12; 1.5.0 Requires-Python >=3.9,<3.12; 1.6.0 Requires-Python >=3.9,<3.12; 1.7.0 Requires-Python >=3.9,<3.12; 1.8.0 Requires-Python >=3.9,<3.12; 1.9.0 Requires-Python >=3.9,<3.12
ERROR: Could not find a version that satisfies the requirement VedAstro (from versions: none)
ERROR: No matching distribution found for VedAstro

use pydentic

start using and update old function with pydentic for Data validation

life prediction example

Hello,

Could you please add an example to life prediction with similar chart shown on the main website or at main project github?
Or just describe the process in nutshell how to do it.

Thanks,
Peter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.