Skip to content

Astrology api is a python backend for calculating birth charts, synastry charts and relationship scores

Notifications You must be signed in to change notification settings

rafagsiqueira/astrology-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Avra Python Backend

This is the Python backend API for the Avra Flutter app, providing astrological chart generation using the kerykeion library.

Setup

  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the API server:
python main.py

The API will be available at http://localhost:8000

API Endpoints

GET /

Health check endpoint

POST /api/generate-chart

Generate an astrological birth chart from birth data

Request Body:

{
  "birthDate": "1990-01-01",
  "birthTime": "12:00",
  "latitude": 40.7128,
  "longitude": -74.0060,
  "cityName": "New York",
  "countryName": "USA",
  "timezone": "America/New_York"
}

Response: Returns a complete astrological chart with planetary positions, houses, aspects, and sign data.

Features

  • Uses kerykeion for accurate astrological calculations
  • FastAPI for high-performance API
  • CORS enabled for Flutter app integration
  • Comprehensive birth chart data extraction
  • Error handling and validation
  • Comprehensive unit test suite

Testing

The project is configured to run unit tests automatically using GitHub Actions. The tests are run on every push and pull request to the main branch.

You can also run the tests manually using pytest:

pytest

Deployment

The project is deployed to Google Cloud Run using a GitHub Actions workflow. To trigger the deployment, you need to manually trigger the Deploy to Google Cloud Run workflow in the Actions tab of the GitHub repository.

About

Astrology api is a python backend for calculating birth charts, synastry charts and relationship scores

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •