Metadata-Version: 2.4
Name: sevenmlabs-astrology
Version: 1.0.0
Summary: 7mlabs Astro SDK: offline astrology calculations, IANA birth-time conversion and modular SVG charts
License-Expression: AGPL-3.0-only
Project-URL: Homepage, https://7mlabs.com/astro/
Project-URL: Repository, https://github.com/7mLabs/sdk-astro
Project-URL: Documentation, https://sevenmlabs-packages.velikho.chatgpt.site/docs/astro/
Project-URL: Issues, https://github.com/7mLabs/sdk-astro/issues
Keywords: astrology,ephemeris,natal,svg,7mlabs
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
License-File: sevenmlabs_astrology/third-party/PlusJakartaSans-OFL.txt
License-File: sevenmlabs_astrology/third-party/rust-NOTICE
License-File: sevenmlabs_astrology/third-party/rust-arrayvec-0.7.8-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-arrayvec-0.7.8-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-autocfg-1.5.1-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-autocfg-1.5.1-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-bitflags-1.3.2-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-bitflags-1.3.2-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-cc-1.0.79-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-cc-1.0.79-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-defmt-1.2.0-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-defmt-1.2.0-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-defmt-macros-1.2.0-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-defmt-macros-1.2.0-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-defmt-parser-1.1.0-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-defmt-parser-1.1.0-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-euclid-0.22.14-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-euclid-0.22.14-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-itoa-1.0.8-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-itoa-1.0.8-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-jiff-0.2.38-COPYING
License-File: sevenmlabs_astrology/third-party/rust-jiff-0.2.38-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-jiff-0.2.38-UNLICENSE
License-File: sevenmlabs_astrology/third-party/rust-jiff-core-0.1.1-COPYING
License-File: sevenmlabs_astrology/third-party/rust-jiff-core-0.1.1-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-jiff-core-0.1.1-UNLICENSE
License-File: sevenmlabs_astrology/third-party/rust-jiff-static-0.2.38-COPYING
License-File: sevenmlabs_astrology/third-party/rust-jiff-static-0.2.38-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-jiff-static-0.2.38-UNLICENSE
License-File: sevenmlabs_astrology/third-party/rust-jiff-tzdb-0.1.9-COPYING
License-File: sevenmlabs_astrology/third-party/rust-jiff-tzdb-0.1.9-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-jiff-tzdb-0.1.9-UNLICENSE
License-File: sevenmlabs_astrology/third-party/rust-kurbo-0.11.3-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-kurbo-0.11.3-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-log-0.4.34-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-log-0.4.34-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-manifest.json
License-File: sevenmlabs_astrology/third-party/rust-num-traits-0.2.19-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-num-traits-0.2.19-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-portable-atomic-1.15.0-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-portable-atomic-1.15.0-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-portable-atomic-util-0.2.8-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-portable-atomic-util-0.2.8-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-proc-macro2-1.0.107-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-proc-macro2-1.0.107-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-proc-macro2-1.0.76-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-proc-macro2-1.0.76-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-quote-1.0.35-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-quote-1.0.35-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-quote-1.0.47-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-quote-1.0.47-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-ryu-1.0.14-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-ryu-1.0.14-LICENSE-BOOST
License-File: sevenmlabs_astrology/third-party/rust-serde-1.0.195-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-serde-1.0.195-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-serde-1.0.228-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-serde-1.0.228-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-serde_core-1.0.228-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-serde_core-1.0.228-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-serde_derive-1.0.195-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-serde_derive-1.0.195-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-serde_derive-1.0.228-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-serde_derive-1.0.228-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-serde_json-1.0.109-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-serde_json-1.0.109-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-siphasher-1.0.4-COPYING
License-File: sevenmlabs_astrology/third-party/rust-siphasher-1.0.4-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-siphasher-1.0.4-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-smallvec-1.16.3-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-smallvec-1.16.3-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-svgtypes-0.15.3-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-svgtypes-0.15.3-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-syn-2.0.119-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-syn-2.0.119-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-syn-2.0.48-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-syn-2.0.48-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-syn-3.0.9-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-syn-3.0.9-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-thiserror-2.0.21-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-thiserror-2.0.21-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-thiserror-impl-2.0.21-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-thiserror-impl-2.0.21-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-unicode-ident-1.0.10-LICENSE-APACHE
License-File: sevenmlabs_astrology/third-party/rust-unicode-ident-1.0.10-LICENSE-MIT
License-File: sevenmlabs_astrology/third-party/rust-unicode-ident-1.0.10-LICENSE-UNICODE
License-File: sevenmlabs_astrology/third-party/swisseph-LICENSE
License-File: sevenmlabs_astrology/third-party/swisseph-LICENSE.TXT
License-File: sevenmlabs_astrology/third-party/swisseph-PROVENANCE.md
Dynamic: license-file

# 7mlabs Astro SDK for Python

