obok-metaphysics 5.5.90__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.
- obok_metaphysics-5.5.90/PKG-INFO +21 -0
- obok_metaphysics-5.5.90/README.md +11 -0
- obok_metaphysics-5.5.90/obok_metaphysics/__init__.py +4 -0
- obok_metaphysics-5.5.90/obok_metaphysics/client.py +72 -0
- obok_metaphysics-5.5.90/obok_metaphysics.egg-info/PKG-INFO +21 -0
- obok_metaphysics-5.5.90/obok_metaphysics.egg-info/SOURCES.txt +9 -0
- obok_metaphysics-5.5.90/obok_metaphysics.egg-info/dependency_links.txt +1 -0
- obok_metaphysics-5.5.90/obok_metaphysics.egg-info/requires.txt +1 -0
- obok_metaphysics-5.5.90/obok_metaphysics.egg-info/top_level.txt +1 -0
- obok_metaphysics-5.5.90/pyproject.toml +15 -0
- obok_metaphysics-5.5.90/setup.cfg +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: obok-metaphysics
|
|
3
|
+
Version: 5.5.90
|
|
4
|
+
Summary: Official Python SDK for MooSim K-Metaphysics API (Saju, Da Liu Ren 720 Gwa, Compatibility, Taekil, White-Label PDF)
|
|
5
|
+
Project-URL: Homepage, https://oboksys.com
|
|
6
|
+
Project-URL: Documentation, https://oboksys.com/api/v1/ext/openapi-en.json
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: httpx>=0.24.0
|
|
10
|
+
|
|
11
|
+
# obok-metaphysics
|
|
12
|
+
|
|
13
|
+
Official Python SDK for MooSim K-Metaphysics API (`oboksys.com`).
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from obok_metaphysics import ObokClient
|
|
17
|
+
|
|
18
|
+
client = ObokClient(api_key="ms_live_your_key")
|
|
19
|
+
saju = client.get_saju(1995, 5, 15, hour=12, gender="female", lang="en")
|
|
20
|
+
print(saju["summary_localized"])
|
|
21
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# obok-metaphysics
|
|
2
|
+
|
|
3
|
+
Official Python SDK for MooSim K-Metaphysics API (`oboksys.com`).
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
from obok_metaphysics import ObokClient
|
|
7
|
+
|
|
8
|
+
client = ObokClient(api_key="ms_live_your_key")
|
|
9
|
+
saju = client.get_saju(1995, 5, 15, hour=12, gender="female", lang="en")
|
|
10
|
+
print(saju["summary_localized"])
|
|
11
|
+
```
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""오복무심(MooSim) K-역학 API 공식 Python SDK"""
|
|
3
|
+
|
|
4
|
+
import uuid
|
|
5
|
+
from typing import Any, Dict, List, Optional
|
|
6
|
+
import httpx
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ObokClient:
|
|
10
|
+
"""동기 K-사주 · 대육임 · 택일 · 궁합 · 화이트라벨 PDF API 클라이언트"""
|
|
11
|
+
|
|
12
|
+
def __init__(self, api_key: str, base_url: str = "https://oboksys.com", timeout: float = 30.0):
|
|
13
|
+
self.api_key = api_key.strip()
|
|
14
|
+
self.base_url = base_url.rstrip("/")
|
|
15
|
+
self.timeout = timeout
|
|
16
|
+
|
|
17
|
+
def _headers(self, idempotency_key: Optional[str] = None) -> Dict[str, str]:
|
|
18
|
+
return {
|
|
19
|
+
"X-MooSim-API-Key": self.api_key,
|
|
20
|
+
"Idempotency-Key": idempotency_key or str(uuid.uuid4()),
|
|
21
|
+
"Content-Type": "application/json",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
def _post(self, path: str, payload: Dict[str, Any], idempotency_key: Optional[str] = None) -> Dict[str, Any]:
|
|
25
|
+
with httpx.Client(timeout=self.timeout) as client:
|
|
26
|
+
res = client.post(f"{self.base_url}{path}", json=payload, headers=self._headers(idempotency_key))
|
|
27
|
+
res.raise_for_status()
|
|
28
|
+
return res.json()
|
|
29
|
+
|
|
30
|
+
def get_saju(self, year: int, month: int, day: int, hour: int = 12, minute: int = 0, gender: str = "male", is_lunar: bool = False, lang: str = "ko") -> Dict[str, Any]:
|
|
31
|
+
return self._post("/api/v1/ext/calc/saju", {
|
|
32
|
+
"year": year, "month": month, "day": day, "hour": hour, "minute": minute,
|
|
33
|
+
"gender": gender, "is_lunar": is_lunar, "lang": lang,
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
def get_yukim(self, date_str: str = "", tz_offset: float = 9.0, latitude: float = 0.0, longitude: float = 0.0, lang: str = "ko") -> Dict[str, Any]:
|
|
37
|
+
return self._post("/api/v1/ext/calc/yukim", {
|
|
38
|
+
"date_str": date_str, "tz_offset": tz_offset, "latitude": latitude, "longitude": longitude, "lang": lang,
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
def get_taekil(self, purpose: str = "moving", days: int = 30, birth_year: Optional[int] = None, birth_month: Optional[int] = None, birth_day: Optional[int] = None, lang: str = "ko") -> Dict[str, Any]:
|
|
42
|
+
return self._post("/api/v1/ext/calc/taekil", {
|
|
43
|
+
"purpose": purpose, "days": days, "birth_year": birth_year, "birth_month": birth_month, "birth_day": birth_day, "lang": lang,
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
def get_gunghap(self, my_birth: str, partner_birth: str, my_gender: str = "female", partner_gender: str = "male", relation_type: str = "romance", lang: str = "ko") -> Dict[str, Any]:
|
|
47
|
+
return self._post("/api/v1/ext/calc/gunghap", {
|
|
48
|
+
"my_birth": my_birth, "partner_birth": partner_birth, "my_gender": my_gender, "partner_gender": partner_gender, "relation_type": relation_type, "lang": lang,
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
def get_daily_nudge(self, birth_year: int, birth_month: int, birth_day: int, gender: str = "male", lang: str = "ko") -> Dict[str, Any]:
|
|
52
|
+
return self._post("/api/v1/ext/vertical/daily-nudge", {
|
|
53
|
+
"birth_year": birth_year, "birth_month": birth_month, "birth_day": birth_day, "gender": gender, "lang": lang,
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
def compare_hr_synergy(self, leader_birth_date: str, candidates: List[Dict[str, Any]], leader_gender: str = "male", lang: str = "ko") -> Dict[str, Any]:
|
|
57
|
+
return self._post("/api/v1/ext/vertical/hr-synergy", {
|
|
58
|
+
"leader_birth_date": leader_birth_date, "leader_gender": leader_gender, "candidates": candidates, "lang": lang,
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
def download_pdf_report(self, client_name: str, birth_year: int, birth_month: int, birth_day: int, brand_name: str = "오복무심", master_name: str = "무심 원장") -> bytes:
|
|
62
|
+
with httpx.Client(timeout=self.timeout) as client:
|
|
63
|
+
res = client.post(
|
|
64
|
+
f"{self.base_url}/api/v1/ext/render/pdf-report",
|
|
65
|
+
json={
|
|
66
|
+
"client_name": client_name, "birth_year": birth_year, "birth_month": birth_month, "birth_day": birth_day,
|
|
67
|
+
"brand_name": brand_name, "master_name": master_name, "response_format": "pdf",
|
|
68
|
+
},
|
|
69
|
+
headers=self._headers(),
|
|
70
|
+
)
|
|
71
|
+
res.raise_for_status()
|
|
72
|
+
return res.content
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: obok-metaphysics
|
|
3
|
+
Version: 5.5.90
|
|
4
|
+
Summary: Official Python SDK for MooSim K-Metaphysics API (Saju, Da Liu Ren 720 Gwa, Compatibility, Taekil, White-Label PDF)
|
|
5
|
+
Project-URL: Homepage, https://oboksys.com
|
|
6
|
+
Project-URL: Documentation, https://oboksys.com/api/v1/ext/openapi-en.json
|
|
7
|
+
Requires-Python: >=3.9
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: httpx>=0.24.0
|
|
10
|
+
|
|
11
|
+
# obok-metaphysics
|
|
12
|
+
|
|
13
|
+
Official Python SDK for MooSim K-Metaphysics API (`oboksys.com`).
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from obok_metaphysics import ObokClient
|
|
17
|
+
|
|
18
|
+
client = ObokClient(api_key="ms_live_your_key")
|
|
19
|
+
saju = client.get_saju(1995, 5, 15, hour=12, gender="female", lang="en")
|
|
20
|
+
print(saju["summary_localized"])
|
|
21
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
obok_metaphysics/__init__.py
|
|
4
|
+
obok_metaphysics/client.py
|
|
5
|
+
obok_metaphysics.egg-info/PKG-INFO
|
|
6
|
+
obok_metaphysics.egg-info/SOURCES.txt
|
|
7
|
+
obok_metaphysics.egg-info/dependency_links.txt
|
|
8
|
+
obok_metaphysics.egg-info/requires.txt
|
|
9
|
+
obok_metaphysics.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
httpx>=0.24.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
obok_metaphysics
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "obok-metaphysics"
|
|
7
|
+
version = "5.5.90"
|
|
8
|
+
description = "Official Python SDK for MooSim K-Metaphysics API (Saju, Da Liu Ren 720 Gwa, Compatibility, Taekil, White-Label PDF)"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
dependencies = ["httpx>=0.24.0"]
|
|
12
|
+
|
|
13
|
+
[project.urls]
|
|
14
|
+
Homepage = "https://oboksys.com"
|
|
15
|
+
Documentation = "https://oboksys.com/api/v1/ext/openapi-en.json"
|