Skip to main content

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, with SDK, Payload (web) and Compass (app) as its three development paths.

Installation and platform support

python -m pip install 'sevenmlabs-astrology==1.2.0'

This release has wheels for Python 3.10+ on macOS 11+ Apple Silicon (ARM64) and Linux x64 with glibc 2.38+. The Linux wheel is audited as manylinux_2_38_x86_64 and requires libgcc_s.so.1. The Linux CI matrix uses Ubuntu 24.04 with Python 3.10 and 3.13. Windows, Intel Mac, Linux ARM64 and Alpine/musl wheels are not included. Ubuntu 22.04 and Debian 12 have older glibc versions and are outside this wheel's compatibility range. 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.

Pass operation: "horary", the question time and location, and quesitedHouse to astro.calculate. Use astro.render_chart_svg(result) to draw the chart. Horary example and JSON contract

Calculate from local birth time

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:

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:

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 package uses version 1.2.0. The matching project source snapshot and build instructions are bundled at sevenmlabs_astrology/source/astro-sdk-1.2.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 · 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 public combined SDK/native-renderer distribution uses AGPL-3.0-only, choosing Swiss Ephemeris's AGPL route. This package includes the grant and scope files. Identified original 7mlabs-owned contributions additionally have a separate MIT permission, including only the original 7mlabs changes identified by the Swiss provenance diff. This does not license the entire modified Swiss file, Swiss data or combined native binary under MIT. See the permission scope, MIT text and English licensing guide. Professional holders need Swiss permission covering their actual use; we have not confirmed that existing prebuilt binaries can automatically be used under Professional. License texts and third-party notices remain applicable; upstream font and dependency terms are retained. 1.1.3 is the first registry release to include LICENSE-7MLABS-MIT, LICENSE-SCOPE.md, LICENSE-SCOPE.json and the updated NOTICE, including those files in the bundled corresponding-source snapshot. Whole-package metadata remains AGPL-3.0-only; APIs, calculation algorithms, ABI and schemas are unchanged. Already published 1.1.2 wheels and their source snapshots remain unchanged. See the 1.1.3 release record for evidence and scope.

Davison is available from SDK 1.1.0 (operation: "davison", variant: "uncorrected" or "corrected") through the existing calculation entry point. Existing 1.0.x request shapes remain supported. Davison contract.

Metadata

Release files for sevenmlabs-astrology 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for sevenmlabs-astrology 1.2.0
File Interpreter ABI Platform Actions
sevenmlabs_astrology-1.2.0-py3-none-manylinux_2_38_x86_64.whl Python 3 none Linux glibc 2.38+ x86-64 Details for sevenmlabs_astrology-1.2.0-py3-none-manylinux_2_38_x86_64.whl
sevenmlabs_astrology-1.2.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for sevenmlabs_astrology-1.2.0-py3-none-macosx_11_0_arm64.whl

Total release size: 11.0 MB

Release files / sevenmlabs_astrology-1.2.0-py3-none-manylinux_2_38_x86_64.whl

Download URL sevenmlabs_astrology-1.2.0-py3-none-manylinux_2_38_x86_64.whl
Size 5.6 MB
Tags Linux glibc 2.38+ x86-64 Python 3
SHA-256 checksum
How to use checksums
037addec25ea56b758bd650c2d335b720cbe5ef5e1d9530739060164d1b0fae1
BLAKE2b-256 checksum
How to use checksums
dc876efd63e9b43b19c52de241f1cd1c150b395818a898f8a2589962b351aca4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / sevenmlabs_astrology-1.2.0-py3-none-macosx_11_0_arm64.whl

Download URL sevenmlabs_astrology-1.2.0-py3-none-macosx_11_0_arm64.whl
Size 5.4 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1ecf00e0d7f4d2be3347790a0953077a0a707fd5e895f0dcd98e3b7e67df8248
BLAKE2b-256 checksum
How to use checksums
7b578b4aa40756389be51a31a5b3dc0864461508442f95b9c597ee5174a070d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for sevenmlabs-astrology 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sevenmlabs_astrology-1.2.0-py3-none-manylinux_2_38_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page