vibecloud
SDK Python chính thức, zero-dependency, cho VibeCloud. Client đồng bộ dùng urllib trong standard library, chạy trên Python 3.9+, nhận token vc_live_* hoặc access token MONA Pass qua Bearer.
VibeCloud được phát triển từ kinh nghiệm EAV qua 14.000+ dự án của MONA.
Cài đặt
pip install vibecloud
Deploy app và đợi job
Ví dụ 10 dòng dưới đây chạy thử sandbox 0đ trước, sau đó tạo VPS thật:
import os
from vibecloud import VibeCloud
token = os.environ["VIBECLOUD_TOKEN"]
sandbox = VibeCloud(token=token, sandbox=True)
preview = sandbox.create_vps({"app_name": "demo-app", "package_slug": "standard-1"})
print("sandbox:", sandbox.wait_job(preview["id"], timeout=60)["result"])
cloud = VibeCloud(token=token)
job = cloud.create_vps({"app_name": "demo-app", "package_slug": "standard-1"})
done = cloud.wait_job(job["id"], timeout=600)
print("production:", done["result"])
create_vps() và create_database() tự tạo header Idempotency-Key. Truyền idempotency_key="deploy-order-123" để retry với key ổn định. Các alias camelCase (createVps, waitJob, ...) cũng có sẵn để agent dùng cùng tên trên ba SDK.
Public API
prices(),packages(),me()create_vps(payload),create_database(payload)job(id),wait_job(id, timeout=300, poll_interval=1)services(),start_service(id),stop_service(id),rebuild_service(id),delete_service(id)
Lỗi
Mọi lỗi API là VibeCloudError với code, message, next_step, status và body.
| HTTP / code | Ý nghĩa | next_step mặc định |
|---|---|---|
401 / auth_required |
Token thiếu, sai hoặc hết hạn | Kiểm tra token và quyền truy cập |
402 / insufficient_funds |
Ví không đủ tiền | nạp ví tại https://monacloud.vn/console |
404 / not_found |
Không thấy tài nguyên | Kiểm tra ID tài nguyên |
409 / conflict |
Trạng thái tài nguyên không phù hợp | Kiểm tra request |
422 / validation_error |
Payload không hợp lệ | Sửa payload theo thông báo |
network_error |
Không kết nối được API | Kiểm tra mạng và base_url |
wait_timeout |
Job chưa xong trong thời gian chờ | Gọi job(id) để kiểm tra tiếp |
Xem hướng dẫn dành cho AI agent.
Test
python -m unittest
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vibecloud-0.1.0.tar.gz.
File metadata
- Download URL: vibecloud-0.1.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daa6baf5af5d7b10ef2797996b6bfaf52c322b2484c69c99d5d88e7d299420ae
|
|
| MD5 |
57872457edef45d0948d09c9573e10d8
|
|
| BLAKE2b-256 |
850327034298054650ee787ea34846e7a7db41702d65cebdb96384286dc3588b
|
File details
Details for the file vibecloud-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vibecloud-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00db0bbd1269662f4033a7523985d1c79a39db3d1ca7a3ae2d5cbba951b82264
|
|
| MD5 |
8de5180be678696bf0307b358a465439
|
|
| BLAKE2b-256 |
0e6aaeec3a9fe1f46641dbbf1b23bc89c5f56a6135b39b96bc6d33216e6c9171
|