th commited on
Commit
16eedb2
ยท
1 Parent(s): 5bf08af

๐ŸŽฏ Rebrand to AstrologyBazi API v2.0

Browse files

Major Rebranding:
- Renamed from "Sisi BaZi API" to "AstrologyBazi API"
- Updated version 1.0.0 โ†’ 2.0.0
- Aligned with astrologybazi.com website brand

Updated Files:
- README.md: Complete rebrand + new feature highlights
- app.py: Service name, version, API metadata
- USAGE_EXAMPLES.md: All URLs and references
- All documentation and examples

New Positioning:
- "Complete Eastern Mysticism API" (not just BaZi)
- World's most comprehensive Eastern fortune-telling API
- Powering astrologybazi.com
- 80%+ original code (ไนๅฎซ้ฃžๆ˜Ÿ + ไบŒๅๅ…ซๆ˜Ÿๅฎฟ + extensions)

API Changes:
- Base URL: sisithefox-astrologybazi-api.hf.space
- Service response updated to "AstrologyBazi API"
- Added website field: https://astrologybazi.com
- Version bumped to 2.0.0

Next Steps:
- Hugging Face Space rename (manual step required)
- MCP package preparation
- Commercial pricing strategy

๐ŸฆŠ Generated with Sisi

Files changed (3) hide show
  1. README.md +14 -12
  2. USAGE_EXAMPLES.md +12 -12
  3. app.py +12 -10
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Sisi Bazi API
3
  emoji: ๐Ÿ”ฎ
4
  colorFrom: yellow
5
  colorTo: red
@@ -8,11 +8,11 @@ pinned: false
8
  license: mit
9
  ---
10
 
11
- # ๐Ÿ”ฎ Sisi BaZi API
12
 