An offline SDK for astrology calculations, structured chart data, birth-time
conversion and modular SVG rendering. Astro is a project of
[7mlabs](https://7mlabs.com/astro/), with SDK, Payload (web) and Compass (app)
as its three development paths.

## Installation and platform support

```sh
python -m pip install 'sevenmlabs-astrology==1.0.0'
```

This wheel supports **Python 3.10+ on macOS 11+ Apple Silicon (ARM64)**.
Linux, Windows and Intel Mac wheels are not included in this initial Python
release. This native package runs in backend, desktop and command-line Python
applications; it does not execute directly in a standard web browser.

The wheel includes the native engine, timezone data, required ephemeris data,
vector symbols and font outlines. No Rust compiler, runtime downloads, API key
or external ephemeris installation is needed when using the supported wheel.

## Calculate from local birth time

```python
from pathlib import Path
import sevenmlabs_astrology as astro

payload = astro.calculate_from_local({
    "operation": "natalDomains",
    "local": {"year": 1995, "month": 6, "day": 15, "hour": 14, "minute": 30},
    "timeZone": "Asia/Ho_Chi_Minh",
    "location": {"latitude": 10.8231, "longitude": 106.6297},
    "domains": ["identity"],
    "additionalPoints": "standard",
    "aspectPreset": "extended",
})

svg = astro.render_chart_svg(payload, {
    "detail": "professional", "theme": "dark", "locale": "en",
    "sections": ["wheel", "positions"],
    "aspectColors": {
        "harmonious": "#54CFAA", "challenging": "#F57891",
        "neutral": "#A38BFA", "minor": "#8193A8",
    },
})
Path("chart.svg").write_text(svg, encoding="utf-8")
```

If your backend already converts to UTC, call `calculate` with `utc` and
`location` instead. Conversion remains optional:

```python
resolved = astro.resolve_birth_time({
    "local": {"year": 1995, "month": 6, "day": 15, "hour": 14, "minute": 30},
    "timeZone": "Asia/Ho_Chi_Minh",
})
payload = astro.calculate({
    "operation": "natalDomains", "utc": resolved["utc"],
    "location": {"latitude": 10.8231, "longitude": 106.6297},
    "domains": ["identity"],
})
```

IANA conversion uses bundled tzdb 2026e. Ambiguous local times require an explicit
earlier/later choice; nonexistent local times fail. Coordinates do not determine
a timezone automatically. Event/forecast period windows still use an explicit
fixed `utcOffsetMinutes`.

## Independent chart parts and interactive applications

Calculate once, then reuse that payload for different views without recalculating
planet positions:

```python
positions_svg = astro.render_chart_part(payload, "positions", {"theme": "light"})
houses_svg = astro.render_chart_part(payload, "houses")
focus_svg = astro.render_chart_svg(payload, {
    "sections": ["wheel", "houseFocus"],
    "focus": {"house": 7, "mode": "highlight"},
    "aspectEndpoints": "all",
})
model = astro.build_chart_model(payload, {
    "sections": ["wheel"],
    "focus": {"house": 7, "mode": "isolate"},
})
```

Parts: `wheel`, `positions`, `houses`, `aspectMatrix`, `aspects`, `houseFocus`.
Presets: `basic`, `advanced`, `professional`. The JSON model exposes source
longitudes, selected/related points, house rulers and occupants, final viewBox
coordinates and hit targets for a custom frontend. Model-only output does not
generate SVG. House-ruler focus requires source context such as `natalDomains`.

`render_chart_svg_result` returns SVG, model, warnings, coverage and metadata.
Filter relations by groups, angles, orb, phase or endpoint category. Override
colors by group or aspect type, and optionally supply custom safe vector geometry
for zodiac/point symbols. Glyphs and text are outlined; exports need no external
fonts, images, scripts or stylesheets.

## Calculation coverage

- Natal Sun–Pluto, houses, ASC/MC/DSC/IC and aspect relations.
- Optional Chiron, true/mean north and south nodes, mean/osculating lunar apogee
  (Lilith). `additionalPoints: "standard"` selects Chiron, true north node and
  mean Lilith; `"all"` selects all seven, or pass an explicit ID list. These points
  are supported for `natal` and `natalDomains`.
- Ten individual report domains, source facts/evidence and custom profiles.
- Two-person synastry, symbolic midpoint composite, transits, event searches,
  forecasts, harmonic/chart geometry and grouped on-demand queries.
- Separate payload context compression with explicit omission/coverage metadata.

Basic natal uses Gregorian dates 1800–2399, tropical geocentric apparent positions,
and Placidus or Whole Sign houses. Coordinates are degrees, north/east positive.
Core output retains floating-point coordinates; display formatting does not alter
calculation precision. Polar Placidus failures return errors rather than silently
switching house systems. Composite charts are symbolic and have no invented
physical speed/retrograde/applying values.

Calls are synchronous. Long event/forecast searches belong in an application
worker. The SDK returns structured data rather than generated narrative.
`EngineError` exposes `.code` and `.result`; raw JSON helpers retain the engine
envelope. `get_capabilities()` describes the installed engine.

## Source, documentation and license

This release is **1.0.0**. The matching project source snapshot
and build instructions are bundled at
`sevenmlabs_astrology/source/astro-sdk-1.0.0.tar.gz` inside the wheel.
The archive includes the Rust/C engine, Python wrapper, locked dependency
declarations, embedded data, renderer assets, schemas, tests and dependency
notices; it excludes credentials and local build outputs.

[Repository](https://github.com/7mlabs/sdk-astro) ·
[Issues](https://github.com/7mlabs/sdk-astro/issues)

The bundled source contains `docs/time-and-svg.md` for complete rendering/time
contracts and `docs/license.md` for license details. The public repository may
advance independently; use the bundled snapshot to reproduce this wheel.

The SDK and native renderer use **AGPL-3.0-only**, using the AGPL option of Swiss
Ephemeris. License texts and third-party notices are included; upstream font and
dependency terms are retained. See the included `LICENSE` and `NOTICE`.
