core-astrology-engine


Namecore-astrology-engine JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/devsujan24/core-astrology-engine
SummaryA comprehensive Vedic astrology calculation library with developer-friendly API
upload_time2025-07-20 22:15:04
maintainerNone
docs_urlNone
authorSujan Neupane
requires_python>=3.8
licenseMIT
keywords astrology vedic horoscope chart dasha panchanga ephemeris swiss-ephemeris planetary-positions nakshatra
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Core Astrology Engine 🌟

[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI version](https://badge.fury.io/py/core-astrology-engine.svg)](https://badge.fury.io/py/core-astrology-engine)

A comprehensive, production-ready Vedic astrology calculation library with a developer-friendly API. Built for accuracy, simplicity, and performance.

## ✨ Key Features

- **🎯 Accurate Calculations**: Swiss Ephemeris integration with verified precision
- **🚀 Developer-Friendly**: One-line functions for common tasks
- **⚡ High Performance**: Batch processing with parallel computation
- **🌍 Smart Timezone Detection**: Automatic handling for Nepal/India regions
- **📦 Zero Configuration**: Works out of the box with sensible defaults
- **🔧 Highly Configurable**: Advanced options when you need them

## 🚀 Quick Start

### Installation

```bash
pip install core-astrology-engine
```

### Simple Usage

```python
from core_astrology_engine import get_birth_chart, get_current_dasha

# Get a birth chart with one line
chart = get_birth_chart("1997-10-24T06:30:00", 27.7172, 85.3240)
print(f"Moon at: {chart['planets']['Moon']['longitude']:.1f}° {chart['planets']['Moon']['sign']}")

# Get current dasha periods
dasha = get_current_dasha("1997-10-24T06:30:00", 27.7172, 85.3240)
print(f"Current Mahadasha: {dasha['current_mahadasha']['planet']}")
```

### Comprehensive API

```python
from core_astrology_engine import SimpleAstrology
from datetime import datetime

# Initialize the API
astro = SimpleAstrology()

# Birth details
birth_datetime = datetime(1997, 10, 24, 6, 30)
latitude, longitude = 27.7172, 85.3240  # Kathmandu

# Get complete birth information
info = astro.quick_birth_info(birth_datetime, latitude, longitude)

# Individual calculations
chart = astro.get_chart(birth_datetime, latitude, longitude)
dashas = astro.get_current_dashas(birth_datetime, latitude, longitude)
panchanga = astro.get_panchanga(birth_datetime, latitude, longitude)
```

## 📊 What You Can Calculate

### Birth Charts
- Complete Vedic charts with planetary positions
- House placements and signs
- Ascendant and planetary dignities
- Retrograde status

### Dasha Systems
- Vimshottari Mahadasha periods
- Current and future dasha periods
- High-precision timing calculations
- Sub-period (Antardasha) support

### Panchanga
- Daily Panchanga elements
- Nakshatra and Pada
- Tithi, Vara, Yoga, Karana
- Auspicious timing information

### Planetary Positions
- Current planetary positions
- Transit calculations
- Specific planet filtering
- Multiple coordinate systems

## ⚡ Batch Processing

```python
from core_astrology_engine import BatchProcessor, BatchRequest

# Process multiple charts efficiently
batch = BatchProcessor(max_workers=4)

requests = [
    BatchRequest("person1", datetime(1997, 10, 24, 6, 30), 27.7172, 85.3240),
    BatchRequest("person2", datetime(1985, 5, 15, 14, 20), 28.6139, 77.2090),
]

results = batch.process_charts(requests)
batch.export_results(results, "charts.json")
```

## 🎛️ Output Formats

```python
# Dictionary format (default)
chart = astro.get_chart(birth_datetime, lat, lon, format='dict')

# JSON string
chart_json = astro.get_chart(birth_datetime, lat, lon, format='json')

# Raw objects (for advanced usage)
chart_obj = astro.get_chart(birth_datetime, lat, lon, format='object')
```

## 🌍 Automatic Timezone Detection

```python
# Automatically detects timezone for Nepal/India
chart = astro.get_chart(birth_datetime, latitude, longitude)

# Manual timezone specification
chart = astro.get_chart(birth_datetime, latitude, longitude, timezone_offset=5.75)
```
## 📚 Comprehensive Documentation

- [Usage Examples](USAGE_EXAMPLES.md) - Detailed examples for all features
- [Developer Features](DEVELOPER_FEATURES_SUMMARY.md) - Complete feature overview
- [Configuration Guide](docs/configuration.md) - Advanced configuration options

## 🔬 Verified Accuracy

This library has been extensively tested with real birth data:

**Test Case**: October 24, 1997, 6:30 AM, Kathmandu
- **Expected**: Moon at ~16° Cancer, Venus Dasha 2022-2042
- **Results**: Moon at 16.14° Cancer ✓, Venus Dasha 2022-2042 ✓

## 🏗️ Architecture

```
core_astrology_engine/
├── api/              # Simple API layer
├── services/         # Core calculation services
├── models/           # Data models
├── utils/            # Utility functions
├── config/           # Configuration management
└── data/             # Ephemeris data
```

## 🎯 Design Philosophy

1. **Simplicity First**: Common tasks should be one-liners
2. **Accuracy**: Swiss Ephemeris with proper astronomical calculations
3. **Flexibility**: Support for different input/output formats
4. **Performance**: Optimized for both single and batch calculations
5. **Developer Experience**: Clear APIs, helpful errors, comprehensive docs

## 🔧 Requirements

- Python >=3.8
- Minimal dependencies
- Swiss Ephemeris (included)
- Cross-platform compatibility

## 🚀 Performance

- **Single Chart**: ~10-50ms
- **Batch Processing**: 100+ charts/second with parallel processing
- **Memory Efficient**: Optimized for large-scale calculations
- **Caching**: Optional caching for repeated calculations

## 🤝 Contributing

Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details.

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

**Note**: This software uses the Swiss Ephemeris, which has its own licensing terms for commercial use. See the LICENSE file for details.

## 🙏 Acknowledgments

- [Swiss Ephemeris](https://www.astro.com/swisseph/) by Astrodienst AG
- The global astrology and astronomy communities
- Contributors and testers

## 📞 Support

- 🐛 [Report Issues](https://github.com/devsujan24/core-astrology-engine/issues)
- 📖 [Documentation](https://github.com/devsujan24/core-astrology-engine/blob/main/README.md)
- 💬 [Discussions](https://github.com/devsujan24/core-astrology-engine/discussions)

---

**Made with ❤️ for the astrology and developer communities**

---

**Made with ❤️ for the astrology and developer communities**

### Type Checking
```bash
mypy core_astrology_engine/
```

## Contributing

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- Swiss Ephemeris for accurate planetary calculations
- Ancient Vedic astrology traditions and texts
- The global astrology development community

## Support

- Documentation: [https://core-astrology-engine.readthedocs.io/](https://core-astrology-engine.readthedocs.io/)
- Issues: [https://github.com/yourusername/core-astrology-engine/issues](https://github.com/yourusername/core-astrology-engine/issues)
- Discussions: [https://github.com/yourusername/core-astrology-engine/discussions](https://github.com/yourusername/core-astrology-engine/discussions)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/devsujan24/core-astrology-engine",
    "name": "core-astrology-engine",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Sujan Neupane <nepsujan06@gmail.com>",
    "keywords": "astrology, vedic, horoscope, chart, dasha, panchanga, ephemeris, swiss-ephemeris, planetary-positions, nakshatra",
    "author": "Sujan Neupane",
    "author_email": "Sujan Neupane <nepsujan06@gmail.com>",
    "download_url": null,
    "platform": null,
    "description": "# Core Astrology Engine \ud83c\udf1f\r\n\r\n[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n[![PyPI version](https://badge.fury.io/py/core-astrology-engine.svg)](https://badge.fury.io/py/core-astrology-engine)\r\n\r\nA comprehensive, production-ready Vedic astrology calculation library with a developer-friendly API. Built for accuracy, simplicity, and performance.\r\n\r\n## \u2728 Key Features\r\n\r\n- **\ud83c\udfaf Accurate Calculations**: Swiss Ephemeris integration with verified precision\r\n- **\ud83d\ude80 Developer-Friendly**: One-line functions for common tasks\r\n- **\u26a1 High Performance**: Batch processing with parallel computation\r\n- **\ud83c\udf0d Smart Timezone Detection**: Automatic handling for Nepal/India regions\r\n- **\ud83d\udce6 Zero Configuration**: Works out of the box with sensible defaults\r\n- **\ud83d\udd27 Highly Configurable**: Advanced options when you need them\r\n\r\n## \ud83d\ude80 Quick Start\r\n\r\n### Installation\r\n\r\n```bash\r\npip install core-astrology-engine\r\n```\r\n\r\n### Simple Usage\r\n\r\n```python\r\nfrom core_astrology_engine import get_birth_chart, get_current_dasha\r\n\r\n# Get a birth chart with one line\r\nchart = get_birth_chart(\"1997-10-24T06:30:00\", 27.7172, 85.3240)\r\nprint(f\"Moon at: {chart['planets']['Moon']['longitude']:.1f}\u00b0 {chart['planets']['Moon']['sign']}\")\r\n\r\n# Get current dasha periods\r\ndasha = get_current_dasha(\"1997-10-24T06:30:00\", 27.7172, 85.3240)\r\nprint(f\"Current Mahadasha: {dasha['current_mahadasha']['planet']}\")\r\n```\r\n\r\n### Comprehensive API\r\n\r\n```python\r\nfrom core_astrology_engine import SimpleAstrology\r\nfrom datetime import datetime\r\n\r\n# Initialize the API\r\nastro = SimpleAstrology()\r\n\r\n# Birth details\r\nbirth_datetime = datetime(1997, 10, 24, 6, 30)\r\nlatitude, longitude = 27.7172, 85.3240  # Kathmandu\r\n\r\n# Get complete birth information\r\ninfo = astro.quick_birth_info(birth_datetime, latitude, longitude)\r\n\r\n# Individual calculations\r\nchart = astro.get_chart(birth_datetime, latitude, longitude)\r\ndashas = astro.get_current_dashas(birth_datetime, latitude, longitude)\r\npanchanga = astro.get_panchanga(birth_datetime, latitude, longitude)\r\n```\r\n\r\n## \ud83d\udcca What You Can Calculate\r\n\r\n### Birth Charts\r\n- Complete Vedic charts with planetary positions\r\n- House placements and signs\r\n- Ascendant and planetary dignities\r\n- Retrograde status\r\n\r\n### Dasha Systems\r\n- Vimshottari Mahadasha periods\r\n- Current and future dasha periods\r\n- High-precision timing calculations\r\n- Sub-period (Antardasha) support\r\n\r\n### Panchanga\r\n- Daily Panchanga elements\r\n- Nakshatra and Pada\r\n- Tithi, Vara, Yoga, Karana\r\n- Auspicious timing information\r\n\r\n### Planetary Positions\r\n- Current planetary positions\r\n- Transit calculations\r\n- Specific planet filtering\r\n- Multiple coordinate systems\r\n\r\n## \u26a1 Batch Processing\r\n\r\n```python\r\nfrom core_astrology_engine import BatchProcessor, BatchRequest\r\n\r\n# Process multiple charts efficiently\r\nbatch = BatchProcessor(max_workers=4)\r\n\r\nrequests = [\r\n    BatchRequest(\"person1\", datetime(1997, 10, 24, 6, 30), 27.7172, 85.3240),\r\n    BatchRequest(\"person2\", datetime(1985, 5, 15, 14, 20), 28.6139, 77.2090),\r\n]\r\n\r\nresults = batch.process_charts(requests)\r\nbatch.export_results(results, \"charts.json\")\r\n```\r\n\r\n## \ud83c\udf9b\ufe0f Output Formats\r\n\r\n```python\r\n# Dictionary format (default)\r\nchart = astro.get_chart(birth_datetime, lat, lon, format='dict')\r\n\r\n# JSON string\r\nchart_json = astro.get_chart(birth_datetime, lat, lon, format='json')\r\n\r\n# Raw objects (for advanced usage)\r\nchart_obj = astro.get_chart(birth_datetime, lat, lon, format='object')\r\n```\r\n\r\n## \ud83c\udf0d Automatic Timezone Detection\r\n\r\n```python\r\n# Automatically detects timezone for Nepal/India\r\nchart = astro.get_chart(birth_datetime, latitude, longitude)\r\n\r\n# Manual timezone specification\r\nchart = astro.get_chart(birth_datetime, latitude, longitude, timezone_offset=5.75)\r\n```\r\n## \ud83d\udcda Comprehensive Documentation\r\n\r\n- [Usage Examples](USAGE_EXAMPLES.md) - Detailed examples for all features\r\n- [Developer Features](DEVELOPER_FEATURES_SUMMARY.md) - Complete feature overview\r\n- [Configuration Guide](docs/configuration.md) - Advanced configuration options\r\n\r\n## \ud83d\udd2c Verified Accuracy\r\n\r\nThis library has been extensively tested with real birth data:\r\n\r\n**Test Case**: October 24, 1997, 6:30 AM, Kathmandu\r\n- **Expected**: Moon at ~16\u00b0 Cancer, Venus Dasha 2022-2042\r\n- **Results**: Moon at 16.14\u00b0 Cancer \u2713, Venus Dasha 2022-2042 \u2713\r\n\r\n## \ud83c\udfd7\ufe0f Architecture\r\n\r\n```\r\ncore_astrology_engine/\r\n\u251c\u2500\u2500 api/              # Simple API layer\r\n\u251c\u2500\u2500 services/         # Core calculation services\r\n\u251c\u2500\u2500 models/           # Data models\r\n\u251c\u2500\u2500 utils/            # Utility functions\r\n\u251c\u2500\u2500 config/           # Configuration management\r\n\u2514\u2500\u2500 data/             # Ephemeris data\r\n```\r\n\r\n## \ud83c\udfaf Design Philosophy\r\n\r\n1. **Simplicity First**: Common tasks should be one-liners\r\n2. **Accuracy**: Swiss Ephemeris with proper astronomical calculations\r\n3. **Flexibility**: Support for different input/output formats\r\n4. **Performance**: Optimized for both single and batch calculations\r\n5. **Developer Experience**: Clear APIs, helpful errors, comprehensive docs\r\n\r\n## \ud83d\udd27 Requirements\r\n\r\n- Python >=3.8\r\n- Minimal dependencies\r\n- Swiss Ephemeris (included)\r\n- Cross-platform compatibility\r\n\r\n## \ud83d\ude80 Performance\r\n\r\n- **Single Chart**: ~10-50ms\r\n- **Batch Processing**: 100+ charts/second with parallel processing\r\n- **Memory Efficient**: Optimized for large-scale calculations\r\n- **Caching**: Optional caching for repeated calculations\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\nContributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details.\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n**Note**: This software uses the Swiss Ephemeris, which has its own licensing terms for commercial use. See the LICENSE file for details.\r\n\r\n## \ud83d\ude4f Acknowledgments\r\n\r\n- [Swiss Ephemeris](https://www.astro.com/swisseph/) by Astrodienst AG\r\n- The global astrology and astronomy communities\r\n- Contributors and testers\r\n\r\n## \ud83d\udcde Support\r\n\r\n- \ud83d\udc1b [Report Issues](https://github.com/devsujan24/core-astrology-engine/issues)\r\n- \ud83d\udcd6 [Documentation](https://github.com/devsujan24/core-astrology-engine/blob/main/README.md)\r\n- \ud83d\udcac [Discussions](https://github.com/devsujan24/core-astrology-engine/discussions)\r\n\r\n---\r\n\r\n**Made with \u2764\ufe0f for the astrology and developer communities**\r\n\r\n---\r\n\r\n**Made with \u2764\ufe0f for the astrology and developer communities**\r\n\r\n### Type Checking\r\n```bash\r\nmypy core_astrology_engine/\r\n```\r\n\r\n## Contributing\r\n\r\n1. Fork the repository\r\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\r\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\r\n4. Push to the branch (`git push origin feature/amazing-feature`)\r\n5. Open a Pull Request\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Acknowledgments\r\n\r\n- Swiss Ephemeris for accurate planetary calculations\r\n- Ancient Vedic astrology traditions and texts\r\n- The global astrology development community\r\n\r\n## Support\r\n\r\n- Documentation: [https://core-astrology-engine.readthedocs.io/](https://core-astrology-engine.readthedocs.io/)\r\n- Issues: [https://github.com/yourusername/core-astrology-engine/issues](https://github.com/yourusername/core-astrology-engine/issues)\r\n- Discussions: [https://github.com/yourusername/core-astrology-engine/discussions](https://github.com/yourusername/core-astrology-engine/discussions)\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A comprehensive Vedic astrology calculation library with developer-friendly API",
    "version": "1.0.0",
    "project_urls": {
        "Bug Reports": "https://github.com/devsujan24/core-astrology-engine/issues",
        "Documentation": "https://core-astrology-engine.readthedocs.io/",
        "Homepage": "https://github.com/devsujan24/core-astrology-engine",
        "Repository": "https://github.com/devsujan24/core-astrology-engine"
    },
    "split_keywords": [
        "astrology",
        " vedic",
        " horoscope",
        " chart",
        " dasha",
        " panchanga",
        " ephemeris",
        " swiss-ephemeris",
        " planetary-positions",
        " nakshatra"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "be0fd714459f6d2043791806d85934701ed2b918c7f643747aea9c130c1726a1",
                "md5": "bfb42443626a3cec1d515e9079b1d106",
                "sha256": "7d47054235e4d7bafd6dee78aa218e99b604d84cbe84e0e4c8f7e323e23da489"
            },
            "downloads": -1,
            "filename": "core_astrology_engine-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bfb42443626a3cec1d515e9079b1d106",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 40394,
            "upload_time": "2025-07-20T22:15:04",
            "upload_time_iso_8601": "2025-07-20T22:15:04.001307Z",
            "url": "https://files.pythonhosted.org/packages/be/0f/d714459f6d2043791806d85934701ed2b918c7f643747aea9c130c1726a1/core_astrology_engine-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-20 22:15:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "devsujan24",
    "github_project": "core-astrology-engine",
    "github_not_found": true,
    "lcname": "core-astrology-engine"
}
        
Elapsed time: 0.39782s