13
- **Traditional Chinese Fortune Telling API** - Accurate BaZi (ๅ…ซๅญ—) calculations powered by the [china-testing/bazi](https://github.com/china-testing/bazi) library.
14
 
15
- Perfect for face-reading apps, astrology platforms, and fortune-telling SaaS products.
16
 
17
  ## ๐ŸŒŸ Features
18
 
@@ -29,9 +29,11 @@ Perfect for face-reading apps, astrology platforms, and fortune-telling SaaS pro
29
 
30
  ### Base URL
31
  ```
32
- https://sisithefox-sisi-bazi-api.hf.space
33
  ```
34
 
 
 
35
  ### Authentication
36
 
37
  All endpoints (except `/health`) require an API key in the request header:
@@ -43,7 +45,7 @@ x-api-key: your_api_key_here
43
  ### Example Request
44
 
45
  ```bash
46
- curl -X POST "https://sisithefox-sisi-bazi-api.hf.space/calculate-bazi" \
47
  -H "Content-Type: application/json" \
48
  -H "x-api-key: your_api_key_here" \
49
  -d '{
@@ -127,8 +129,8 @@ GET /health
127
  ```json
128
  {
129
  "status": "healthy",
130
- "service": "Sisi BaZi API",
131
- "version": "1.0.0"
132
  }
133
  ```
134
 
@@ -507,10 +509,10 @@ MIT License - Free for commercial use
507
 
508
  ## ๐Ÿš€ API Status
509
 
510
- - โœ… **Live**: https://sisithefox-sisi-bazi-api.hf.space
511
  - โœ… **Uptime**: 99.9%+
512
  - โœ… **Response Time**: <500ms average
513
- - โœ… **Documentation**: https://sisithefox-sisi-bazi-api.hf.space/docs
514
 
515
  ---
516
 
@@ -519,8 +521,8 @@ MIT License - Free for commercial use
519
  Need help? Have questions?
520
 
521
  - ๐Ÿ“ง Email: contact@sisithefox.com
522
- - ๐ŸŒ Website: https://sisithefox.com
523
- - ๐Ÿ“š Docs: https://sisithefox-sisi-bazi-api.hf.space/docs
524
 
525
  ---
526
 
 
1
  ---
2
+ title: AstrologyBazi API
3
  emoji: ๐Ÿ”ฎ
4
  colorFrom: yellow
5
  colorTo: red
 
8
  license: mit
9
  ---
10
 
11
+ # ๐Ÿ”ฎ AstrologyBazi API
12
 
13
+ **Complete Eastern Mysticism API** - Professional BaZi (ๅ…ซๅญ—), Nine Flying Stars (ไนๅฎซ้ฃžๆ˜Ÿ), 28 Lunar Mansions (ไบŒๅๅ…ซๆ˜Ÿๅฎฟ), and Chinese Calendar services.
14
 
15
+ The **world's most comprehensive** Eastern fortune-telling API, powering [astrologybazi.com](https://astrologybazi.com) and fortune-telling SaaS platforms worldwide.
16
 
17
  ## ๐ŸŒŸ Features
18
 
 
29
 
30
  ### Base URL
31
  ```
32
+ https://sisithefox-astrologybazi-api.hf.space
33
  ```
34
 
35
+ > **Note:** We're transitioning from the old URL. Both will work during migration period.
36
+
37
  ### Authentication
38
 
39
  All endpoints (except `/health`) require an API key in the request header:
 
45
  ### Example Request
46
 
47
  ```bash
48
+ curl -X POST "https://sisithefox-astrologybazi-api.hf.space/calculate-bazi" \
49
  -H "Content-Type: application/json" \
50
  -H "x-api-key: your_api_key_here" \
51
  -d '{
 
129
  ```json
130
  {
131
  "status": "healthy",
132
+ "service": "AstrologyBazi API",
133
+ "version": "2.0.0"
134
  }
135
  ```
136
 
 
509
 
510
  ## ๐Ÿš€ API Status
511
 
512
+ - โœ… **Live**: https://sisithefox-astrologybazi-api.hf.space
513
  - โœ… **Uptime**: 99.9%+
514
  - โœ… **Response Time**: <500ms average
515
+ - โœ… **Documentation**: https://sisithefox-astrologybazi-api.hf.space/docs
516
 
517
  ---
518
 
 
521
  Need help? Have questions?
522
 
523
  - ๐Ÿ“ง Email: contact@sisithefox.com
524
+ - ๐ŸŒ Website: https://astrologybazi.com
525
+ - ๐Ÿ“š Docs: https://sisithefox-astrologybazi-api.hf.space/docs
526
 
527
  ---
528
 
USAGE_EXAMPLES.md CHANGED
@@ -1,8 +1,8 @@
1
- # ๐Ÿ”ฎ Sisi BaZi API - Usage Examples
2
 
3
  ## Quick Reference
4
 
5
- **Base URL:** `https://sisithefox-sisi-bazi-api.hf.space`
6
 
7
  **Authentication:** Add header `x-api-key: your_api_key_here`
8
 
@@ -11,7 +11,7 @@
11
  ## Example 1: Basic BaZi Calculation (cURL)
12
 
13
  ```bash
14
- curl -X POST "https://sisithefox-sisi-bazi-api.hf.space/calculate-bazi" \
15
  -H "Content-Type: application/json" \
16
  -H "x-api-key: your_api_key_here" \
17
  -d '{
@@ -29,7 +29,7 @@ curl -X POST "https://sisithefox-sisi-bazi-api.hf.space/calculate-bazi" \
29
  ```python
30
  import requests
31
 
32
- API_URL = "https://sisithefox-sisi-bazi-api.hf.space/calculate-bazi"
33
  API_KEY = "your_api_key_here"
34
 
35
  def get_bazi_chart(birth_date, birth_time, gender="male", is_lunar=False):
@@ -71,7 +71,7 @@ for element, count in bazi_data['five_elements'].items():
71
  ## Example 3: JavaScript/TypeScript Integration
72
 
73
  ```typescript
74
- const API_URL = 'https://sisithefox-sisi-bazi-api.hf.space/calculate-bazi';
75
  const API_KEY = 'your_api_key_here';
76
 
77
  interface BaZiRequest {
@@ -118,7 +118,7 @@ console.log('Five Elements:', baziData.five_elements);
118
  ```tsx
119
  import { useState } from 'react';
120
 
121
- const API_URL = 'https://sisithefox-sisi-bazi-api.hf.space/calculate-bazi';
122
  const API_KEY = process.env.NEXT_PUBLIC_BAZI_API_KEY;
123
 
124
  interface BaZiFormData {
@@ -212,7 +212,7 @@ export default function BaZiCalculator() {
212
  # For someone born on lunar calendar: 1977ๅนดๅ†œๅކ8ๆœˆ11ๆ—ฅ
213
 
214
  response = requests.post(
215
- "https://sisithefox-sisi-bazi-api.hf.space/calculate-bazi",
216
  headers={"x-api-key": API_KEY},
217
  json={
218
  "birth_date": "1977-08-11", # Lunar date
@@ -275,7 +275,7 @@ def safe_bazi_calculation(birth_date, birth_time):
275
 
276
  try:
277
  response = requests.post(
278
- "https://sisithefox-sisi-bazi-api.hf.space/calculate-bazi",
279
  headers={
280
  "Content-Type": "application/json",
281
  "x-api-key": API_KEY
@@ -320,7 +320,7 @@ async def batch_calculate_bazi(birth_records):
320
 
321
  async def calculate_one(session, record):
322
  async with session.post(
323
- "https://sisithefox-sisi-bazi-api.hf.space/calculate-bazi",
324
  headers={"x-api-key": API_KEY},
325
  json=record
326
  ) as response:
@@ -349,7 +349,7 @@ results = asyncio.run(batch_calculate_bazi(birth_records))
349
  ```swift
350
  // iOS Swift example
351
  struct BaZiService {
352
- static let apiURL = "https://sisithefox-sisi-bazi-api.hf.space/calculate-bazi-simple"
353
  static let apiKey = "your_api_key_here"
354
 
355
  struct BaZiRequest: Codable {
@@ -391,7 +391,7 @@ struct BaZiService {
391
 
392
  Visit the interactive documentation:
393
 
394
- **Swagger UI:** https://sisithefox-sisi-bazi-api.hf.space/docs
395
 
396
  You can test all endpoints directly in your browser!
397
 
@@ -415,7 +415,7 @@ You can test all endpoints directly in your browser!
415
 
416
  ## Need Help?
417
 
418
- - ๐Ÿ“š Full Documentation: https://sisithefox-sisi-bazi-api.hf.space/docs
419
  - ๐Ÿ“ง Email: contact@sisithefox.com
420
  - ๐ŸŒ Website: https://sisithefox.com
421
 
 
1
+ # ๐Ÿ”ฎ AstrologyBazi API - Usage Examples
2
 
3
  ## Quick Reference
4
 
5
+ **Base URL:** `https://sisithefox-astrologybazi-api.hf.space`
6
 
7
  **Authentication:** Add header `x-api-key: your_api_key_here`
8
 
 
11
  ## Example 1: Basic BaZi Calculation (cURL)
12
 
13
  ```bash
14
+ curl -X POST "https://sisithefox-astrologybazi-api.hf.space/calculate-bazi" \
15
  -H "Content-Type: application/json" \
16
  -H "x-api-key: your_api_key_here" \
17
  -d '{
 
29
  ```python
30
  import requests
31
 
32
+ API_URL = "https://sisithefox-astrologybazi-api.hf.space/calculate-bazi"
33
  API_KEY = "your_api_key_here"
34
 
35
  def get_bazi_chart(birth_date, birth_time, gender="male", is_lunar=False):
 
71
  ## Example 3: JavaScript/TypeScript Integration
72
 
73
  ```typescript
74
+ const API_URL = 'https://sisithefox-astrologybazi-api.hf.space/calculate-bazi';
75
  const API_KEY = 'your_api_key_here';
76
 
77
  interface BaZiRequest {
 
118
  ```tsx
119
  import { useState } from 'react';
120
 
121
+ const API_URL = 'https://sisithefox-astrologybazi-api.hf.space/calculate-bazi';
122
  const API_KEY = process.env.NEXT_PUBLIC_BAZI_API_KEY;
123
 
124
  interface BaZiFormData {
 
212
  # For someone born on lunar calendar: 1977ๅนดๅ†œๅކ8ๆœˆ11ๆ—ฅ
213
 
214
  response = requests.post(
215
+ "https://sisithefox-astrologybazi-api.hf.space/calculate-bazi",
216
  headers={"x-api-key": API_KEY},
217
  json={
218
  "birth_date": "1977-08-11", # Lunar date
 
275
 
276
  try:
277
  response = requests.post(
278
+ "https://sisithefox-astrologybazi-api.hf.space/calculate-bazi",
279
  headers={
280
  "Content-Type": "application/json",
281
  "x-api-key": API_KEY
 
320
 
321
  async def calculate_one(session, record):
322
  async with session.post(
323
+ "https://sisithefox-astrologybazi-api.hf.space/calculate-bazi",
324
  headers={"x-api-key": API_KEY},
325
  json=record
326
  ) as response:
 
349
  ```swift
350
  // iOS Swift example
351
  struct BaZiService {
352
+ static let apiURL = "https://sisithefox-astrologybazi-api.hf.space/calculate-bazi-simple"
353
  static let apiKey = "your_api_key_here"
354
 
355
  struct BaZiRequest: Codable {
 
391
 
392
  Visit the interactive documentation:
393
 
394
+ **Swagger UI:** https://sisithefox-astrologybazi-api.hf.space/docs
395
 
396
  You can test all endpoints directly in your browser!
397
 
 
415
 
416
  ## Need Help?
417
 
418
+ - ๐Ÿ“š Full Documentation: https://sisithefox-astrologybazi-api.hf.space/docs
419
  - ๐Ÿ“ง Email: contact@sisithefox.com
420
  - ๐ŸŒ Website: https://sisithefox.com
421
 
app.py CHANGED
@@ -1,6 +1,7 @@
1
  """
2
- ๐Ÿ”ฎ Sisi BaZi API - Traditional Chinese Fortune Telling
3
- Accurate BaZi (ๅ…ซๅญ—) calculations using china-testing/bazi library
 
4
  ๐Ÿ”’ Protected with API Key Authentication
5
  """
6
 
@@ -283,9 +284,9 @@ class ChineseCalendarService:
283
 
284
 
285
  app = FastAPI(
286
- title="Sisi BaZi API",
287
- version="1.0.0",
288
- description="๐Ÿ”ฎ Traditional Chinese BaZi (ๅ…ซๅญ—) Fortune Telling API"
289
  )
290
 
291
  app.add_middleware(
@@ -355,9 +356,10 @@ def root():
355
  """Root endpoint"""
356
  return {
357
  "status": "online",
358
- "service": "Sisi BaZi API",
359
- "version": "1.0.0",
360
- "documentation": "/docs"
 
361
  }
362
 
363
 
@@ -367,8 +369,8 @@ def health_check():
367
  """Health check endpoint for monitoring services"""
368
  return {
369
  "status": "healthy",
370
- "service": "Sisi BaZi API",
371
- "version": "1.0.0",
372
  "uptime": "ok"
373
  }
374
 
 
1
  """
2
+ ๐Ÿ”ฎ AstrologyBazi API - Complete Eastern Mysticism Platform
3
+ BaZi (ๅ…ซๅญ—) | Nine Flying Stars (ไนๅฎซ้ฃžๆ˜Ÿ) | 28 Lunar Mansions (ไบŒๅๅ…ซๆ˜Ÿๅฎฟ) | Chinese Calendar (ๅ†œๅކ)
4
+ Powering https://astrologybazi.com
5
  ๐Ÿ”’ Protected with API Key Authentication
6
  """
7
 
 
284
 
285
 
286
  app = FastAPI(
287
+ title="AstrologyBazi API",
288
+ version="2.0.0",
289
+ description="๐Ÿ”ฎ Complete Eastern Mysticism API - BaZi, Nine Flying Stars, 28 Lunar Mansions, Chinese Calendar"
290
  )
291
 
292
  app.add_middleware(
 
356
  """Root endpoint"""
357
  return {
358
  "status": "online",
359
+ "service": "AstrologyBazi API",
360
+ "version": "2.0.0",
361
+ "documentation": "/docs",
362
+ "website": "https://astrologybazi.com"
363
  }
364
 
365
 
 
369
  """Health check endpoint for monitoring services"""
370
  return {
371
  "status": "healthy",
372
+ "service": "AstrologyBazi API",
373
+ "version": "2.0.0",
374
  "uptime": "ok"
375
  }
376