astroapi-io-client 0.2.7__tar.gz → 0.2.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/PKG-INFO +7 -4
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/README.md +6 -3
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/pyproject.toml +1 -1
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_client/__init__.py +3 -3
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_client/_validation.py +66 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_client/client.py +15 -3
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_client/types.py +63 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_io_client.egg-info/PKG-INFO +7 -4
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/tests/test_client.py +26 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/LICENSE.txt +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/setup.cfg +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_client/errors.py +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_client/py.typed +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_client/receipts.py +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_io_client.egg-info/SOURCES.txt +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_io_client.egg-info/dependency_links.txt +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_io_client.egg-info/requires.txt +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_io_client.egg-info/top_level.txt +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/tests/test_aspect_windows_client.py +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/tests/test_calendar_export.py +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/tests/test_davison_input.py +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/tests/test_house_ingresses_client.py +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/tests/test_next_expansions_client.py +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/tests/test_onboarding_context_client.py +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/tests/test_planetary_events_client.py +0 -0
- {astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/tests/test_varga_input.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: astroapi-io-client
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10
|
|
4
4
|
Summary: Synchronous Python client for the AstroAPI.io calculation gateway
|
|
5
5
|
License-Expression: ISC
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -14,13 +14,13 @@ Dynamic: license-file
|
|
|
14
14
|
|
|
15
15
|
# AstroAPI.io Python client
|
|
16
16
|
|
|
17
|
-
The
|
|
17
|
+
The R202 source client `astroapi-io-client==0.2.10` covers all fifty calculation routes: forty-nine standard operations plus the separate Pro Nakshatra Timeline. This package version is the verified R202 client publication; service availability still requires R202 promotion. Minor-body calculations are not part of the contract.
|
|
18
18
|
|
|
19
19
|
A synchronous client for Python 3.10+, with no runtime dependencies.
|
|
20
20
|
The package import is `astroapi_client`; the distribution name is
|
|
21
|
-
`astroapi-io-client`. Version 0.2.
|
|
21
|
+
`astroapi-io-client`. Version 0.2.10 is the R202 source client; package availability never implies that source-only R202 API capabilities are deployed.
|
|
22
22
|
|
|
23
|
-
Install from PyPI with `python -m pip install astroapi-io-client==0.2.
|
|
23
|
+
Install from PyPI with `python -m pip install astroapi-io-client==0.2.10`, or install the R202 source from a local checkout using `python -m pip install ./clients/python`.
|
|
24
24
|
Building needs setuptools and wheel; the installed client uses only the standard
|
|
25
25
|
library. Keep API credentials in trusted server or command-line environments.
|
|
26
26
|
|
|
@@ -100,6 +100,9 @@ Type hints describe the server contract and do not perform response validation.
|
|
|
100
100
|
| `chart_input_readiness` **beta** | `calculateChartInputReadiness` | pinned place, exact/approximate/unknown time quality, explicit profile | route readiness plus resolved, candidate, or sampled evidence for 22 facts |
|
|
101
101
|
| `house_system_readiness` **beta** | `calculateHouseSystemReadiness` | exact birth and explicit tropical/sidereal profile | fixed 25-system availability matrix with fingerprints and no fallback |
|
|
102
102
|
| `house_placement_stability` **beta** | `calculateHousePlacementStability` | exact birth and explicit tropical/sidereal profile | exact assignments, unweighted agreement ratios, and deterministic equivalence groups across available 12-house systems |
|
|
103
|
+
| `aspect_policy_stability` **beta** | `calculateAspectPolicyStability` | exact birth, explicit profile, optional 3–10 points, and 2–4 named aspect policies | admission reasons, signed orb margins, set fingerprints, and deterministic equivalence groups |
|
|
104
|
+
| `house_boundary_proximity` **beta** | `calculateHouseBoundaryProximity` | exact birth, explicit profile, optional 1–10 points and 0.1–10° threshold | exact two-sided cusp clearance, normalized position, nearest-boundary ties, and explicit no-fallback geometry failures |
|
|
105
|
+
| `location_precision_audit` **beta** | `calculateLocationPrecisionAudit` | exact birth, one explicit 12-house system, 0.1–500 km radius, optional 1–10 points | nine sample rows, planet-house stability, maximum angle/cusp displacement, and explicit no-fallback geometry failures |
|
|
103
106
|
| `synastry_svg` **beta** | `calculateSynastrySvg` | two births; optional zodiac/houses/theme/aspects/`include_png` | `result["svg"]`, optional `result["png"]` |
|
|
104
107
|
| `transit_svg` **beta** | `calculateTransitSvg` | birth and transit date; optional display controls/`include_png` | `result["svg"]`, optional `result["png"]` |
|
|
105
108
|
| `natal_report` **beta** | `calculateNatalReport` | birth; optional zodiac/houses/theme/SVG/download | `result["html"]`, source-linked `result["facts"]`, optional `result["download"]` |
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# AstroAPI.io Python client
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The R202 source client `astroapi-io-client==0.2.10` covers all fifty calculation routes: forty-nine standard operations plus the separate Pro Nakshatra Timeline. This package version is the verified R202 client publication; service availability still requires R202 promotion. Minor-body calculations are not part of the contract.
|
|
4
4
|
|
|
5
5
|
A synchronous client for Python 3.10+, with no runtime dependencies.
|
|
6
6
|
The package import is `astroapi_client`; the distribution name is
|
|
7
|
-
`astroapi-io-client`. Version 0.2.
|
|
7
|
+
`astroapi-io-client`. Version 0.2.10 is the R202 source client; package availability never implies that source-only R202 API capabilities are deployed.
|
|
8
8
|
|
|
9
|
-
Install from PyPI with `python -m pip install astroapi-io-client==0.2.
|
|
9
|
+
Install from PyPI with `python -m pip install astroapi-io-client==0.2.10`, or install the R202 source from a local checkout using `python -m pip install ./clients/python`.
|
|
10
10
|
Building needs setuptools and wheel; the installed client uses only the standard
|
|
11
11
|
library. Keep API credentials in trusted server or command-line environments.
|
|
12
12
|
|
|
@@ -86,6 +86,9 @@ Type hints describe the server contract and do not perform response validation.
|
|
|
86
86
|
| `chart_input_readiness` **beta** | `calculateChartInputReadiness` | pinned place, exact/approximate/unknown time quality, explicit profile | route readiness plus resolved, candidate, or sampled evidence for 22 facts |
|
|
87
87
|
| `house_system_readiness` **beta** | `calculateHouseSystemReadiness` | exact birth and explicit tropical/sidereal profile | fixed 25-system availability matrix with fingerprints and no fallback |
|
|
88
88
|
| `house_placement_stability` **beta** | `calculateHousePlacementStability` | exact birth and explicit tropical/sidereal profile | exact assignments, unweighted agreement ratios, and deterministic equivalence groups across available 12-house systems |
|
|
89
|
+
| `aspect_policy_stability` **beta** | `calculateAspectPolicyStability` | exact birth, explicit profile, optional 3–10 points, and 2–4 named aspect policies | admission reasons, signed orb margins, set fingerprints, and deterministic equivalence groups |
|
|
90
|
+
| `house_boundary_proximity` **beta** | `calculateHouseBoundaryProximity` | exact birth, explicit profile, optional 1–10 points and 0.1–10° threshold | exact two-sided cusp clearance, normalized position, nearest-boundary ties, and explicit no-fallback geometry failures |
|
|
91
|
+
| `location_precision_audit` **beta** | `calculateLocationPrecisionAudit` | exact birth, one explicit 12-house system, 0.1–500 km radius, optional 1–10 points | nine sample rows, planet-house stability, maximum angle/cusp displacement, and explicit no-fallback geometry failures |
|
|
89
92
|
| `synastry_svg` **beta** | `calculateSynastrySvg` | two births; optional zodiac/houses/theme/aspects/`include_png` | `result["svg"]`, optional `result["png"]` |
|
|
90
93
|
| `transit_svg` **beta** | `calculateTransitSvg` | birth and transit date; optional display controls/`include_png` | `result["svg"]`, optional `result["png"]` |
|
|
91
94
|
| `natal_report` **beta** | `calculateNatalReport` | birth; optional zodiac/houses/theme/SVG/download | `result["html"]`, source-linked `result["facts"]`, optional `result["download"]` |
|
|
@@ -17,7 +17,7 @@ from .types import (
|
|
|
17
17
|
GeographicLocation, RelocationChartInput, AstrocartographyBody, AstrocartographyInput,
|
|
18
18
|
EclipseType, EclipseGeometryInput, EclipseObserverSnapshot, EclipseEvent, EclipseGeometryResponse, MoonPhaseSector, ElectionalAspectFilter,
|
|
19
19
|
ElectionalFilters, ElectionalSearchInput,
|
|
20
|
-
EventRule, EventRuleSearchInput, ConventionProfile, ConventionCompareInput, ReleaseCompareInput, ChartRobustnessInput, CivilTimeAuditInput, ChartInputReadinessExactTime, ChartInputReadinessApproximateTime, ChartInputReadinessUnknownTime, ChartInputReadinessBirthTime, ChartInputReadinessInput, HouseSystemReadinessInput, HousePlacementStabilityInput,
|
|
20
|
+
EventRule, EventRuleSearchInput, ConventionProfile, ConventionCompareInput, ReleaseCompareInput, ChartRobustnessInput, CivilTimeAuditInput, ChartInputReadinessExactTime, ChartInputReadinessApproximateTime, ChartInputReadinessUnknownTime, ChartInputReadinessBirthTime, ChartInputReadinessInput, HouseSystemReadinessInput, HousePlacementStabilityInput, AspectPolicyStabilityPoint, AspectPolicyStabilityPolicy, AspectPolicyStabilityInput, HouseBoundaryProximityPoint, HouseBoundaryProximityInput, LocationPrecisionAuditPoint, LocationPrecisionAuditHouseSystem, LocationPrecisionAuditProfile, LocationPrecisionAuditInput,
|
|
21
21
|
NatalAnalysisAspectName, NatalAnalysisAspectOption, NatalAnalysisInput,
|
|
22
22
|
AshtakootaInput, AshtakavargaInput, NumerologyInput, PlanetaryHoursInput,
|
|
23
23
|
FixedStar, FixedStarsInput,
|
|
@@ -30,7 +30,7 @@ from .types import (
|
|
|
30
30
|
PlaceSearchInput, TimezoneResolveInput, NatalContextInput,
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
__version__ = "0.2.
|
|
33
|
+
__version__ = "0.2.10"
|
|
34
34
|
__all__ = [
|
|
35
35
|
"NumerologyInput", "verify_calculation_receipt",
|
|
36
36
|
"AstroAPIClient", "AstroAPIError", "ClientBusyError", "HTTPError", "DavisonInput",
|
|
@@ -45,7 +45,7 @@ __all__ = [
|
|
|
45
45
|
"GeographicLocation", "RelocationChartInput", "AstrocartographyBody", "AstrocartographyInput",
|
|
46
46
|
"EclipseType", "EclipseGeometryInput", "EclipseObserverSnapshot", "EclipseEvent", "EclipseGeometryResponse", "MoonPhaseSector", "ElectionalAspectFilter",
|
|
47
47
|
"ElectionalFilters", "ElectionalSearchInput",
|
|
48
|
-
"EventRule", "EventRuleSearchInput", "ConventionProfile", "ConventionCompareInput", "ReleaseCompareInput", "ChartRobustnessInput", "CivilTimeAuditInput", "ChartInputReadinessExactTime", "ChartInputReadinessApproximateTime", "ChartInputReadinessUnknownTime", "ChartInputReadinessBirthTime", "ChartInputReadinessInput", "HouseSystemReadinessInput", "HousePlacementStabilityInput",
|
|
48
|
+
"EventRule", "EventRuleSearchInput", "ConventionProfile", "ConventionCompareInput", "ReleaseCompareInput", "ChartRobustnessInput", "CivilTimeAuditInput", "ChartInputReadinessExactTime", "ChartInputReadinessApproximateTime", "ChartInputReadinessUnknownTime", "ChartInputReadinessBirthTime", "ChartInputReadinessInput", "HouseSystemReadinessInput", "HousePlacementStabilityInput", "AspectPolicyStabilityPoint", "AspectPolicyStabilityPolicy", "AspectPolicyStabilityInput", "HouseBoundaryProximityPoint", "HouseBoundaryProximityInput", "LocationPrecisionAuditPoint", "LocationPrecisionAuditHouseSystem", "LocationPrecisionAuditProfile", "LocationPrecisionAuditInput",
|
|
49
49
|
"NatalAnalysisAspectName", "NatalAnalysisAspectOption", "NatalAnalysisInput",
|
|
50
50
|
"AshtakootaInput", "AshtakavargaInput", "PlanetaryHoursInput",
|
|
51
51
|
"FixedStar", "FixedStarsInput",
|
|
@@ -27,6 +27,12 @@ _CONFIGURABLE_ASPECTS = {
|
|
|
27
27
|
"conjunction", "semisextile", "semisquare", "sextile", "quintile",
|
|
28
28
|
"square", "trine", "sesquiquadrate", "biquintile", "quincunx", "opposition",
|
|
29
29
|
}
|
|
30
|
+
_NATAL_HOUSE_SYSTEMS = {
|
|
31
|
+
"equal", "whole_sign", "placidus", "porphyry", "meridian", "campanus",
|
|
32
|
+
"regiomontanus", "alcabitius", "koch", "morinus", "topocentric", "sripati",
|
|
33
|
+
"vehlow", "horizon", "krusinski", "sunshine", "sunshine_alt", "savard",
|
|
34
|
+
"pullen_sd", "pullen_sr", "carter", "apc", "equal_mc", "natural",
|
|
35
|
+
}
|
|
30
36
|
|
|
31
37
|
|
|
32
38
|
def _invalid(message: str = "Request does not match the route's supported input fields.") -> None:
|
|
@@ -702,6 +708,66 @@ def encode_request(route: str, payload: Any) -> bytes:
|
|
|
702
708
|
_invalid("tropical profiles cannot include ayanamsa.")
|
|
703
709
|
if profile["zodiac"] == "sidereal" and ("ayanamsa" not in profile or profile["ayanamsa"] not in _AYANAMSAS):
|
|
704
710
|
_invalid("sidereal profiles require a supported ayanamsa.")
|
|
711
|
+
elif route == "aspect-policy-stability":
|
|
712
|
+
_object(data, {"birth", "profile", "points", "policies"}, {"birth", "profile", "policies"})
|
|
713
|
+
birth = _object(data["birth"], {"date", "time", "timezone", "lat", "lon"}, {"date", "time", "timezone", "lat", "lon"})
|
|
714
|
+
_birth(birth)
|
|
715
|
+
profile = _object(data["profile"], {"zodiac", "ayanamsa"}, {"zodiac"})
|
|
716
|
+
_enum(profile["zodiac"], {"tropical", "sidereal"}, "zodiac must be tropical or sidereal.")
|
|
717
|
+
if profile["zodiac"] == "tropical" and "ayanamsa" in profile:
|
|
718
|
+
_invalid("tropical profiles cannot include ayanamsa.")
|
|
719
|
+
if profile["zodiac"] == "sidereal" and ("ayanamsa" not in profile or profile["ayanamsa"] not in _AYANAMSAS):
|
|
720
|
+
_invalid("sidereal profiles require a supported ayanamsa.")
|
|
721
|
+
if "points" in data:
|
|
722
|
+
_unique_enum_list(data["points"], _PLANETARY_EVENT_BODIES, 10, "points")
|
|
723
|
+
if len(data["points"]) < 3:
|
|
724
|
+
_invalid("aspect-policy stability requires at least three points.")
|
|
725
|
+
if not isinstance(data["policies"], list) or not 2 <= len(data["policies"]) <= 4:
|
|
726
|
+
_invalid("policies must contain two through four entries.")
|
|
727
|
+
identifiers = set()
|
|
728
|
+
for policy in data["policies"]:
|
|
729
|
+
policy = _object(policy, {"id", "aspects"}, {"id", "aspects"})
|
|
730
|
+
identifier = policy["id"]
|
|
731
|
+
if (not isinstance(identifier, str)
|
|
732
|
+
or re.fullmatch(r"[a-z][a-z0-9_-]{0,31}", identifier) is None
|
|
733
|
+
or identifier in identifiers):
|
|
734
|
+
_invalid("policy ids must be unique lowercase identifiers of at most 32 characters.")
|
|
735
|
+
identifiers.add(identifier)
|
|
736
|
+
_aspect_configuration(policy)
|
|
737
|
+
elif route == "house-boundary-proximity":
|
|
738
|
+
_object(data, {"birth", "profile", "points", "threshold_degrees"}, {"birth", "profile"})
|
|
739
|
+
birth = _object(data["birth"], {"date", "time", "timezone", "lat", "lon"}, {"date", "time", "timezone", "lat", "lon"})
|
|
740
|
+
_birth(birth)
|
|
741
|
+
profile = _object(data["profile"], {"zodiac", "ayanamsa"}, {"zodiac"})
|
|
742
|
+
_enum(profile["zodiac"], {"tropical", "sidereal"}, "zodiac must be tropical or sidereal.")
|
|
743
|
+
if profile["zodiac"] == "tropical" and "ayanamsa" in profile:
|
|
744
|
+
_invalid("tropical profiles cannot include ayanamsa.")
|
|
745
|
+
if profile["zodiac"] == "sidereal" and ("ayanamsa" not in profile or profile["ayanamsa"] not in _AYANAMSAS):
|
|
746
|
+
_invalid("sidereal profiles require a supported ayanamsa.")
|
|
747
|
+
if "points" in data:
|
|
748
|
+
_unique_enum_list(data["points"], _PLANETARY_EVENT_BODIES, 10, "points")
|
|
749
|
+
if "threshold_degrees" in data:
|
|
750
|
+
threshold = data["threshold_degrees"]
|
|
751
|
+
if (type(threshold) not in {int, float} or not math.isfinite(threshold)
|
|
752
|
+
or not 0.1 <= threshold <= 10.0
|
|
753
|
+
or abs(threshold * 10 - round(threshold * 10)) > 1e-9):
|
|
754
|
+
_invalid("threshold_degrees must be 0.1 through 10.0 in 0.1 degree increments.")
|
|
755
|
+
elif route == "location-precision-audit":
|
|
756
|
+
_object(data, {"birth", "profile", "radius_km", "points"}, {"birth", "profile", "radius_km"})
|
|
757
|
+
birth = _object(data["birth"], {"date", "time", "timezone", "lat", "lon"}, {"date", "time", "timezone", "lat", "lon"})
|
|
758
|
+
_birth(birth)
|
|
759
|
+
profile = _object(data["profile"], {"zodiac", "ayanamsa", "house_system"}, {"zodiac", "house_system"})
|
|
760
|
+
_enum(profile["zodiac"], {"tropical", "sidereal"}, "zodiac must be tropical or sidereal.")
|
|
761
|
+
_enum(profile["house_system"], _NATAL_HOUSE_SYSTEMS, "house_system must be a documented 12-house system.")
|
|
762
|
+
if profile["zodiac"] == "tropical" and "ayanamsa" in profile:
|
|
763
|
+
_invalid("tropical profiles cannot include ayanamsa.")
|
|
764
|
+
if profile["zodiac"] == "sidereal" and ("ayanamsa" not in profile or profile["ayanamsa"] not in _AYANAMSAS):
|
|
765
|
+
_invalid("sidereal profiles require a supported ayanamsa.")
|
|
766
|
+
radius = data["radius_km"]
|
|
767
|
+
if type(radius) not in {int, float} or not math.isfinite(radius) or not 0.1 <= radius <= 500.0:
|
|
768
|
+
_invalid("radius_km must be a finite number from 0.1 through 500.")
|
|
769
|
+
if "points" in data:
|
|
770
|
+
_unique_enum_list(data["points"], _PLANETARY_EVENT_BODIES, 10, "points")
|
|
705
771
|
elif route in {"house-system-readiness", "house-placement-stability"}:
|
|
706
772
|
_object(data, {"birth", "profile"}, {"birth", "profile"})
|
|
707
773
|
birth = _object(data["birth"], {"date", "time", "timezone", "lat", "lon"}, {"date", "time", "timezone", "lat", "lon"})
|
|
@@ -32,7 +32,7 @@ from .types import (
|
|
|
32
32
|
MoonPhaseInput, MoonPhaseResponse, DavisonInput, PlanetaryEventsInput, PlanetaryEventsResponse,
|
|
33
33
|
HouseIngressesInput, HouseIngressesResponse,
|
|
34
34
|
AspectWindowsInput, AspectWindowsResponse,
|
|
35
|
-
EventRuleSearchInput, ConventionCompareInput, ReleaseCompareInput, ChartRobustnessInput, CivilTimeAuditInput, ChartInputReadinessInput, HouseSystemReadinessInput, HousePlacementStabilityInput,
|
|
35
|
+
EventRuleSearchInput, ConventionCompareInput, ReleaseCompareInput, ChartRobustnessInput, CivilTimeAuditInput, ChartInputReadinessInput, HouseSystemReadinessInput, HousePlacementStabilityInput, AspectPolicyStabilityInput, HouseBoundaryProximityInput, LocationPrecisionAuditInput,
|
|
36
36
|
EventCalendarInput, SynastrySvgInput, TransitSvgInput, NatalReportInput,
|
|
37
37
|
BirthTimeSensitivityInput, RelocationChartInput, AstrocartographyInput,
|
|
38
38
|
PlaceSearchInput, TimezoneResolveInput, NatalContextInput,
|
|
@@ -181,7 +181,7 @@ def _perform(
|
|
|
181
181
|
"Content-Type": "application/json",
|
|
182
182
|
"Accept": "application/json",
|
|
183
183
|
"Accept-Encoding": "identity",
|
|
184
|
-
"User-Agent": "astroapi-io-client/0.2.
|
|
184
|
+
"User-Agent": "astroapi-io-client/0.2.10",
|
|
185
185
|
"Connection": "close",
|
|
186
186
|
**({"X-AstroAPI-Receipt": "v1"} if request_receipt else {}),
|
|
187
187
|
})
|
|
@@ -285,7 +285,7 @@ class AstroAPIClient:
|
|
|
285
285
|
|
|
286
286
|
def _request(self, route: str, payload: object) -> JSONResponse:
|
|
287
287
|
body = encode_request(route, payload)
|
|
288
|
-
timeout = (self._timeline_timeout if route in {"nakshatra-timeline", "birth-time-sensitivity", "chart-robustness", "chart-input-readiness", "house-system-readiness", "house-placement-stability"}
|
|
288
|
+
timeout = (self._timeline_timeout if route in {"nakshatra-timeline", "birth-time-sensitivity", "chart-robustness", "chart-input-readiness", "house-system-readiness", "house-placement-stability", "house-boundary-proximity", "location-precision-audit"}
|
|
289
289
|
else self._planetary_events_timeout if route in {"planetary-events", "house-ingresses", "eclipse-geometry", "electional-search", "event-rule-search"}
|
|
290
290
|
else self._aspect_windows_timeout if route == "aspect-windows"
|
|
291
291
|
else self._timeout)
|
|
@@ -444,6 +444,18 @@ class AstroAPIClient:
|
|
|
444
444
|
"""BETA: quantify unweighted planet-house stability across comparable systems."""
|
|
445
445
|
return self._request("house-placement-stability", payload)
|
|
446
446
|
|
|
447
|
+
def aspect_policy_stability(self, payload: AspectPolicyStabilityInput) -> JSONResponse:
|
|
448
|
+
"""BETA: compare several explicit aspect-orb policies on one exact chart."""
|
|
449
|
+
return self._request("aspect-policy-stability", payload)
|
|
450
|
+
|
|
451
|
+
def house_boundary_proximity(self, payload: HouseBoundaryProximityInput) -> JSONResponse:
|
|
452
|
+
"""BETA: audit exact two-sided cusp clearance across 12-house systems."""
|
|
453
|
+
return self._request("house-boundary-proximity", payload)
|
|
454
|
+
|
|
455
|
+
def location_precision_audit(self, payload: LocationPrecisionAuditInput) -> JSONResponse:
|
|
456
|
+
"""BETA: audit coordinate precision at a center plus eight perimeter samples."""
|
|
457
|
+
return self._request("location-precision-audit", payload)
|
|
458
|
+
|
|
447
459
|
def synastry_svg(self, payload: SynastrySvgInput) -> JSONResponse:
|
|
448
460
|
"""BETA: original deterministic double-wheel relationship SVG."""
|
|
449
461
|
return self._request("synastry-svg", payload)
|
|
@@ -420,6 +420,48 @@ class HouseSystemReadinessInput(TypedDict):
|
|
|
420
420
|
|
|
421
421
|
|
|
422
422
|
HousePlacementStabilityInput = HouseSystemReadinessInput
|
|
423
|
+
HouseBoundaryProximityPoint = Literal[
|
|
424
|
+
"sun", "moon", "mercury", "venus", "mars",
|
|
425
|
+
"jupiter", "saturn", "uranus", "neptune", "pluto",
|
|
426
|
+
]
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
class _HouseBoundaryProximityRequired(TypedDict):
|
|
430
|
+
birth: BirthInput
|
|
431
|
+
profile: HouseSystemReadinessProfile
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
class HouseBoundaryProximityInput(_HouseBoundaryProximityRequired, total=False):
|
|
435
|
+
points: list[HouseBoundaryProximityPoint]
|
|
436
|
+
threshold_degrees: float
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
LocationPrecisionAuditPoint = HouseBoundaryProximityPoint
|
|
440
|
+
LocationPrecisionAuditHouseSystem = Literal[
|
|
441
|
+
"equal", "whole_sign", "placidus", "porphyry", "meridian", "campanus",
|
|
442
|
+
"regiomontanus", "alcabitius", "koch", "morinus", "topocentric", "sripati",
|
|
443
|
+
"vehlow", "horizon", "krusinski", "sunshine", "sunshine_alt", "savard",
|
|
444
|
+
"pullen_sd", "pullen_sr", "carter", "apc", "equal_mc", "natural",
|
|
445
|
+
]
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
class _LocationPrecisionAuditProfileRequired(TypedDict):
|
|
449
|
+
zodiac: Zodiac
|
|
450
|
+
house_system: LocationPrecisionAuditHouseSystem
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
class LocationPrecisionAuditProfile(_LocationPrecisionAuditProfileRequired, total=False):
|
|
454
|
+
ayanamsa: Ayanamsa
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
class _LocationPrecisionAuditRequired(TypedDict):
|
|
458
|
+
birth: BirthInput
|
|
459
|
+
profile: LocationPrecisionAuditProfile
|
|
460
|
+
radius_km: float
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
class LocationPrecisionAuditInput(_LocationPrecisionAuditRequired, total=False):
|
|
464
|
+
points: list[LocationPrecisionAuditPoint]
|
|
423
465
|
|
|
424
466
|
|
|
425
467
|
class ReleaseCompareInput(TypedDict):
|
|
@@ -466,6 +508,27 @@ class NatalAnalysisInput(_NatalAnalysisRequired, total=False):
|
|
|
466
508
|
ayanamsa: Ayanamsa
|
|
467
509
|
|
|
468
510
|
|
|
511
|
+
AspectPolicyStabilityPoint = Literal[
|
|
512
|
+
"sun", "moon", "mercury", "venus", "mars",
|
|
513
|
+
"jupiter", "saturn", "uranus", "neptune", "pluto",
|
|
514
|
+
]
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
class AspectPolicyStabilityPolicy(TypedDict):
|
|
518
|
+
id: str
|
|
519
|
+
aspects: list[NatalAnalysisAspectOption]
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
class _AspectPolicyStabilityRequired(TypedDict):
|
|
523
|
+
birth: BirthInput
|
|
524
|
+
profile: HouseSystemReadinessProfile
|
|
525
|
+
policies: list[AspectPolicyStabilityPolicy]
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
class AspectPolicyStabilityInput(_AspectPolicyStabilityRequired, total=False):
|
|
529
|
+
points: list[AspectPolicyStabilityPoint]
|
|
530
|
+
|
|
531
|
+
|
|
469
532
|
class PlanetaryHoursInput(TypedDict):
|
|
470
533
|
date: str
|
|
471
534
|
timezone: str
|
{astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_io_client.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: astroapi-io-client
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10
|
|
4
4
|
Summary: Synchronous Python client for the AstroAPI.io calculation gateway
|
|
5
5
|
License-Expression: ISC
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -14,13 +14,13 @@ Dynamic: license-file
|
|
|
14
14
|
|
|
15
15
|
# AstroAPI.io Python client
|
|
16
16
|
|
|
17
|
-
The
|
|
17
|
+
The R202 source client `astroapi-io-client==0.2.10` covers all fifty calculation routes: forty-nine standard operations plus the separate Pro Nakshatra Timeline. This package version is the verified R202 client publication; service availability still requires R202 promotion. Minor-body calculations are not part of the contract.
|
|
18
18
|
|
|
19
19
|
A synchronous client for Python 3.10+, with no runtime dependencies.
|
|
20
20
|
The package import is `astroapi_client`; the distribution name is
|
|
21
|
-
`astroapi-io-client`. Version 0.2.
|
|
21
|
+
`astroapi-io-client`. Version 0.2.10 is the R202 source client; package availability never implies that source-only R202 API capabilities are deployed.
|
|
22
22
|
|
|
23
|
-
Install from PyPI with `python -m pip install astroapi-io-client==0.2.
|
|
23
|
+
Install from PyPI with `python -m pip install astroapi-io-client==0.2.10`, or install the R202 source from a local checkout using `python -m pip install ./clients/python`.
|
|
24
24
|
Building needs setuptools and wheel; the installed client uses only the standard
|
|
25
25
|
library. Keep API credentials in trusted server or command-line environments.
|
|
26
26
|
|
|
@@ -100,6 +100,9 @@ Type hints describe the server contract and do not perform response validation.
|
|
|
100
100
|
| `chart_input_readiness` **beta** | `calculateChartInputReadiness` | pinned place, exact/approximate/unknown time quality, explicit profile | route readiness plus resolved, candidate, or sampled evidence for 22 facts |
|
|
101
101
|
| `house_system_readiness` **beta** | `calculateHouseSystemReadiness` | exact birth and explicit tropical/sidereal profile | fixed 25-system availability matrix with fingerprints and no fallback |
|
|
102
102
|
| `house_placement_stability` **beta** | `calculateHousePlacementStability` | exact birth and explicit tropical/sidereal profile | exact assignments, unweighted agreement ratios, and deterministic equivalence groups across available 12-house systems |
|
|
103
|
+
| `aspect_policy_stability` **beta** | `calculateAspectPolicyStability` | exact birth, explicit profile, optional 3–10 points, and 2–4 named aspect policies | admission reasons, signed orb margins, set fingerprints, and deterministic equivalence groups |
|
|
104
|
+
| `house_boundary_proximity` **beta** | `calculateHouseBoundaryProximity` | exact birth, explicit profile, optional 1–10 points and 0.1–10° threshold | exact two-sided cusp clearance, normalized position, nearest-boundary ties, and explicit no-fallback geometry failures |
|
|
105
|
+
| `location_precision_audit` **beta** | `calculateLocationPrecisionAudit` | exact birth, one explicit 12-house system, 0.1–500 km radius, optional 1–10 points | nine sample rows, planet-house stability, maximum angle/cusp displacement, and explicit no-fallback geometry failures |
|
|
103
106
|
| `synastry_svg` **beta** | `calculateSynastrySvg` | two births; optional zodiac/houses/theme/aspects/`include_png` | `result["svg"]`, optional `result["png"]` |
|
|
104
107
|
| `transit_svg` **beta** | `calculateTransitSvg` | birth and transit date; optional display controls/`include_png` | `result["svg"]`, optional `result["png"]` |
|
|
105
108
|
| `natal_report` **beta** | `calculateNatalReport` | birth; optional zodiac/houses/theme/SVG/download | `result["html"]`, source-linked `result["facts"]`, optional `result["download"]` |
|
|
@@ -66,6 +66,14 @@ CIVIL_TIME_AUDIT_INPUT = {"place_id": "geonames:5128581:2026-10-02", "date": "20
|
|
|
66
66
|
CHART_INPUT_READINESS_INPUT = {"place_id": "geonames:5128581:2026-10-02", "birth_time": {"status": "exact", "date": "2024-11-03", "time": "01:30"}, "profile": {"zodiac": "tropical", "house_system": "equal"}}
|
|
67
67
|
HOUSE_SYSTEM_READINESS_INPUT = {"birth": BIRTH, "profile": {"zodiac": "tropical"}}
|
|
68
68
|
HOUSE_PLACEMENT_STABILITY_INPUT = HOUSE_SYSTEM_READINESS_INPUT
|
|
69
|
+
ASPECT_POLICY_STABILITY_INPUT = {
|
|
70
|
+
"birth": BIRTH, "profile": {"zodiac": "tropical"},
|
|
71
|
+
"points": ["sun", "moon", "mercury"],
|
|
72
|
+
"policies": [
|
|
73
|
+
{"id": "tight", "aspects": [{"aspect": "square", "max_orb_degrees": 3.0}]},
|
|
74
|
+
{"id": "wide", "aspects": [{"aspect": "square", "max_orb_degrees": 8.0}]},
|
|
75
|
+
],
|
|
76
|
+
}
|
|
69
77
|
CHART_ROBUSTNESS_INPUT = {"birth_time": {"status": "approximate", "date": "2000-01-01", "time": "12:00", "timezone": "UTC", "uncertainty_minutes": 30}, "lat": 0, "lon": 0, "profiles": [{"zodiac": "tropical", "house_system": "equal"}, {"zodiac": "sidereal", "ayanamsa": "lahiri", "house_system": "whole_sign"}]}
|
|
70
78
|
ROUTES += [
|
|
71
79
|
("event_rule_search", "event-rule-search", RULE_INPUT, {"type": "event_rule_search", "status": "beta", "rule_analysis": {}, "matching_samples": [], "sampled_candidate_windows": [], "metadata": {}}),
|
|
@@ -75,6 +83,9 @@ ROUTES += [
|
|
|
75
83
|
("chart_input_readiness", "chart-input-readiness", CHART_INPUT_READINESS_INPUT, {"type": "chart_input_readiness", "status": "beta", "birth_time_status": "exact", "profile": {}, "resolution": {}, "exact_chart_ready": False, "next_action": "select_civil_time_candidate", "workflows": [{}, {}, {}, {}], "fact_evidence": [], "summary": {}, "evidence": {}, "metadata": {}}),
|
|
76
84
|
("house_system_readiness", "house-system-readiness", HOUSE_SYSTEM_READINESS_INPUT, {"type": "house_system_readiness", "status": "beta", "input": BIRTH, "profile": {}, "systems": [{} for _ in range(25)], "summary": {}, "fallback": {"performed": False, "selected_system": None}, "metadata": {}}),
|
|
77
85
|
("house_placement_stability", "house-placement-stability", HOUSE_PLACEMENT_STABILITY_INPUT, {"type": "house_placement_stability", "status": "beta", "input": BIRTH, "profile": {}, "systems": [{} for _ in range(25)], "planets": [{} for _ in range(10)], "placement_groups": [], "summary": {}, "fallback": {"performed": False, "selected_system": None}, "metadata": {}}),
|
|
86
|
+
("aspect_policy_stability", "aspect-policy-stability", ASPECT_POLICY_STABILITY_INPUT, {"type": "aspect_policy_stability", "status": "beta", "input": {}, "positions": {}, "evaluations": [], "policy_results": [{}, {}], "policy_groups": [{}], "summary": {}, "metadata": {}}),
|
|
87
|
+
("house_boundary_proximity", "house-boundary-proximity", {"birth": BIRTH, "profile": {"zodiac": "tropical"}, "points": ["sun", "moon"], "threshold_degrees": 2.0}, {"type": "house_boundary_proximity", "status": "beta", "input": {}, "systems": [{} for _ in range(25)], "point_summaries": [{}, {}], "summary": {}, "fallback": {"performed": False, "selected_system": None}, "metadata": {}}),
|
|
88
|
+
("location_precision_audit", "location-precision-audit", {"birth": BIRTH, "profile": {"zodiac": "tropical", "house_system": "placidus"}, "radius_km": 25.0, "points": ["sun", "moon"]}, {"type": "location_precision_audit", "status": "beta", "input": {}, "samples": [{} for _ in range(9)], "point_summaries": [{}, {}], "angle_summaries": {}, "cusp_summaries": [{} for _ in range(12)], "summary": {}, "fallback": {"performed": False, "selected_system": None}, "metadata": {}}),
|
|
78
89
|
]
|
|
79
90
|
|
|
80
91
|
@contextmanager
|
|
@@ -161,6 +172,14 @@ CIVIL_TIME_AUDIT_INPUT = {"place_id": "geonames:5128581:2026-10-02", "date": "20
|
|
|
161
172
|
CHART_INPUT_READINESS_INPUT = {"place_id": "geonames:5128581:2026-10-02", "birth_time": {"status": "exact", "date": "2024-11-03", "time": "01:30"}, "profile": {"zodiac": "tropical", "house_system": "equal"}}
|
|
162
173
|
HOUSE_SYSTEM_READINESS_INPUT = {"birth": BIRTH, "profile": {"zodiac": "tropical"}}
|
|
163
174
|
HOUSE_PLACEMENT_STABILITY_INPUT = HOUSE_SYSTEM_READINESS_INPUT
|
|
175
|
+
ASPECT_POLICY_STABILITY_INPUT = {
|
|
176
|
+
"birth": BIRTH, "profile": {"zodiac": "tropical"},
|
|
177
|
+
"points": ["sun", "moon", "mercury"],
|
|
178
|
+
"policies": [
|
|
179
|
+
{"id": "tight", "aspects": [{"aspect": "square", "max_orb_degrees": 3.0}]},
|
|
180
|
+
{"id": "wide", "aspects": [{"aspect": "square", "max_orb_degrees": 8.0}]},
|
|
181
|
+
],
|
|
182
|
+
}
|
|
164
183
|
CHART_ROBUSTNESS_INPUT = {"birth_time": {"status": "approximate", "date": "2000-01-01", "time": "12:00", "timezone": "UTC", "uncertainty_minutes": 30}, "lat": 0, "lon": 0, "profiles": [{"zodiac": "tropical", "house_system": "equal"}, {"zodiac": "sidereal", "ayanamsa": "lahiri", "house_system": "whole_sign"}]}
|
|
165
184
|
ROUTES += [
|
|
166
185
|
("event_rule_search", "event-rule-search", RULE_INPUT, {"type": "event_rule_search", "status": "beta", "rule_analysis": {}, "matching_samples": [], "sampled_candidate_windows": [], "metadata": {}}),
|
|
@@ -170,6 +189,9 @@ ROUTES += [
|
|
|
170
189
|
("chart_input_readiness", "chart-input-readiness", CHART_INPUT_READINESS_INPUT, {"type": "chart_input_readiness", "status": "beta", "birth_time_status": "exact", "profile": {}, "resolution": {}, "exact_chart_ready": False, "next_action": "select_civil_time_candidate", "workflows": [{}, {}, {}, {}], "fact_evidence": [], "summary": {}, "evidence": {}, "metadata": {}}),
|
|
171
190
|
("house_system_readiness", "house-system-readiness", HOUSE_SYSTEM_READINESS_INPUT, {"type": "house_system_readiness", "status": "beta", "input": BIRTH, "profile": {}, "systems": [{} for _ in range(25)], "summary": {}, "fallback": {"performed": False, "selected_system": None}, "metadata": {}}),
|
|
172
191
|
("house_placement_stability", "house-placement-stability", HOUSE_PLACEMENT_STABILITY_INPUT, {"type": "house_placement_stability", "status": "beta", "input": BIRTH, "profile": {}, "systems": [{} for _ in range(25)], "planets": [{} for _ in range(10)], "placement_groups": [], "summary": {}, "fallback": {"performed": False, "selected_system": None}, "metadata": {}}),
|
|
192
|
+
("aspect_policy_stability", "aspect-policy-stability", ASPECT_POLICY_STABILITY_INPUT, {"type": "aspect_policy_stability", "status": "beta", "input": {}, "positions": {}, "evaluations": [], "policy_results": [{}, {}], "policy_groups": [{}], "summary": {}, "metadata": {}}),
|
|
193
|
+
("house_boundary_proximity", "house-boundary-proximity", {"birth": BIRTH, "profile": {"zodiac": "tropical"}, "points": ["sun", "moon"], "threshold_degrees": 2.0}, {"type": "house_boundary_proximity", "status": "beta", "input": {}, "systems": [{} for _ in range(25)], "point_summaries": [{}, {}], "summary": {}, "fallback": {"performed": False, "selected_system": None}, "metadata": {}}),
|
|
194
|
+
("location_precision_audit", "location-precision-audit", {"birth": BIRTH, "profile": {"zodiac": "tropical", "house_system": "placidus"}, "radius_km": 25.0, "points": ["sun", "moon"]}, {"type": "location_precision_audit", "status": "beta", "input": {}, "samples": [{} for _ in range(9)], "point_summaries": [{}, {}], "angle_summaries": {}, "cusp_summaries": [{} for _ in range(12)], "summary": {}, "fallback": {"performed": False, "selected_system": None}, "metadata": {}}),
|
|
173
195
|
]
|
|
174
196
|
|
|
175
197
|
@contextmanager
|
|
@@ -429,6 +451,10 @@ class ClientTests(unittest.TestCase):
|
|
|
429
451
|
client.civil_time_audit({**CIVIL_TIME_AUDIT_INPUT, "place_id": "geonames:5128581:2020-01-01"})
|
|
430
452
|
with self.assertRaises(ValidationError):
|
|
431
453
|
client.chart_input_readiness({**CHART_INPUT_READINESS_INPUT, "birth_time": {"status": "approximate", "date": "2000-01-01", "time": "12:00"}})
|
|
454
|
+
with self.assertRaises(ValidationError):
|
|
455
|
+
client.location_precision_audit({"birth": BIRTH, "profile": {"zodiac": "tropical", "house_system": "placidus"}, "radius_km": 0})
|
|
456
|
+
with self.assertRaises(ValidationError):
|
|
457
|
+
client.location_precision_audit({"birth": BIRTH, "profile": {"zodiac": "tropical", "house_system": "gauquelin"}, "radius_km": 25})
|
|
432
458
|
|
|
433
459
|
|
|
434
460
|
def test_request_body_limit(self):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_io_client.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_io_client.egg-info/requires.txt
RENAMED
|
File without changes
|
{astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/src/astroapi_io_client.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/tests/test_onboarding_context_client.py
RENAMED
|
File without changes
|
{astroapi_io_client-0.2.7 → astroapi_io_client-0.2.10}/tests/test_planetary_events_client.py
RENAMED
|
File without changes
|
|
File without changes
|