pteropy
適用於Pterodactyl api的python庫
安裝
pip install pteropy
Pterodactyl_Application範例
key創建位置:/admin/api
基本設置
run.py
from pteropy import Pterodactyl_Application
#導入套件
base_url = "https://面板網址"
api_key = "api key"
#key創建位置:/admin/api
#基本設定
ptero = Pterodactyl_Application(base_url, api_key)
#傳給套件
套件範例
run.py
from pteropy import Pterodactyl_Application
base_url = "https://面板網址"
api_key = "api key"
ptero = Pterodactyl_Application(base_url, api_key)
#檢查api連線狀態
ptero.check()
#創建用戶
ptero.create_user(username="用戶名",email="用戶email", password="密碼")
#所有用戶
ptero.list_users()
Pterodactyl_Client範例
key創建位置:/account/api
基本設置
run.py
from pteropy import Pterodactyl_Client
#導入套件
base_url = "https://面板網址"
api_key = "api key"
#key創建位置:/account/api
#基本設定
ptero = Pterodactyl_Client(base_url, api_key)
#傳給套件
套件範例
run.py
from pteropy import Pterodactyl_Client
base_url = "https://面板網址"
api_key = "api key"
ptero = Pterodactyl_Client(base_url, api_key)
#檢查api連線狀態
ptero.check()
#獲得伺服器資料
ptero.get_server("3fa3d78d")
#獲得伺服器列表
ptero.list_servers()
#重命名伺服器
ptero.rename_server("3fa3d78d","名子")
#發送指令
ptero.send_command("3fa3d78d","指令")
#啟動伺服器
ptero.start_server("3fa3d78d")
#重啟伺服器
ptero.restart_server("3fa3d78d")
#關閉伺服器
ptero.stop_server("3fa3d78d")
#強制關閉伺服器
ptero.kill_server("3fa3d78d")
Metadata
Release files for pteropy 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pteropy-0.1.6.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pteropy-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.2 kB
Release files / pteropy-0.1.6.tar.gz
| Download URL | pteropy-0.1.6.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a12742461e1fbb47c016c04281c9fbd4f70f78346219dcdddaa07b742e35c44f
|
|
BLAKE2b-256 checksum How to use checksums |
656a7294932c954afafd8df548b42f9bbce47f3849c1419920cc1cfde09d2885
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Release files / pteropy-0.1.6-py3-none-any.whl
| Download URL | pteropy-0.1.6-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
983c22ba83f14dc9b6e0f5b5b3c42b40185fb5d403e74167cf2af09c3ca0c241
|
|
BLAKE2b-256 checksum How to use checksums |
21537a17083b55f0fc2fb267fe0a1812e44ac95642cc954289748ec9e276ed42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|